qiskit-documentation/docs/api/qiskit/0.45/qiskit.opflow.gradients.QFI...

63 lines
2.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: QFI
description: API reference for qiskit.opflow.gradients.QFI
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.opflow.gradients.QFI
---
# QFI
<Class id="qiskit.opflow.gradients.QFI" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.45/qiskit/opflow/gradients/qfi.py" signature="qiskit.opflow.gradients.QFI(qfi_method='lin_comb_full')" modifiers="class">
Bases: [`QFIBase`](qiskit.opflow.gradients.QFIBase "qiskit.opflow.gradients.qfi_base.QFIBase")
Deprecated: Compute the Quantum Fisher Information (QFI).
Computes the QFI given a pure, parameterized quantum state, where QFI is:
$$
\mathrm{QFI}_{kl}= 4 \mathrm{Re}[\langle \partial_k \psi | \partial_l \psi \rangle
\langle\partial_k \psi | \psi \rangle \langle\psi | \partial_l \psi \rangle].
$$
<Admonition title="Deprecated since version 0.24.0" type="danger">
The class `qiskit.opflow.gradients.qfi.QFI` is deprecated as of qiskit-terra 0.24.0. It will be removed no earlier than 3 months after the release date. For code migration guidelines, visit [https://qisk.it/opflow\_migration](https://qisk.it/opflow_migration).
</Admonition>
## Attributes
### qfi\_method
<Attribute id="qiskit.opflow.gradients.QFI.qfi_method">
Returns `CircuitQFI`.
**Returns**
`CircuitQFI`.
</Attribute>
## Methods
### convert
<Function id="qiskit.opflow.gradients.QFI.convert" signature="convert(operator, params=None)">
**Parameters**
* **operator** ([*CircuitStateFn*](qiskit.opflow.state_fns.CircuitStateFn "qiskit.opflow.state_fns.circuit_state_fn.CircuitStateFn")) The operator corresponding to the quantum state |ψ(ω)〉for which we compute the QFI
* **params** ([*ParameterVector*](qiskit.circuit.ParameterVector "qiskit.circuit.parametervector.ParameterVector") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression")*] | None*) The parameters we are computing the QFI wrt: ω If not explicitly passed, they are inferred from the operator and sorted by name.
**Returns**
ListOp\[ListOp] where the operator at position k,l corresponds to QFI\_kl
**Raises**
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") If operator is not parameterized.
**Return type**
[*ListOp*](qiskit.opflow.list_ops.ListOp "qiskit.opflow.list_ops.list_op.ListOp")
</Function>
</Class>