The operators act on different qubits and therefore commute, so
Since ,
The scalar is a global phase. Thus each factor uses two Hadamard gates and one phase gate, and applying the factors in parallel or sequentially gives an exact quantum circuit of elementary gates.
Each summand of acts on one qubit, while each summand of acts on two. Therefore is a 2-local Hamiltonian. We have
Split into steps of length and use the second-order product formula
For one step, in the stated estimate, so the spectral-norm error is . The error bound for a product of unitary operators makes the total error
It is therefore enough to choose
with also large enough that the small-step estimate applies.
All terms commute. A factor uses a constant-size circuit of two controlled-NOT gates and one phase gate, up to a global phase, so one product-formula step costs gates. The complete Hamiltonian simulation consequently has size
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 .
Write . Applying the phase gate
to qubit contributes . The product of these gates is therefore
Similarly, for and , apply a controlled phase gate
between every pair . The accumulated phase is
The controlled phase gates implement