Gate Order When Operations Do Not Commute
Two gates can yield different output vectors when applied in reverse order. A circuit must specify which gate acts first.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace from zero
Applying X and then Z takes \(\lvert0\rangle\) to \(-\lvert1\rangle\). Applying Z and then X leaves \(\lvert1\rangle\) in this example. See X and Z.
Interpret the sign
Here the two outputs differ by a global phase and cannot be distinguished as isolated pure states by measurement. Other ordered gate pairs can differ observably. Composition order provides the general algebraic distinction.[1][2]