The Exercise
The problem is to build any unitary on qubits, to within a distance , from one and two qubit gates, by way of a Hamiltonian that generates it. One writes with Hermitian and its eigenvalues between and , and expands with real coefficients , where runs over the tensor products of Pauli matrices drawn from , , and .
Fix a positive integer and set . Each factor is a circuit of one and two qubit gates. The product of these factors over all , in a fixed order, is the Trotter product; it differs from by , and its th power differs from by . With large enough to bring this error below , the whole circuit has gates.✦
The library states each of these steps as a theorem, and the circuit for a single factor as two: one for the unitary it computes, one for its gate count.
A Register of Qubits
A quantum system is a physical system whose state space is a finite dimensional complex Hilbert space.✦ The qudit with levels is the quantum system whose state space is itself, with its standard inner product, and a register of qubits is the qudit with levels.✦ The computational basis of a register of qubits is the standard basis of , with vectors labelled by bit strings ; the qubits of the register are its wires .
A unitary of is an operator on the state space of with .✦ An observable of is a self adjoint operator, , on the state space of .✦ The propagator of an observable from time to time is the unitary ; with , and it is .✦ The matrix of an observable of the qudit with levels is the matrix of in the standard basis of , with rows and columns labelled by bit strings when the qudit is a register.✦
The Pauli matrices are the four matrices (1) A Pauli string on qubits is a tensor product of one Pauli matrix for each wire, given by its indices ; its matrix elements between computational basis states are .✦ The support of is the set of wires with .✦ For a real number , the Hamiltonian is the observable of the register whose matrix is times that of .✦
The Generator and Its Pauli Expansion
Theorem 1. Let be a unitary of a quantum system . Then there is an observable of with (2)✦ where is the spectrum of , its set of eigenvalues.
Theorem 2. Let be an observable of a register of qubits. Then there are real numbers , one for each Pauli string on qubits, such that the matrix of is (3)✦
A Circuit for One Pauli String
A single qubit gate on wire of a register is the unitary of the register that acts as on qubit and as the identity on the others: when the bit strings and agree on every wire but , and otherwise.✦ The Pauli vector is ; for a vector in three dimensions with real components , the matrix is , and the rotation by an angle about an axis is ; about the axis, , it is .
The basis change gates are made from the Hadamard gate and the phase gate : (4) The basis change layer of a Pauli string on qubits is , the gate of (4) on each wire .
For a set of control wires and a target wire outside , the multiply controlled NOT is the permutation of bit strings that flips bit when every control bit is , (5) and leaves the other bits unchanged; here is addition modulo . The gate of the multiply controlled NOT with controls and target is the unitary of the register that permutes the computational basis states in the same way.✦ The CNOT gate with control and target is the case of one control, .✦
For a wire and a list of other wires, the CNOT fan adds the bits on to the bit on , modulo .✦ The circuit for a Pauli string on the wires , with the collector wire on which the rotation acts, at an angle , is (6)✦
Theorem 3. Let be a Pauli string on qubits whose support consists of the distinct wires , and let and be real numbers. Then the circuit (6) for with collector wire and wires satisfies (7)✦
A unitary of a register has gate budget , written , when it is built, up to an isomorphism of registers (a unitary identification of their state spaces), as a product of pieces of two kinds, with at most gates counted in pieces of the first kind and at most in pieces of the second. A piece of the first kind is a classical block: a unitary that sends each computational basis state to , where is what a sequence of NOT, CNOT and Toffoli gates (multiply controlled NOT gates with at most two controls) makes of , counted as the number of gates in the sequence.✦ A piece of the second kind is a single qubit gate, possibly beside idle qubits and possibly controlled by one further qubit, counted as one.
Theorem 4. Let be a Pauli string on a register of qubits, a wire, wires other than , and a real number. Then the circuit for with collector wire and wires satisfies (8)✦
The Trotter Product
Let real coefficients be given, one for each Pauli string on qubits. The Trotter factor of at time is the circuit for , with the first wire of its support as collector wire and the rest of the support as the other wires; for the identity string, whose support is empty, it is the global phase gate .✦ The Trotter step is the product of the factors over all Pauli strings, (9)✦
The norm of an operator is its operator norm, the largest length of over unit vectors , and the gate error between unitaries and is .✦ A fixed numerical constant appears in the error bounds of Theorems 6 and 7.
Theorem 5. Let be an observable of a register of qubits. Then there are real numbers , one for each Pauli string , and a constant such that for every with (10)✦
Theorem 6. Let be a unitary of a register of qubits. Then there are real numbers , one for each Pauli string , such that for every positive integer (11)✦
Theorem 7. Let be a unitary of a register of qubits. Then there are real numbers , one for each Pauli string , such that for every there is a positive integer for which the th power of the Trotter step of these coefficients, with and , satisfies (12)✦
What Is Checked
The seven theorems are stated over the unitaries and observables of a quantum system and of a register of qubits, the propagator , the Pauli strings and their Hamiltonians , the circuit of (6), the Trotter step of (9) built from it, the gate error and the gate budget.
About these constructions the library proves that the propagator of an observable is a unitary, that a Pauli string is Hermitian, so that is an observable, and that the adjoint of a unitary is a unitary. It proves that the multiply controlled NOT is its own inverse, so that its gate is a unitary, and that the basis change gates, the rotations , a single qubit unitary placed on one wire and the global phase gate are unitaries of the register.