qbraid_algorithms.qpe.get_result
- qbraid_algorithms.qpe.get_result(counts)
Extract the eigenvalue from Quantum Phase Estimation measurement counts.
This function processes the measurement results from a QPE circuit to extract the estimated eigenvalue. It finds the most frequently measured bitstring, converts it to a decimal value, and normalizes it to get the eigenvalue estimate.
- Parameters:
counts (dict[str, int]) – Dictionary mapping measurement outcomes (bitstrings) to their occurrence counts from the QPE circuit.
- Returns:
- The estimated eigenvalue as a fraction between 0 and 1.
This represents the phase φ where the eigenvalue is e^(2πiφ).
- Return type:
float