pygsti.pp_matrices¶
-
pygsti.
pp_matrices
(dim)¶ Get the elements of the Pauil-product basis spanning the space of dim x dim density matrices (matrix-dimension dim, space dimension dim^2).
The returned matrices are given in the standard basis of the density matrix space, and are thus kronecker products of the standard representation of the Pauli matrices, (i.e. where sigma_y == [[ 0, -i ], [i, 0]] ) normalized so that the resulting basis is orthonormal under the trace inner product, i.e. Tr( dot(Mi,Mj) ) == delta_ij. In the returned list, the right-most factor of the kronecker product varies the fastsest, so, for example, when dim == 4 the returned list is [ II,IX,IY,IZ,XI,XX,XY,XY,YI,YX,YY,YZ,ZI,ZX,ZY,ZZ ].
Parameters: dim (int) – Matrix-dimension of the density-matrix space. Must be a power of 2. Returns: A list of N numpy arrays each of shape (dim, dim), where N == dim^2, the dimension of the density-matrix space. Return type: list Notes
Matrices are ordered with first qubit being most significant, e.g., for 2 qubits: II, IX, IY, IZ, XI, XX, XY, XZ, YI, ... ZZ