Sequence of Gates as Matrix Multiplication
When writing quantum programs for your applications, knowing how the qubelets end up helps you decide when and where to inject quantum effects so that your program returns the optimal solution with a high likelihood. So having a way to succinctly describe how a quantum gate acts on any quantum state of a qubit is useful. The real value, though, of holding a gate’s “genomic code” is figuring out how a sequence of gates modifies a qubit’s quantum state. For example, consider the quantum circuit shown in the following figure:
Working out the cumulative effect of these gates on the qubit is cumbersome. If you write a program for this circuit and run it, you’ll only get the collapsed state of the qubit, as you won’t know the rotation of qubelets before you measure it. But, the gate matrices reveal how the qubits end up without collapsing the qubelets.
To see how to compute the action of these gates on the qubit, start with the first gate, H. The quantum state after the H gate acts on the qubit is:
Vectors Versus Kets—Notational Convenience ...