class_docstr: Tests for Fidelity function between two states (state vectors or density matrix).
docstr: Test fidelity between different quantum states.
code: def test_state_vector_fidelity(self, states_fid, check_state, func):
      """Test fidelity between different quantum states."""
      state0, state1, fid = states_fid
      state0 = func(state0)
      state1 = func(state1)
  
      fidelity = qml.math.fidelity_statevector(
          state0, state1, check_state
      )
      assert qml.math.allclose(fid, fidelity)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
label_desc: Use image node_id 1 for calling the TestFidelityMath obj's underlying member method code with example usage: obj.test_state_vector_fidelity(states_fid, check_state, func) without return types