The Z gate multiplies the amplitude for the |1⟩ basis state by −1 while leaving the |0⟩ amplitude unchanged. Its magnitude and probability remain the same, but its direction reverses by 180°. section 3.2.2
Apply the transformation directly to a two-amplitude single-qubit state:
- Verify the reversed direction without changing the amplitude magnitude or measurement probability. section 3.2.2
State-list example
For a state whose amplitudes are represented as [sqrt(0.3), sqrt(0.7)], applying the Z gate produces [sqrt(0.3), -sqrt(0.7)].

