06 · Composition
Circuits
A circuit is just gates in order — multiply the unitaries. Same idea as the agent loop: small operations, sequenced, until you measure.
In English
A circuit is gates in a sequence, like a recipe. Do H then X is a different dish from X then H. At the end you measure. Same idea as stacking steps in an agent — small operations, in order.
- Try this
- Add two or three gates. Run. Swap their order and run again. The landing spot should change.
- Keep this
- A circuit is multiply-the-rotations, then look.
Lab · a wire
Click a gate on the wire to remove it
0.71|0⟩ + 0.71|1⟩
|0⟩0.7150%|1⟩0.7150%
A circuit is a word in the gate alphabet. Left to right on the wire is right to left in matrix multiplication, depending on your convention — here we apply in the order you added.
Universal single-qubit control needs rotations about two axes (H and T are enough, slowly). Two-qubit universality needs one entangling gate, usually CNOT. The Deutsch chapter uses both.