The Exercise
A qubit passes through two Hadamard gates, one after the other. The exercise is to show that it comes out in the state it went in with, whatever that state was.
A Quantum System
A quantum system is a physical object whose state space is a finite dimensional complex Hilbert space.✦ For a finite dimensional complex Hilbert space , the system with model space is the quantum system whose state space is itself.✦ The qubit is the two level quantum system with model space , the standard two dimensional complex Euclidean space.✦
A unitary of a quantum system , the evolution of as a closed system, is an operator on the state space of with (1)✦ where is the identity operator.
The Hadamard Gate
The Hadamard gate is the unitary of the qubit whose operator has, in the standard basis of , the matrix (2)✦
The Claim
The square is the Hadamard gate applied twice in succession.
Theorem 1. The square of the Hadamard gate of the qubit is the identity, (3)✦
What Is Checked
The claim (3) is stated over the Hadamard gate as a unitary of the qubit, the operator on with matrix (2). About this construction the library states that the matrix (2) is unitary, that is, it satisfies , and that the operator of a unitary matrix is unitary, so that satisfies (1).