qit.examples.phase_estimation_precision

qit.examples.phase_estimation_precision(t, U, u=None)

Quantum phase estimation demo.

Parameters
  • t (int) – number of qubits

  • U (array) – unitary operator

  • u (State) – Initial state. If not given, use a random eigenvector of U.

Estimate an eigenvalue of U using t qubits, starting from the state u. Plots and returns the probability distribution of the resulting t-bit approximations.

Uses phase_estimation.