PhaseEstimationResult¶
- class PhaseEstimationResult(num_evaluation_qubits, circuit_result, phases)[source]¶
Bases:
qiskit.algorithms.phase_estimators.phase_estimator.PhaseEstimatorResult
Store and manipulate results from running PhaseEstimation.
This class is instantiated by the
PhaseEstimation
class, not via user code. ThePhaseEstimation
class generates a list of phases and corresponding weights. Upon completion it returns the results as an instance of this class. The main method for accessing the results is filter_phases.The canonical phase satisfying the
PhaseEstimator
interface, returned by the attribute phase, is the most likely phase.- Parameters
num_evaluation_qubits – number of qubits in phase-readout register.
circuit_result – result object returned by method running circuit.
phases – ndarray or dict of phases and frequencies determined by QPE.
Methods
Any property from the argument that exists in the receiver is updated.
Return a filtered dict of phases (keys) and frequencies (values).
Attributes
- circuit_result¶
Return the result object returned by running the QPE circuit (on hardware or simulator).
This is useful for inspecting and troubleshooting the QPE algorithm.
- Return type
- most_likely_phase¶
DEPRECATED - Return the most likely phase as a number in \([0.0, 1.0)\).
1.0 corresponds to a phase of \(2\pi\). This selects the phase corresponding to the bit string with the highesest probability. This is the most likely phase.
- Return type
float
- phase¶
Return the most likely phase as a number in \([0.0, 1.0)\).
1.0 corresponds to a phase of \(2\pi\). This selects the phase corresponding to the bit string with the highesest probability. This is the most likely phase.
- Return type
float
- phases¶
Return all phases and their frequencies computed by QPE.
This is an array or dict whose values correspond to weights on bit strings.
- Return type
numpy.ndarray | dict