You are reading without signing in. Sign in or continue as guest to take quizzes and keep XP.
Pauli gates: X, Y, Z
The three flips every circuit is built from, as matrices and as Bloch rotations.
- Write the X, Y and Z matrices and apply them to |0⟩ and |+⟩.
- Explain why Z does nothing visible to |0⟩ but flips |+⟩ to |−⟩.
- Use the gate cards in the composer to check your answers.
X is the quantum NOT: it swaps the amplitudes of |0⟩ and |1⟩. Z leaves |0⟩ alone and multiplies |1⟩ by −1, so it changes only phase; on |+⟩ that phase flip turns it into |−⟩. Y does both at once, with a factor i you will rarely need to track by hand.
Z is invisible until you look sideways
Simulate: the histogram shows only 0, exactly as without the Z. Now insert an H before the measurement (palette → H on q0, after Z) and simulate again: Z turned |+⟩ into |−⟩, so H brings it to |1⟩.
OPENQASM 3.0; include "stdgates.inc"; qubit[1] q; bit[1] c; h q[0]; z q[0]; c[0] = measure q[0];
What is Z|+⟩?
Sign in to answer and earn XP; you will come back to this lesson.
Applying X twice to any state gives…
Sign in to answer and earn XP; you will come back to this lesson.
X flips, Z flips the phase, Y does both. Phase flips are invisible in the Z basis and visible after an H.
Up next: Phase and rotation gates