qiskit.aqua.components.eigs.EigsQPE
class EigsQPE(operator, iqft, num_time_slices=1, num_ancillae=1, expansion_mode='trotter', expansion_order=1, evo_time=None, negative_evals=False, ne_qfts=None)
Eigenvalues using Quantum Phase Estimation.
Specifically, this class is based on PhaseEstimationCircuit with no measurements and has additional handling of negative eigenvalues, e.g. for HHL
. It depends on the QFT
class.
Parameters
- operator (
LegacyBaseOperator
) – The Hamiltonian Operator object - iqft (
QuantumCircuit
) – The Inverse Quantum Fourier Transform circuit - num_time_slices (
int
) – The number of time slices, has a minimum value of 1. - num_ancillae (
int
) – The number of ancillary qubits to use for the measurement, has a minimum value of 1. - expansion_mode (
str
) – The expansion mode (‘trotter’ | ‘suzuki’) - expansion_order (
int
) – The suzuki expansion order, has a minimum value of 1. - evo_time (
Optional
[float
]) – An optional evolution time which should scale the eigenvalue onto the range (or for negative eigenvalues). Defaults toNone
in which case a suitably estimated evolution time is internally computed. - negative_evals (
bool
) – SetTrue
to indicate negative eigenvalues need to be handled - ne_qfts (
Optional
[List
]) – The QFT and IQFT circuits for handling negative eigenvalues
__init__
__init__(operator, iqft, num_time_slices=1, num_ancillae=1, expansion_mode='trotter', expansion_order=1, evo_time=None, negative_evals=False, ne_qfts=None)
Parameters
- operator (
LegacyBaseOperator
) – The Hamiltonian Operator object - iqft (
QuantumCircuit
) – The Inverse Quantum Fourier Transform circuit - num_time_slices (
int
) – The number of time slices, has a minimum value of 1. - num_ancillae (
int
) – The number of ancillary qubits to use for the measurement, has a minimum value of 1. - expansion_mode (
str
) – The expansion mode (‘trotter’ | ‘suzuki’) - expansion_order (
int
) – The suzuki expansion order, has a minimum value of 1. - evo_time (
Optional
[float
]) – An optional evolution time which should scale the eigenvalue onto the range (or for negative eigenvalues). Defaults toNone
in which case a suitably estimated evolution time is internally computed. - negative_evals (
bool
) – SetTrue
to indicate negative eigenvalues need to be handled - ne_qfts (
Optional
[List
]) – The QFT and IQFT circuits for handling negative eigenvalues
Methods
__init__ (operator, iqft[, num_time_slices, …]) | type operatorLegacyBaseOperator |
construct_circuit (mode[, register]) | Construct the eigenvalues estimation using the PhaseEstimationCircuit |
construct_inverse (mode, circuit) | Construct the inverse eigenvalue estimation quantum circuit. |
get_register_sizes () | get register sizes |
get_scaling () | get scaling |
construct_circuit
construct_circuit(mode, register=None)
Construct the eigenvalues estimation using the PhaseEstimationCircuit
Parameters
- mode (str) – construction mode, ‘matrix’ not supported
- register (QuantumRegister) – the register to use for the quantum state
Returns
object for the constructed circuit
Return type
Raises
ValueError – QPE is only possible as a circuit not as a matrix
construct_inverse
construct_inverse(mode, circuit)
Construct the inverse eigenvalue estimation quantum circuit.
Parameters
- mode (str) – construction mode, ‘matrix’ not supported
- circuit (QuantumCircuit) – the quantum circuit to invert
Returns
object for of the inverted eigenvalue estimation
circuit.
Return type
Raises
- NotImplementedError – not implemented for matrix mode
- ValueError – Circuit was not constructed beforehand
get_register_sizes
get_register_sizes()
get register sizes
get_scaling
get_scaling()
get scaling