Phase Type
The global phase factor attached to a Pauli product.
When multiplying Pauli matrices, the result is another Pauli matrix times a phase in {+1, -1, +i, -i}. For example: X · Y = iZ (phase = +i).
Phases are tracked as a discriminated union enabling exact (no floating-point error) phase arithmetic. The multiplication table forms a cyclic group Z₄:
P1 * P1 = P1 Pi * Pi = M1
P1 * M1 = M1 Pi * Mi = P1
M1 * M1 = P1 Mi * Mi = M1
Union cases
| Union case |
Description
|
Full Usage:
M1
|
Phase factor -1. |
Full Usage:
Mi
|
Phase factor -i (negative imaginary). |
Full Usage:
P1
|
Phase factor +1 (identity phase). |
Full Usage:
Pi
|
Phase factor +i (positive imaginary). |
Instance members
| Instance member |
Description
|
|
Folds this phase into a complex global phase by multiplication. Converts the symbolic phase to its numeric effect: P1 → globalPhase, M1 → -globalPhase, Pi → i·globalPhase, Mi → -i·globalPhase.
|
Full Usage:
this.IsComplex
Returns: bool
true for Pi (+i) and Mi (-i); false for P1 (+1) and M1 (-1).
|
Gets whether this phase is purely imaginary.
|
Full Usage:
this.IsM1
Returns: bool
|
|
Full Usage:
this.IsMi
Returns: bool
|
|
Full Usage:
this.IsP1
Returns: bool
|
|
Full Usage:
this.IsPi
Returns: bool
|
|
Full Usage:
this.IsPositive
Returns: bool
true for P1 (+1) and Pi (+i); false for M1 (-1) and Mi (-i).
|
Gets whether this phase has a positive real or imaginary part.
|
Static members
| Static member |
Description
|