qat.lang.algorithms.quantum_counting
- qat.lang.algorithms.quantum_counting(oracle, nbits, prepare=True)
Performs a quantum counting on some oracle.
The number of qubits of the resulting routine is \(n+k\) where \(n\) is the arity of oracle and \(k\) is nbits. The routine assumes that the first \(n\) qubits are already prepared and contain the states on which the counting should be performed. The result will be stored in the last \(k\) qubits.