Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

L5-02 · Gates and circuit order

Apply unitary gates in the correct order.

Level 5 icon Level 5 · Advanced undergraduate
Objective. Apply unitary gates in the correct order.
Before this lesson. L5-01, L3-03
Hands-on lab. Qubits and the Bloch sphere

Learn

A closed quantum system evolves through a unitary matrix. A matrix U is unitary when its conjugate transpose times U is the identity. This property preserves vector length and total probability. A circuit records an ordered sequence of such operations.

The X gate exchanges |0> and |1>. The Hadamard gate H makes equal superpositions from these basis states. The Z gate changes the sign of the |1> amplitude. These changes affect later measurements even when current probabilities stay unchanged.

With column vectors, the rightmost matrix acts first. Circuit drawings usually show time from left to right. State this convention before multiplying gates. Measurement and noise are generally not unitary operations on the measured system alone.

Practice

Solution

The combined operation is HZH = X. The X gate maps |1> to |0>. The final state is |0>, so the outcome is 0 with probability one.

Check your understanding

Which matrix acts first in U V |psi>?

Show the answer

C. V

For column vectors, evaluate the expression from the right. V first changes the state, and U acts on that result.

Sources

This lesson draws on Basics of quantum information, n.d.Watrous, 2018.

Next: L5-03 · Phase and interference

References
  1. Basics of quantum information. (n.d.). https://quantum.cloud.ibm.com/learning/en/courses/basics-of-quantum-information
  2. Watrous, J. (2018). The Theory of Quantum Information. https://cs.uwaterloo.ca/~watrous/TQI/