First construct a controlled unitary gate from the uncontrolled oracle. Keep the supplied in a reference register. Controlled on an extra qubit, swap the data and reference registers, query on the register that contains in one branch, and swap back. Because , that branch is unchanged, while the other branch acquires on the data. Reversing the control convention with Pauli X gates gives controlled-. The reference state is returned unchanged, and each use costs one query to and controlled-SWAP gates.
Expand in an eigenbasis of . Exact quantum phase estimation with an -qubit phase register produces
Apply the available phase gates, controlled by the corresponding bits of , to multiply branch by
Then reverse phase estimation. Although no oracle was supplied, every eigenvalue obeys , so . The inverse controlled powers can therefore be implemented with forward calls to . Since , phase estimation and its inverse use only queries. The phase register returns to , while the data register is
As a direct check, the same spectral promise implies .
The HHL algorithm requires coherent, efficient and repeatable preparation of the normalized state , normally through a known preparation circuit and its inverse; possession of a single unknown physical specimen does not supply that access. The component of on any discarded or unresolved small-eigenvalue subspace must also be negligible. Here is a unitary operator, so it is invertible and all its singular values equal one, giving condition number .
Standard HHL is stated for a Hermitian matrix with an efficient sparse-access or block encoding oracle. A non-Hermitian can be embedded in the Hermitian block matrix
part (a) supplies efficient access to . With inverse-polynomial target precision, phase bits, and an efficient preparation oracle for , the runtime is . The output is the normalized quantum state proportional to the solution , rather than a classical list of all its amplitudes.
Implement the assumed efficient classical algorithm for as a reversible circuit. On input , it computes an -bit binary expansion of the angle in a work register using Toffoli gates and elementary reversible gates. Write the computed angle as a sum of binary-weighted angles. For each angle bit, apply the corresponding controlled single-qubit rotation to the target. These rotations have the same axis, so their angles add and produce
Finally apply uncomputation to erase the work register. Each Toffoli gate and controlled rotation has a constant-size decomposition into one- and two-qubit gates when arbitrary one-qubit rotations are available. Ignoring the stipulated precision costs, the resulting circuit has size and returns every quantum ancilla to zero.

Articles by others on the same topic (0)

There are currently no matching articles.