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
Visualize the general Y-gate transformation of an amplitude pair before applying the computational form. section 3.2.2
