qalgebra.library.pauli_matrices module

Constructors for Pauli-Matrix operators on any two levels of a system

Summary

Functions:

PauliX

Pauli-type X-operator.

PauliY

Pauli-type Y-operator

PauliZ

Pauli-type Z-operator

__all__: PauliX, PauliY, PauliZ

Reference

qalgebra.library.pauli_matrices.PauliX(local_space, states=None)[source]

Pauli-type X-operator.

\[\begin{split}\hat{\sigma}_x = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}\end{split}\]

on an arbitrary two-level system.

Parameters
  • local_space (str or int or LocalSpace) – Associated Hilbert space. If str or int, a LocalSpace with a matching label will be created.

  • states (None or tuple[int or str]) – The labels for the basis states for the two levels on which the operator acts. If None, the two lowest levels are used.

Returns

Local X-operator as a linear combination of LocalSigma

Return type

Operator

qalgebra.library.pauli_matrices.PauliY(local_space, states=None)[source]

Pauli-type Y-operator

\[\begin{split}\hat{\sigma}_x = \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}\end{split}\]

on an arbitrary two-level system.

See PauliX()

qalgebra.library.pauli_matrices.PauliZ(local_space, states=None)[source]

Pauli-type Z-operator

\[\begin{split}\hat{\sigma}_x = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}\end{split}\]

on an arbitrary two-level system.

See PauliX()