pygsti.baseobjs.basisconstructors.col_matrices

Contents

pygsti.baseobjs.basisconstructors.col_matrices#

col_matrices(matrix_dim)#

Get the elements of the matrix unit, or “column-stacked”, basis of matrix-dimension matrix_dim. The matrices are ordered so that the column index changes the fastest.

Constructs the standard basis spanning the density-matrix space given by matrix_dim x matrix_dim matrices.

The returned matrices are orthonormal basis under the trace inner product, i.e. Tr( dot(Mi,Mj) ) == delta_ij.

Parameters:

matrix_dim (int) – matrix dimension of the density-matrix space, e.g. 2 for a single qubit in a 2x2 density matrix basis.

Returns:

A list of N numpy arrays each of shape (matrix_dim, matrix_dim).

Return type:

list

Notes

Each element is a matrix containing a single “1” entry amidst a background of zeros.