The Exercise
A function from one bit to one bit is constant when and balanced when . There are four of them: the constants and , the identity and the negation , where is the sum modulo . Given only as a black box acting on two qubits, Deutsch’s algorithm tells the two kinds apart with a single use of the box. The exercise is to build this circuit from optical elements acting on single photons.
The library gives a black box, an oracle, for each of the four functions, and writes the two balanced ones as a controlled phase shift of angle , the optical Kerr gate, between Hadamard gates. It realises the Hadamard gate on one photon in two modes by a beamsplitter and a mirror, and states for each oracle which bit the measurement of the first qubit returns.
A Quantum System
A quantum system is given by its state space, a finite dimensional complex Hilbert space.✦ The composite system of two systems and is the system whose state space is the tensor product of their state spaces.✦ The qubit is the two level system with state space , and its basis states and are the two standard basis vectors.
A pure state of is a unit vector in the state space of , and pure states of and of give the product state of . A state of is a positive operator of unit trace on the state space of .✦ A pure state gives the state , the projector onto its vector.✦
A unitary of is an operator on the state space of with ; it carries a pure state to the pure state . For two unitaries and of , the product is the unitary that applies first and then , and the identity evolution is the unitary whose operator is the identity. Unitaries of and of give the product unitary of ; with the identity on the other factor, is on the first factor and is on the last. On two copies of one system, the SWAP is the unitary that exchanges the factors, .✦
Gates
The Hadamard gate and the Pauli , the quantum NOT, are the unitaries of the qubit whose matrices in the basis are (1) For a real angle , the phase shift is the unitary of the qubit that leaves alone and multiplies by .✦
For a unitary of a system , the controlled gate is the unitary of the composite system of a control qubit and a target given by (2)✦ The controlled NOT, or CNOT, is , and the controlled phase shift with angle is .
For angles , and , the optical Kerr gate is the unitary of two qubits that applies the controlled phase shift and then a phase shift on each qubit: (3)✦
Single Photons
A single photon shared between two optical modes is described on the composite system of two qubits, one for each mode, standing for a photon in the mode and for none. The dual rail logical zero is a photon in the second mode, and the logical one a photon in the first. For complex amplitudes and with , the dual rail state is the pure state of the two modes with these amplitudes, the general state of one photon in two modes.✦
The beamsplitter with mixing angle is the unitary of the two modes with operator (4) where is the projector onto the dual rail plane, spanned by and , and is the generator of rotations in that plane. Followed by a mirror that exchanges the two modes, the SWAP, the beamsplitter at gives the unitary .✦
The Oracles and the Circuit
For a function from one bit to one bit, a unitary of two qubits is an oracle for when, for all bits and , (5)✦ The library defines one unitary of two qubits for each function on one bit: (6) (7) (8) (9)
The Deutsch circuit for a unitary of two qubits applies a Hadamard gate to each qubit, then , then a Hadamard gate to the first qubit alone: (10)✦
Measuring the Control Qubit
A measurement on a system with a finite set of outcomes is a family of operators on the state space of , one for each outcome , with , the completeness relation.✦ Performed on a state of , it gives the outcome with the probability (11) of the Born rule, where the positive operators make up the positive operator valued measure of the measurement.
The projective measurement in an orthonormal basis is the measurement whose operator for the outcome is the projector .✦ A measurement with operators on gives the measurement on the first factor of , with the same outcomes and the operators .✦ The measurement of the control qubit on the composite system of a qubit and a system is the projective measurement of the qubit in the basis performed on the first factor: its outcomes are and , its operators and .✦
The Claim
Theorem 1. The beamsplitter at mixing angle followed by the mirror acts on the dual rail qubit as the Hadamard gate (1): (12)✦ (13)✦
Theorem 2. Each of the four unitaries is an oracle for its function: for all bits and , (14)✦ (15)✦ (16)✦ (17)✦
Theorem 3. The two balanced oracles are made from the Kerr gate between Hadamard gates on the second qubit, the oracle for the negation with a NOT gate on the first qubit before and after: (18)✦ (19)✦
Theorem 4. Let the Deutsch circuit act on the product state , write for its output with the oracle , and let be the probability of the outcome when the control qubit is measured on the state . For the constant oracles the outcome is with certainty, and for the balanced oracles it is : (20)✦ (21)✦ (22)✦ (23)✦
What Is Checked
The claim is stated over the Deutsch circuit (10) with the four oracles (6) to (9), the oracle condition (5), and the Born probability (11) of the measurement of the control qubit; on the optical side, over the Kerr gate (3) between Hadamard gates and over the beamsplitter (4) with its mirror acting on the dual rail states.
About these constructions the library proves that the beamsplitter operator is unitary for every angle and that is unitary for every unitary . It proves that the dual rail superposition is a unit vector whenever , and that the amplitudes and then satisfy the same condition. A measurement on the first factor, the measurement of the control qubit among them, again satisfies the completeness relation.