Fig. 20: Quantum oracle as a key component of the Grover step as part of DH-QMF. | npj Quantum Information

Fig. 20: Quantum oracle as a key component of the Grover step as part of DH-QMF.

From: A benchmarking study of quantum algorithms for combinatorial optimization

Fig. 20

The oracle marks every state whose energy is strictly smaller than the threshold value E(y), which is computed given the latest threshold index y. The result is recorded in a single-qubit flag: given its input state \(\left\vert z\right\rangle\) (where z {0, 1}), the oracle outputs \(\left\vert z\oplus f(x)\right\rangle\), where f(x) = 1 if, and only if, E(x) < E(y), and f(x) = 0 otherwise. a The circuit consists of several queries to the energy oracle OE, which reversibly computes the energy corresponding to a given input state, and applications of a unitary module called “Compare”, which compares the values held by two registers and records the result (0 or 1) in a single-qubit ancilla. To infer if E(x) < E(y) for a given input \(\left\vert x\right\rangle\), we prepare the quantum state \(\left\vert y\right\rangle\) corresponding to the known threshold index y, then independently compute E(x) and E(y) by separately employing OE, respectively, and compare their values using “Compare”. The computational registers for holding the energy values are initialized in \(\left\vert {\tilde{E}}_{0}\right\rangle\), where \({\tilde{E}}_{0}\) is a constant energy shift chosen so as to avoid negative energies. If E(x) < E(y) is TRUE, a 1 is recorded in an ancilla qubit that was initialized in \(\left\vert 0\right\rangle\); the ancilla remains unaltered otherwise. Using a CNOT gate, we copy out the result of the comparison to the single-qubit flag and reverse the whole circuit producing this result. b OE is implemented by serially executing the shown circuit template for every vertex pair (i, ). Depending on whether vertex[i] and vertex[] carry the same or different values, we respectively subtract or add the value Ji in the data(H) register.

Back to article page