pygsti.tools.gm_to_std_transform_matrix

pygsti.tools.gm_to_std_transform_matrix(dimOrBlockDims)

Construct the matrix which transforms a gate matrix in the Gell-Mann basis for a density matrix space to the Standard basis (for the same space).

Parameters:dimOrBlockDims (int or list of ints) – Structure of the density-matrix space.
Returns:An array of shape (N,N), where N is the dimension of the density matrix space, i.e. sum( dimOrBlockDims_i^2 ).
Return type:numpy array

Notes

The returned matrix is block diagonal with one block per term in the direct sum of the the density matrix space. Each block is the transformation matrix for the corresponding part of density matrix space, consisting of flattened Gell-Mann basis matrices along it’s columns.