Generalized Pauli matrices (rqutils.paulis)

Fundamentals

Generalized \(n\)-dimensional Pauli matrices \(\lambda^{(n)}_{k}\) (\(0 \leq k \leq n^2 - 1\)) are defined recursively:

  • \(\lambda^{(n)}_{0} = \sqrt{\frac{2}{n}} \mathrm{diag}(1, \dots, 1, 1)\)

  • \(\lambda^{(n)}_{k} = \mathrm{blkdiag}(\lambda^{(n-1)}_{k}, 0)\) for \(1 \leq k < (n-1)^2\)

  • \((\lambda^{(n)}_{(n-1)^2 + k})_{ab} = \xi_k \delta_{k//2, a}\delta_{n-1, b} + \eta_k \delta_{n-1, a}\delta_{k//2, b}\) for \(0 \leq k < 2(n-1)\), with \(\xi_k = \eta_k = 1\) (\(k\) even) and \(-\xi_k = \eta_k = i\) (\(k\) odd)

  • \(\lambda^{(n)}_{n^2-1} = \sqrt{\frac{2}{n(n-1)}} \mathrm{diag}(1, \dots, 1, -n+1)\)

These matrices satisfy the normalization condition

\[\mathrm{tr}(\lambda^{(n)}_k \lambda^{(n)}_l) = 2 \delta_{k, l}\]

and thus form an orthonormal basis for the space of \(n\)-dimensional Hermitian matrices.

Implications of the normalization

Any \(n\)-dimensional Hermitian matrix \(H\) can be decomposed into a form

\[H = \sum_{k=0}^{n^2-1} \nu_k \lambda^{(n)}_k.\]

To extract the coefficient \(\nu_k\), one needs to compute

\[\nu_k = \frac{1}{2} \mathrm{tr}(\lambda^{(n)}_k H),\]

i.e., divide the product trace by 2.

Also, note that \(\lambda^{(n)}_{0}\) is not the \(n\)-dimensional identity matrix but differ from it by a factor \(\sqrt{\frac{2}{n}}\).

Pauli products

A physical composite system of \(s\) subsystems is usually better described in terms of a tensor product of \(s\) Hamiltonians each of dimension \(n_i (i=1, \dots, s)\), rather than a single Hamiltonian of \(N := \prod_{i=1}^{s} n^i\) dimensions. A natural decomposition of the former would be in terms of tensor products of \(s\) Pauli matrices

\[\Lambda^{(n_1 \dots n_s)}_{k_1 \dots k_s} = \frac{1}{2^{s-1}} \bigotimes_{i=1}^{s} \lambda^{(n_i)}_{k_i},\]

which constitute an orthonormal basis of the space of \(N\)-dimensional Hermitian matrices with a rather awkward normalization

\[\mathrm{tr}(\Lambda^{(n_1 \dots n_s)}_{k_1 \dots k_s} \Lambda^{(n_1 \dots n_s)}_{l_1 \dots l_s}) = 2 \frac{1}{2^{s-1}} \prod_i \delta_{k_i, l_i}.\]

The full s-body Hamiltonian \(H\) is decomposed into

\[H = \sum_{k_1 \dots k_s} \nu_{k_1 \dots k_s} \Lambda^{(n_1 \dots n_s)}_{k_1 \dots k_s},\]

and the component \(\nu_{k_1 \dots k_s}\) is extracted by

\[\nu_{k_1 \dots k_s} = 2^{s-2} \mathrm{tr}(\Lambda^{(n_1 \dots n_s)}_{k_1 \dots k_s} H).\]

Dimension truncation

Thanks to the recursive definition of the Pauli matrices, the decomposition of an \(m\)-dimensional submatrix of an \(n\)-dimensional Hermitian matrix is mostly trivially obtained from the components of the latter:

If

\[H^{(n)} = \sum_{k=0}^{n^2-1} \nu_k \lambda^{(n)}_k\]

then the truncated matrix \(\bar{H}^{(m)}\) is

\[\bar{H}^{(m)} = \sum_{k=0}^{m^2-1} \bar{\nu}_k \lambda^{(m)}_k,\]

with \(\bar{\nu}_k = \nu_k\) for \(1 \leq k \leq m^2 - 1\). For \(k=0\), however, we need to consider the projection of the diagonal matrices:

\[\begin{split}\mathrm{tr}_{m} (\lambda^{(m)}_0 \bar{\lambda}^{(n|m)}_0) & = 2 \sqrt{\frac{m}{n}}, \\ \mathrm{tr}_{m} (\lambda^{(m)}_0 \bar{\lambda}^{(n|m)}_{d^2-1}) & = 2 \sqrt{\frac{m}{d(d-1)}} \quad \text{if} \; d > m\end{split}\]

where \(\mathrm{tr}_{m}(\cdot)\) represents the \(m\)-dimensional trace, and \(\bar{\lambda}^{(n|m)}_k\) is the \(m\)-dimensional submatrix of \(\lambda^{(n)}_k\). Thus we have

\[\bar{\nu}_0 = \frac{1}{2} \mathrm{tr}_m (\lambda^{(m)}_0 \bar{H}^{(m)}) = \sqrt{\frac{m}{n}} \nu_0 + \sum_{d > m} \sqrt{\frac{m}{d(d-1)}} \nu_{d^2-1}.\]

Pauli Matrices API

paulis(dim)

Return a list of generalized Pauli matrices of given dimension(s) as an array.

components(matrix[, dim, npmod])

Return the Pauli decomposition coefficients \(\nu_{k_1 \dots k_n}\) of the matrix.

compose(components[, dim, npmod])

Compose a matrix from the Pauli components.

l0_projector(reduced_dim, original_dim)

Return the vector that projects the components of original_dim decomposition onto lambda_0 of reduced_dim.

truncate(components, reduced_dim[, npmod])

Truncate a component array of a matrix into the components for a submatrix.

symmetry(dim)

Return the symmetry (-1, 0, 1) of the Pauli matrices.

labels(dim[, symbol, delimiter, norm, fmt])

Generate the labels for the Pauli matrices of a given dimension.