matrices.clock

Clock matrix.

Module Contents

Functions

clock(dim)

Produce clock matrix [1].

matrices.clock.clock(dim)

Produce clock matrix [1].

Returns the clock matrix of dimension dim described in [1]. The clock matrix generates the following dim-by-dim matrix

\[\begin{split}\Sigma_{1, d} = \begin{pmatrix} 1 & 0 & 0 & \ldots & 0 \\ 0 & \omega & 0 & \ldots & 0 \\ 0 & 0 & \omega^2 & \ldots & 0 \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & 0 & \ldots & \omega^{d-1} \end{pmatrix}\end{split}\]

where \(\omega\) is the n-th primitive root of unity.

The clock matrix is primarily used in the construction of the generalized Pauli operators.

Examples

The clock matrix generated from \(d = 3\) yields the following matrix:

\[\begin{split}\Sigma_{1, 3} = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \omega & 0 \\ 0 & 0 & \omega^2 \end{pmatrix}\end{split}\]
>>> from toqito.matrices import clock
>>> clock(3)
[[ 1. +0.j       ,  0. +0.j       ,  0. +0.j       ],
 [ 0. +0.j       , -0.5+0.8660254j,  0. +0.j       ],
 [ 0. +0.j       ,  0. +0.j       , -0.5-0.8660254j]]

References

[1] (1,2,3)

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

Parameters:

dim (int) – Dimension of the matrix.

Returns:

dim-by-dim clock matrix.

Return type:

numpy.ndarray