The Exercise
Two qubits pass through a controlled NOT (CNOT) gate , the first qubit as control and the second as target. On the pair act the Pauli operators and on the first qubit and and on the second. The exercise is to compute the image of each of the four under conjugation by the gate, with the adjoint of , and to write it as a product of the same four operators.
Conjugation says how an operator applied before the gate looks after it.
Two Qubits
The matrix of an operator on two qubits, whose rows and columns are labelled by pairs of bits , is with both relabelled through , so that they follow the computational basis in the order (1)✦
On a single qubit, the identity , the bit flip and the phase flip are the complex matrices (2) in the basis .
A Pauli operator on one qubit of the pair is the tensor product of or on that qubit with on the other, written as a matrix in the order (1): (3)✦ (4)✦ (5)✦ (6)✦
The CNOT gate with the first qubit as control is the matrix that exchanges and and fixes and , so that it flips the second qubit exactly when the first is : (7)✦
The Claim
Theorem 1. Let be the CNOT gate (7) and let , , and be the Pauli operators (3), (4), (5) and (6). Then (8)✦ (9)✦ (10)✦ and (11)✦
What Is Checked
The claim is stated over the matrix of the CNOT gate (7) and the four Pauli operators (3), (4), (5) and (6), each a tensor product of matrices from (2) written in the order (1).
About these matrices the library proves the four relations (8), (9), (10) and (11), each an equality of complex matrices.