qiskit.aqua.algorithms.QPE¶

class
QPE
(operator=None, state_in=None, iqft=None, num_time_slices=1, num_ancillae=1, expansion_mode='trotter', expansion_order=1, shallow_circuit_concat=False, quantum_instance=None)[소스]¶ The Quantum Phase Estimation algorithm.
QPE (also sometimes abbreviated as PEA, for Phase Estimation Algorithm), has two quantum registers, control and target, where the control consists of several qubits initially put in uniform superposition, and the target a set of qubits prepared in an eigenstate (often a guess of the eigenstate) of the unitary operator of a quantum system. QPE then evolves the target under the control using dynamics on the unitary operator. The information of the corresponding eigenvalue is then ‘kickedback’ into the phases of the control register, which can then be deconvoluted by an Inverse Quantum Fourier Transform (IQFT), and measured for readout in binary decimal format. QPE also requires a reasonably good estimate of the eigen wave function to start the process. For example, when estimating molecular ground energies in chemistry, the HartreeFock method could be used to provide such trial eigen wave functions.
 매개변수
operator (
Union
[OperatorBase
,LegacyBaseOperator
,None
]) – The Hamiltonian Operatorstate_in (
Union
[QuantumCircuit
,InitialState
,None
]) – An optional InitialState component representing an initial quantum state.None
may be supplied.iqft (
Optional
[QuantumCircuit
]) – A Inverse Quantum Fourier Transform componentnum_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 min. value of 1.expansion_mode (
str
) – The expansion mode (‘trotter’’suzuki’)expansion_order (
int
) – The suzuki expansion order, has a min. value of 1.shallow_circuit_concat (
bool
) – Set True to use shallow (cheap) mode for circuit concatenation of evolution slices. By default this is False. Seeqiskit.aqua.operators.common.evolution_instruction()
for more information.quantum_instance (
Union
[QuantumInstance
,Backend
,BaseBackend
,None
]) – Quantum Instance or Backend

__init__
(operator=None, state_in=None, iqft=None, num_time_slices=1, num_ancillae=1, expansion_mode='trotter', expansion_order=1, shallow_circuit_concat=False, quantum_instance=None)[소스]¶  매개변수
operator (
Union
[OperatorBase
,LegacyBaseOperator
,None
]) – The Hamiltonian Operatorstate_in (
Union
[QuantumCircuit
,InitialState
,None
]) – An optional InitialState component representing an initial quantum state.None
may be supplied.iqft (
Optional
[QuantumCircuit
]) – A Inverse Quantum Fourier Transform componentnum_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 min. value of 1.expansion_mode (
str
) – The expansion mode (‘trotter’’suzuki’)expansion_order (
int
) – The suzuki expansion order, has a min. value of 1.shallow_circuit_concat (
bool
) – Set True to use shallow (cheap) mode for circuit concatenation of evolution slices. By default this is False. Seeqiskit.aqua.operators.common.evolution_instruction()
for more information.quantum_instance (
Union
[QuantumInstance
,Backend
,BaseBackend
,None
]) – Quantum Instance or Backend
Methods
__init__
([operator, state_in, iqft, …]) type operator
Union
[OperatorBase
,LegacyBaseOperator
,None
]
compute_minimum_eigenvalue
([operator, …])Computes minimum eigenvalue.
construct_circuit
([measurement])Construct circuit.
run
([quantum_instance])Execute the algorithm with selected backend.
set_backend
(backend, **kwargs)Sets backend with configuration.
Whether computing the expectation value of auxiliary operators is supported.
Attributes
Returns aux operators
Returns backend.
Returns operator
Returns quantum instance.
Return a numpy random.

property
aux_operators
¶ Returns aux operators
 반환 형식
Optional
[List
[Union
[OperatorBase
,LegacyBaseOperator
]]]

property
backend
¶ Returns backend.
 반환 형식
Union
[Backend
,BaseBackend
]

compute_minimum_eigenvalue
(operator=None, aux_operators=None)[소스]¶ Computes minimum eigenvalue. Operator and aux_operators can be supplied here and if not None will override any already set into algorithm so it can be reused with different operators. While an operator is required by algorithms, aux_operators are optional. To ‘remove’ a previous aux_operators array use an empty list here.
 매개변수
operator (
Union
[OperatorBase
,LegacyBaseOperator
,None
]) – If not None replaces operator in algorithmaux_operators (
Optional
[List
[Union
[OperatorBase
,LegacyBaseOperator
]]]) – If not None replaces aux_operators in algorithm
 반환 형식
MinimumEigensolverResult
 반환값
MinimumEigensolverResult

construct_circuit
(measurement=False)[소스]¶ Construct circuit.
 매개변수
measurement (
bool
) – Boolean flag to indicate if measurement should be included in the circuit. 반환값
quantum circuit.
 반환 형식

property
operator
¶ Returns operator
 반환 형식
Optional
[LegacyBaseOperator
]

property
quantum_instance
¶ Returns quantum instance.
 반환 형식
Optional
[QuantumInstance
]

property
random
¶ Return a numpy random.

run
(quantum_instance=None, **kwargs)¶ Execute the algorithm with selected backend.
 매개변수
quantum_instance (
Union
[QuantumInstance
,Backend
,BaseBackend
,None
]) – the experimental setting.kwargs (dict) – kwargs
 반환값
results of an algorithm.
 반환 형식
dict
 예외
AquaError – If a quantum instance or backend has not been provided

set_backend
(backend, **kwargs)¶ Sets backend with configuration.
 반환 형식
None

classmethod
supports_aux_operators
()¶ Whether computing the expectation value of auxiliary operators is supported.
If the minimum eigensolver computes an eigenstate of the main operator then it can compute the expectation value of the aux_operators for that state. Otherwise they will be ignored.
 반환 형식
bool
 반환값
True if aux_operator expectations can be evaluated, False otherwise