The Exercise
An operator on a quantum system that is both unitary and Hermitian is at once a gate and an observable, and as an observable its eigenvalues are . The exercise measures the observable with a circuit that uses only as a gate. A control qubit is prepared in beside the system, which is in a pure state . A Hadamard gate acts on the control, then the controlled gate that applies to the system when the control is , then a second Hadamard gate on the control; last, the control is measured in the computational basis.
The exercise is to show that this is a measurement of on . The outcome comes with the probability of the eigenvalue and the outcome with that of . After the outcome the control is left in or , and the system in projected onto the matching eigenspace and normalized.
The library states this for a target system of any finite dimension, and compares the two measurements outcome by outcome: in the probability of each outcome and in the state it leaves.
Systems and States
A quantum system is a physical system whose state space is a finite dimensional complex Hilbert space.✦ The composite system of two systems and is the system whose state space is the tensor product of theirs.✦ The qubit is the two level system with state space ; its basis states and are the standard basis vectors of .
A pure state of is a unit vector in the state space of .✦ A state of is a positive operator of unit trace on the state space of , and a pure state gives the state , the projector onto it. For pure states of and of , the product is the pure state of whose vector is the tensor product of the two.✦
Gates
A unitary of is an operator on the state space of with ; it carries a pure state of to the pure state . Given two unitaries and of , the unitary after is the product , first and then .✦ The identity evolution of is the unitary .✦ The product unitary of a unitary of and a unitary of is the unitary of whose operator is the tensor product of the two, and a gate on the first wires of is the unitary , with the identity evolution on .
The Hadamard gate is the unitary of the qubit whose matrix in the basis is (1)✦ For a unitary of , the controlled gate is the unitary of (2)✦ The circuit of the exercise is the unitary of (3)✦
Measurements
A measurement on with a finite set of outcomes is a family of operators on the state space of , one for each outcome , that satisfies the completeness relation (4)✦ The positive operator valued measure (POVM) of has the elements .✦ Performed on a state of , the measurement gives the outcome with the probability (5) and when the state after the outcome is (6)
The measurement of in an orthonormal basis is the measurement with the operators .✦ The measurement on the first wires of made from a measurement on with operators is the measurement with the same outcomes and the operators .✦ The measurement of the control is the measurement of in the basis of the qubit, made on the first wires, so that its operators are and .✦ Write for its probabilities and for the states after its outcomes.
Observables
An observable on is a Hermitian operator on the state space of , .✦ Its two operators (7) are, when , the projectors onto its eigenspaces for and . For such an , the measurement of is the measurement on with the operators and , the outcome standing for the eigenvalue and the outcome for .✦
The state after the outcome of , measured on a pure state of with , is the normalized pure state (8)✦ The state after the outcome is formed in the same way from , when .✦
A unitary of that is Hermitian is an observable with the same operator, and since and it squares to the identity, (9) Its measurement is the measurement of this observable. Write for its probabilities, for the projectors (7) with , and for the states it leaves on .
The Claim
Theorem 1. Let be a Hermitian unitary of a system and a pure state of , and let be the state of that the circuit makes from , with . Measuring the control on gives each outcome with the probability that the measurement of gives it on , (10)✦ If and the outcome has nonzero probability, the state after it is (11)✦ and if and the outcome has nonzero probability, the state after it is (12)✦
What Is Checked
The claim is stated over the circuit of (3), made of the Hadamard gate (1) and the controlled gate (2), and over two measurements: that of the control, and that of with its states of (8), both with the probabilities (5) and the states after an outcome (6).
About these constructions the library proves that is unitary, , and that a Hermitian unitary squares to the identity, (9).