qiskit.aqua.circuits.PhaseEstimationCircuit¶
-
class
PhaseEstimationCircuit
(operator=None, state_in=None, iqft=None, num_time_slices=1, num_ancillae=1, expansion_mode='trotter', expansion_order=1, evo_time=6.283185307179586, state_in_circuit_factory=None, unitary_circuit_factory=None, shallow_circuit_concat=False, pauli_list=None)[source]¶ Quantum Phase Estimation Circuit.
- Parameters
operator (
Optional
[WeightedPauliOperator
]) – the hamiltonian Operator objectstate_in (
Optional
[InitialState
]) – the InitialState componentthe initial quantum state (representing) –
iqft (
Optional
[QuantumCircuit
]) – the Inverse Quantum Fourier Transform as circuit or Aqua componentnum_time_slices (
int
) – the number of time slicesnum_ancillae (
int
) – the number of ancillary qubits to use for the measurementexpansion_mode (
str
) – the expansion mode (trotter|suzuki)expansion_order (
int
) – the suzuki expansion orderevo_time (
float
) – the evolution timestate_in_circuit_factory (
Optional
[CircuitFactory
]) – the initial state represented by a CircuitFactory objectunitary_circuit_factory (
Optional
[CircuitFactory
]) – the problem unitary represented by a CircuitFactory objectshallow_circuit_concat (
bool
) – indicate whether to use shallow (cheap) mode for circuit concatenationpauli_list (
Optional
[List
[Pauli
]]) – the flat list of paulis for the operator
- Raises
AquaError – Missing input
-
__init__
(operator=None, state_in=None, iqft=None, num_time_slices=1, num_ancillae=1, expansion_mode='trotter', expansion_order=1, evo_time=6.283185307179586, state_in_circuit_factory=None, unitary_circuit_factory=None, shallow_circuit_concat=False, pauli_list=None)[source]¶ - Parameters
operator (
Optional
[WeightedPauliOperator
]) – the hamiltonian Operator objectstate_in (
Optional
[InitialState
]) – the InitialState componentthe initial quantum state (representing) –
iqft (
Optional
[QuantumCircuit
]) – the Inverse Quantum Fourier Transform as circuit or Aqua componentnum_time_slices (
int
) – the number of time slicesnum_ancillae (
int
) – the number of ancillary qubits to use for the measurementexpansion_mode (
str
) – the expansion mode (trotter|suzuki)expansion_order (
int
) – the suzuki expansion orderevo_time (
float
) – the evolution timestate_in_circuit_factory (
Optional
[CircuitFactory
]) – the initial state represented by a CircuitFactory objectunitary_circuit_factory (
Optional
[CircuitFactory
]) – the problem unitary represented by a CircuitFactory objectshallow_circuit_concat (
bool
) – indicate whether to use shallow (cheap) mode for circuit concatenationpauli_list (
Optional
[List
[Pauli
]]) – the flat list of paulis for the operator
- Raises
AquaError – Missing input
Methods
__init__
([operator, state_in, iqft, …])- type operator
Optional
[WeightedPauliOperator
]
construct_circuit
([state_register, …])Construct the Phase Estimation circuit
Attributes
returns ancillary register
returns auxiliary register
returns state register
-
property
ancillary_register
¶ returns ancillary register
-
property
auxiliary_register
¶ returns auxiliary register
-
construct_circuit
(state_register=None, ancillary_register=None, auxiliary_register=None, measurement=False)[source]¶ Construct the Phase Estimation circuit
- Parameters
state_register (QuantumRegister) – the optional register to use for the quantum state
ancillary_register (QuantumRegister) – the optional register to use for
ancillary measurement qubits (the) –
auxiliary_register (QuantumRegister) – an optional auxiliary quantum register
measurement (bool) – Boolean flag to indicate if measurement should be included
the circuit. (in) –
- Returns
the QuantumCircuit object for the constructed circuit
- Return type
- Raises
RuntimeError – Multiple identity pauli terms are present
ValueError – invalid mode
-
property
state_register
¶ returns state register