pygsti.objects.GateSet.get_basis_dimension

GateSet.get_basis_dimension()

Get the dimension of the basis matrices, or more generally, the structure of the density matrix space as a list of integer dimensions. In the latter case, the dimension of each basis element (a matrix) is d x d, where d equals the sum of the returned list of integers. (In the former case, d equals the single returned integers.) This density-matrix-space structure can be used, along with the basis name (cf. get_basis_name), to construct that basis of matrices used to express the gate matrices and SPAM vectors of this GateSet.

Returns:density-matrix dimension or a list of integers specifying the dimension of each term in a direct sum decomposition of the density matrix space.
Return type:int or list