pygsti.tools.contract_to_std_direct_sum_mx

pygsti.tools.contract_to_std_direct_sum_mx(mxInStdBasis, dimOrBlockDims)

Convert a gate matrix in the standard basis of the embedding space to a matrix in the standard basis of the “direct-sum” space.

Parameters:
  • mxInStdBasis (numpy array) – Matrix of size M x M, where M is the dimension of the embedding density matrix space, i.e. sum( dimOrBlockDims_i )^2
  • dimOrBlockDims (int or list of ints) – Structure of the density-matrix space.
Returns:

A N x N matrix, where where N is the dimension of the density matrix space, i.e. sum( dimOrBlockDims_i^2 )

Return type:

numpy array