qat.lang.algorithms.phase_estimation

qat.lang.algorithms.phase_estimation(operator, nbits)

Generates a routine that performs phase estimation of some unitary operator.

The number of qubits of the resulting routine is \(n+k\) where \(n\) is the arity of operator and \(k\) is nbits. The routine assumes that the first \(n\) qubits are already prepared and contain the states on which the phase estimation should be performed. The result will be stored in the last \(k\) qubits.

Parameters
  • operator (Gate) – a quantum gate or routine

  • nbits (int) – the number of bits to store the result in

Returns

a routine

Return type

QRoutine