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)
Quantum Phase Estimation Circuit.
Parameters
- operator (
Optional
[WeightedPauliOperator
]) – the hamiltonian Operator object - state_in (
Optional
[InitialState
]) – the InitialState component - the initial quantum state (representing) –
- iqft (
Optional
[QuantumCircuit
]) – the Inverse Quantum Fourier Transform as circuit or Aqua component - num_time_slices (
int
) – the number of time slices - num_ancillae (
int
) – the number of ancillary qubits to use for the measurement - expansion_mode (
str
) – the expansion mode (trotter|suzuki) - expansion_order (
int
) – the suzuki expansion order - evo_time (
float
) – the evolution time - state_in_circuit_factory (
Optional
[CircuitFactory
]) – the initial state represented by a CircuitFactory object - unitary_circuit_factory (
Optional
[CircuitFactory
]) – the problem unitary represented by a CircuitFactory object - shallow_circuit_concat (
bool
) – indicate whether to use shallow (cheap) mode for circuit concatenation - pauli_list (
Optional
[List
[Pauli
]]) – the flat list of paulis for the operator
Raises
AquaError – Missing input
__init__
__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)
Parameters
- operator (
Optional
[WeightedPauliOperator
]) – the hamiltonian Operator object - state_in (
Optional
[InitialState
]) – the InitialState component - the initial quantum state (representing) –
- iqft (
Optional
[QuantumCircuit
]) – the Inverse Quantum Fourier Transform as circuit or Aqua component - num_time_slices (
int
) – the number of time slices - num_ancillae (
int
) – the number of ancillary qubits to use for the measurement - expansion_mode (
str
) – the expansion mode (trotter|suzuki) - expansion_order (
int
) – the suzuki expansion order - evo_time (
float
) – the evolution time - state_in_circuit_factory (
Optional
[CircuitFactory
]) – the initial state represented by a CircuitFactory object - unitary_circuit_factory (
Optional
[CircuitFactory
]) – the problem unitary represented by a CircuitFactory object - shallow_circuit_concat (
bool
) – indicate whether to use shallow (cheap) mode for circuit concatenation - pauli_list (
Optional
[List
[Pauli
]]) – the flat list of paulis for the operator
Raises
AquaError – Missing input
Methods
__init__ ([operator, state_in, iqft, …]) | type operatorOptional [WeightedPauliOperator ] |
construct_circuit ([state_register, …]) | Construct the Phase Estimation circuit |
Attributes
ancillary_register | returns ancillary register |
auxiliary_register | returns auxiliary register |
state_register | returns state register |
ancillary_register
returns ancillary register
auxiliary_register
returns auxiliary register
construct_circuit
construct_circuit(state_register=None, ancillary_register=None, auxiliary_register=None, measurement=False)
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
state_register
returns state register