liveBook · Manning

Y gate

As explained in Building Quantum Software with Python

The Y gate is a single-qubit quantum gate that rotates the two amplitudes in opposite quarter turns and then swaps them.

The Y gate transforms a single-qubit state by rotating the 0 amplitude counterclockwise 90°, rotating the 1 amplitude clockwise 90°, and swapping them. section 3.2.2

Apply the transformation in two conceptual stages:

  • Rotate the 0-side amplitude counterclockwise by 90° and the 1-side amplitude clockwise by 90°. section 3.2.2
  • Swap the resulting amplitudes; the probabilities therefore exchange positions while their directions also change. section 3.2.2

State transformation

For a two-entry state representation, simulate the Y transformation with `state = [-1j*state[1], 1j*state[0]]`. The first output uses the rotated second amplitude, and the second uses the rotated first. section 3.2.2

Figure 3.25 The general form of the effect of the Y gate on a pair of amplitudes
figure

Visualize the general Y-gate transformation of an amplitude pair before applying the computational form. section 3.2.2

How Building Quantum Software with Python covers it

How deep it goes
Explains the two-step amplitude operation and gives its state-vector assignment, stopping short of a broader derivation.
Examples
Uses amplitude-pair diagrams, probability-direction diagrams, and a concrete state transformation.
What it assumes
Assumes a single-qubit state represented as an ordered pair of amplitudes.
What you can do after
Apply the gate to a two-entry single-qubit state using the provided transformation.
How it connects
Connects amplitude directions and probabilities with other single-qubit gates such as RZ, while emphasizing probability swapping.

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.