class_docstr: Integration test of classical and quantum fisher information matrices
class_docstr_tok: ["Integration","test","of","classical","and","quantum","fisher","information","matrices"]
docstr: Integration test of quantum fisher information matrix CFIM. This is just calling ``qml.metric_tensor`` or ``qml.adjoint_metric_tensor`` and multiplying by a factor of 4
docstr_tok: ["Integration","test","of","quantum","fisher","information","matrix","CFIM",".","This","is","just","calling","``","qml.metric_tensor","``","or","``","qml.adjoint_metric_tensor","``","and","multiplying","by","a","factor","of","4"]
code: def test_quantum_fisher_info(self):
      """Integration test of quantum fisher information matrix CFIM. This is just calling ``qml.metric_tensor`` or ``qml.adjoint_metric_tensor`` and multiplying by a factor of 4"""
  
      n_wires = 2
  
      dev = qml.device("default.qubit", wires=n_wires)
      dev_hard = qml.device(
          "default.qubit", wires=n_wires + 1, shots=1000
      )
  
      def qfunc(params):
          qml.RX(params[0], wires=0)
          qml.RX(params[1], wires=0)
          qml.CNOT(wires=(0, 1))
          return qml.probs(wires=[0, 1])
  
      params = pnp.random.random(2)
  
      circ_hard = qml.QNode(qfunc, dev_hard)
      QFIM_hard = quantum_fisher(circ_hard)(params)
      QFIM1_hard = 4.0 * qml.metric_tensor(circ_hard)(params)
  
      circ = qml.QNode(qfunc, dev)
      QFIM = quantum_fisher(circ)(params)
      QFIM1 = 4.0 * qml.adjoint_metric_tensor(circ)(params)
      assert np.allclose(QFIM, QFIM1)
      assert np.allclose(QFIM_hard, QFIM1_hard, atol=1e-1)
  
imports: import pytest
  import numpy
  import pennylane
  import pennylane.numpy
  from pennylane.qinfo import classical_fisher, quantum_fisher
  from pennylane.qinfo.transforms import _make_probs, _compute_cfim
label_desc: Use image node_id 3 for calling the TestIntegration obj's underlying member method code with example usage: obj.test_quantum_fisher_info() and returns: qml