Pauli Bases

Orthonormality condition

We want to represent any arbitrary :math`d`-dimensional density matrix in a form:

\[\hat{\rho} = \sum_{i=0}^N \rho_i \hat{P}_i,\]

where \(\rho_i\) are real numbers. Any Hermitian \(d \times d\) matrix has \(d^2\) free parameters, therefore a full basis \(\left\{ \hat{P}_i \right\}\) will have \(N = d^2\) elements. We will refer to \(d\) as Hilbert dimensionality (dim_hilbert in code), and \(N\) as Pauli dimensionality (dim_pauli).

We will call Pauli basis orthonormal, if it fulfills condition:

\[\text{tr} \left( \hat{P}_i \hat{P}_j \right) = \delta_{ij}.\]

If this is the case, inverse transformation has the form:

\[\rho_i = \text{tr} \left( \hat{\rho} \hat{P}_i \right).\]

We operate only in orthonormal bases in Quantumsim, an attempt to create non-orthonormal basis will raise an exception.

Common bases

The simplest example of a Pauli basis for \(2 \times 2\) Hermitian matrices is a basis, that consists of four matrices

\[\left\{ \hat{I}/\sqrt{2},\ \hat{\sigma}_x/\sqrt{2},\ \hat{\sigma}_y/\sqrt{2},\ \hat{\sigma}_z/\sqrt{2} \right\},\]

unit matrix and three Pauli matrices, normalized by \(\sqrt{d}\), where \(d = 2\) is a number of dimensions. We will refer to this basis as IXYZ basis. It can be generalized to the arbitrary number of dimensions, if we replace Pauli matrices with generalized Gell-Mann matrices 1. This basis can be constructed in Quantumsim with quantumsim.bases.gell_mann().

Another useful choice is formed by the following set of matrices:

\[\left\{ \left(\hat{I} + \hat{\sigma}_z\right)/2,\ \hat{\sigma}_x/\sqrt{2},\ \hat{\sigma}_y/\sqrt{2},\ \left(\hat{I} - \hat{\sigma}_z\right)/2 \right\}\]

We will refer to this basis as 0XY1 basis. It has an advantage, that probabilities of measuring 0 and 1 correspond in it to the coefficients in front of first and last element of this basis, without the necessity to compute trace explicitly. We can generalize this basis for arbitrary number of dimensions \(d\): first we take \(d\) matrices with 1 on a diagonal, for example for \(d=3\):

\[\begin{split}\left\{ \begin{pmatrix} 1 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix},\ \begin{pmatrix} 0 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{pmatrix},\ \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{pmatrix}, \ \cdots\right\},\end{split}\]

and then \(d^2-d\) of \(\hat{\sigma}_x\)- and \(\hat{\sigma}_y\)-like matrices:

\[\begin{split}\left\{\cdots,\ \begin{pmatrix} 0 & 1 & 0 \\ 1 & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix},\ \begin{pmatrix} 0 & -i & 0 \\ i & 0 & 0 \\ 0 & 0 & 0 \end{pmatrix},\ \begin{pmatrix} 0 & 0 & 1 \\ 0 & 0 & 0 \\ 1 & 0 & 0 \end{pmatrix},\\ \begin{pmatrix} 0 & 0 & -i \\ 0 & 0 & 0 \\ i & 0 & 0 \end{pmatrix},\ \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & 1 \\ 0 & 1 & 0 \end{pmatrix},\ \begin{pmatrix} 0 & 0 & 0 \\ 0 & 0 & -i \\ 0 & i & 0 \end{pmatrix}, \right\}.\end{split}\]

This basis can be constructed in Quantumsim with quantumsim.bases.general() and is used as a default basis in Quantumsim.

State representation in Quantumsim

Suppose we have a system of \(N\) qubits. Let us fix a separate basis \(\left\{ \hat{P}^{(n)} \right\}\) for each qubit. Now, the density matrix can be represented as follows:

\[\hat{\rho} = \sum_{i_1,\ldots,i_N} \rho_{i_1,\ldots,i_N} \hat{P}_{i_1}^{(1)} \otimes \ldots \otimes \hat{P}_{i_N}^{(N)},\]

where the sum runs over all elements of this basis. In the case of full basis \(i_n \in \left[ 1 \ldots d_n^2 \right]\), but in general we do not limit ourselves to operating in full bases: if we know from the circuit, that some basis element is not needed, we will try to throw it away in the sake of memory and speed.

1

https://en.wikipedia.org/wiki/Generalizations_of_Pauli_matrices