CPC G06F 17/12 (2013.01) [G06F 17/16 (2013.01); G06N 10/00 (2019.01)] | 4 Claims |
1. A classical computer, comprising:
a computer processor; and
a memory storing a classical computer program;
wherein the classical computer program is configured to generate a quantum computer program comprising instructions to:
initialize a register to an initial state;
initialize an ancilla qubit and apply a Hadamard gate to the ancilla qubit;
determine a number of iterations n to estimate n-bit eigenvalues;
perform a first unitary gate raised to 2n−1 and controlled by the ancilla qubit;
perform a Hadamard gate on the ancilla qubit;
measure the ancilla qubit and save in a classical register C0;
clear the ancilla qubit;
initialize a counter i to n−2;
perform a second unitary gate raised to 2i and controlled by the ancilla qubit;
perform a phase gate on the ancilla qubit conditioned on a value in a classical register C(n−1)−i−1 and apply a Hadamard gate on the ancilla qubit;
measure the ancilla qubit and save in a classical register C(n−1)−i;
clear the ancilla qubit; and
decrease i by 1 and repeating the performing of the second unitary gate, the performing of the phase gate, the applying of the Hadamard gate,
the measuring of the ancilla qubit, the saving of the ancilla qubit, and the decreasing of i by 1 until i is equal to zero;
wherein the classical computer program sends the quantum computer program to a quantum computer, the quantum computer executes the quantum computer program, receives results from the quantum computer in the classical registers C0, C1, . . . Cn−1, and outputs the results.
|