BaseStateFidelity¶
- class BaseStateFidelity[Quellcode]¶
Bases:
ABC
An interface to calculate state fidelities (state overlaps) for pairs of (parametrized) quantum circuits. The calculation depends on the particular fidelity method implementation, but can be always defined as the state overlap:
\[|\langle\psi(x)|\phi(y)\rangle|^2\]where \(x\) and \(y\) are optional parametrizations of the states \(\psi\) and \(\phi\) prepared by the circuits
circuit_1
andcircuit_2
, respectively.Methods
Implementation-dependent method to create a fidelity circuit from 2 circuit inputs.
Runs asynchronously the state overlap (fidelity) calculation between two (parametrized) circuits (first and second) for a specific set of parameter values (first and second).