Header menu logo Encodings

Pauli Type

Single-qubit Pauli operators forming the Pauli group.

The four single-qubit Pauli matrices form a basis for all 2×2 Hermitian matrices:

  • I = identity matrix [[1,0],[0,1]]
  • X = bit-flip (NOT) [[0,1],[1,0]]
  • Y = bit+phase flip [[0,-i],[i,0]]
  • Z = phase-flip [[1,0],[0,-1]]

The multiplication table is cyclic: XY = iZ, YZ = iX, ZX = iY. Two distinct non-identity Paulis always anti-commute: XY = -YX. Each Pauli squares to identity: X² = Y² = Z² = I.

Union cases

Union case Description

I

Full Usage: I

Identity operator (no operation).

X

Full Usage: X

Pauli-X (bit-flip, NOT gate, σₓ).

Y

Full Usage: Y

Pauli-Y (bit and phase flip, σᵧ).

Z

Full Usage: Z

Pauli-Z (phase-flip, σᵤ).

Instance members

Instance member Description

this.IsI

Full Usage: this.IsI

Returns: bool
Returns: bool

this.IsX

Full Usage: this.IsX

Returns: bool
Returns: bool

this.IsY

Full Usage: this.IsY

Returns: bool
Returns: bool

this.IsZ

Full Usage: this.IsZ

Returns: bool
Returns: bool

Static members

Static member Description

l * r

Full Usage: l * r

Parameters:
    l : Pauli - The left Pauli operator.
    r : Pauli - The right Pauli operator.

Returns: Pauli * Phase A tuple (resultOp, phase) where resultOp is the resulting Pauli operator and phase is the phase factor from the multiplication.

Multiplies two Pauli operators, returning the result operator and phase.

Pauli multiplication follows these rules:

  • Any Pauli times I equals itself: P · I = I · P = P
  • Any Pauli squared is identity: X² = Y² = Z² = I
  • Cyclic products: XY = iZ, YZ = iX, ZX = iY
  • Anti-commutation: YX = -iZ, ZY = -iX, XZ = -iY

l : Pauli

The left Pauli operator.

r : Pauli

The right Pauli operator.

Returns: Pauli * Phase

A tuple (resultOp, phase) where resultOp is the resulting Pauli operator and phase is the phase factor from the multiplication.

Pauli.Apply

Full Usage: Pauli.Apply

Returns: string -> Pauli option Some Pauli if valid; None otherwise.

Parses a Pauli operator from its string representation.

Returns: string -> Pauli option

Some Pauli if valid; None otherwise.

Pauli.FromChar

Full Usage: Pauli.FromChar

Returns: char -> Pauli option Some Pauli if valid; None otherwise.

Parses a Pauli operator from a single character.

Returns: char -> Pauli option

Some Pauli if valid; None otherwise.

Pauli.FromString

Full Usage: Pauli.FromString

Returns: string -> IxOp<uint32, Pauli> option A parser function for indexed Pauli strings.

Parses an indexed Pauli operator from string format "P_n" (e.g., "X_0", "Z_3").

Returns: string -> IxOp<uint32, Pauli> option

A parser function for indexed Pauli strings.

Pauli.Identity

Full Usage: Pauli.Identity

Returns: Pauli

Gets the identity Pauli operator.

Returns: Pauli

Type something to start searching.