liveBook · Manning

Phase gate

As explained in Building Quantum Software with Python

The Z gate is a single-qubit quantum gate that multiplies the amplitude of the one basis state by negative one.

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)].

How Building Quantum Software with Python covers it

How deep it goes
Explains amplitude signs, geometric direction, probability preservation, and a direct state-list implementation.
Examples
Demonstrates negating the second state-list entry and transforming [sqrt(0.3), sqrt(0.7)].
What you can do after
Apply the gate via a two-entry state-list transformation and verify direction reversal while preserving probabilities.
How it connects
Connects single-qubit gates with amplitudes, probabilities, and the phase gate.

Also explained in

Compare how 2 books explain phase gate →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Quantum Software with Python. The section links point to the parts of the book it draws on.