matrices.gen_pauli

Produces the generalized Pauli operator matrices.

Functions

gen_pauli(k_1, k_2, dim)

Produce generalized Pauli operator [1].

Module Contents

matrices.gen_pauli.gen_pauli(k_1, k_2, dim)

Produce generalized Pauli operator [1].

Generates a dim-by-dim unitary operator. More specifically, it is the operator \(X^k_1 Z^k_2\), where \(X\) and \(Z\) are the “gen_pauli_x” and “gen_pauli_z” operators that naturally generalize the Pauli X and Z operators. These matrices span the entire space of dim-by-dim matrices as k_1 and k_2 range from 0 to dim-1, inclusive.

Note that the generalized Pauli operators are also known by the name of “discrete Weyl operators”. (Lecture 6: Further Remarks On Measurements And Channels from [3])

Examples

The generalized Pauli operator for k_1 = 1, k_2 = 0, and dim = 2 is given as the standard Pauli-X matrix

\[\begin{split}G_{1, 0, 2} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}.\end{split}\]

This can be obtained in toqito as follows.

>>> from toqito.matrices import gen_pauli
>>> dim = 2
>>> k_1 = 1
>>> k_2 = 0
>>> gen_pauli(k_1, k_2, dim)
array([[0.+0.j, 1.+0.j],
       [1.+0.j, 0.+0.j]])

The generalized Pauli matrix k_1 = 1, k_2 = 1, and dim = 2 is given as the standard Pauli-Y matrix

\[\begin{split}G_{1, 1, 2} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}.\end{split}\]

This can be obtained in toqito as follows.

>>> from toqito.matrices import gen_pauli
>>> dim = 2
>>> k_1 = 1
>>> k_2 = 1
>>> gen_pauli(k_1, k_2, dim)
array([[ 0.+0.0000000e+00j, -1.+1.2246468e-16j],
       [ 1.+0.0000000e+00j,  0.+0.0000000e+00j]])

References

[1] (1,2)

Wikipedia. Generalizations of Pauli matrices. URL: https://en.wikipedia.org/wiki/Generalizations_of_Pauli_matrices.

[2]

John Watrous. Theory of quantum information lecture notes. 2011. URL: https://cs.uwaterloo.ca/~watrous/TQI-notes/.

Parameters:
  • k_1 (int) – (a non-negative integer from 0 to dim-1 inclusive).

  • k_2 (int) – (a non-negative integer from 0 to dim-1 inclusive).

  • dim (int) – (a positive integer indicating the dimension).

Returns:

A generalized Pauli operator.

Return type:

numpy.ndarray