liveBook · Manning

X gate

The X gate is a single-qubit quantum gate that exchanges the computational-basis states zero and one.

How 2 Manning books explain it

Quantum Programming in Depth

An X gate is a single-qubit bit-flip quantum gate that exchanges the computational-basis states zero and one.

How it is used
Uses the X gate for bit flips, measurement-result normalization, and distinguishing candidate unitary operations.
How deep it goes
Explains basis-state action and implements X within single- and two-qubit discrimination circuits, without developing its matrix representation.
Examples
Uses X-versus-Z, X-versus-H, and X-versus-minus-X discrimination experiments with measured circuit outcomes.
What you can do after
Apply it via Qiskit or Q# and test discrimination circuits through measurement outcomes and passing automated tests.

Read how Quantum Programming in Depth explains x gate →

Building Quantum Software with Python

The X gate is a single-qubit quantum gate that swaps the amplitudes associated with the two computational-basis outcomes.

How it is used
Uses the X gate to transform a single-qubit state by exchanging its computational-basis amplitudes.
How deep it goes
Defines the amplitude swap, implements it with a list assignment, and verifies reversibility by applying the transformation twice.
Examples
Demonstrates the gate with two-item state lists, the default state [0, 1], and successive swaps returning [1, 0].
What you can do after
Builds a direct state-list simulation and verifies that applying the X gate twice restores the initial amplitudes.

Read how Building Quantum Software with Python explains x gate →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.