Documentation
¶
Overview ¶
Package qpe implements Quantum Phase Estimation.
Given a unitary U and an eigenstate |ψ⟩ with U|ψ⟩ = e^{2πiφ}|ψ⟩, QPE estimates the phase φ using a register of ancilla qubits and the inverse Quantum Fourier Transform.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyInverseQFT ¶
ApplyInverseQFT applies the inverse QFT in-place on qubits [0..n-1].
func InverseQFT ¶
InverseQFT builds an inverse QFT circuit on numQubits.
Types ¶
type Config ¶
type Config struct {
// Unitary is the gate whose eigenvalue phase to estimate.
Unitary gate.Gate
// NumPhaseBits is the number of ancilla qubits for precision.
NumPhaseBits int
// EigenState is a preparation circuit for the target eigenstate.
// If nil, the target register is left in |0...0⟩.
EigenState *ir.Circuit
// Shots is the number of measurement shots. Default: 1024.
Shots int
}
Config specifies the QPE problem.
Click to show internal directories.
Click to hide internal directories.