pygsti.tools.basistools.resize_std_mx#
- resize_std_mx(mx, resize, std_basis_1, std_basis_2)#
Change the basis of mx to a potentially larger or smaller ‘std’-type basis given by std_basis_2.
(mx is assumed to be in the ‘std’-type basis given by std_basis_1.)
This is possible when the two ‘std’-type bases have the same “embedding dimension”, equal to the sum of their block dimensions. If, for example, std_basis_1 has block dimensions (kite structure) of (4,2,1) then mx, expressed as a sum of 4^2 + 2^2 + 1^2 = 21 basis elements, can be “embedded” within a larger ‘std’ basis having a single block with dimension 7 (7^2 = 49 elements).
When std_basis_2 is smaller than std_basis_1 the reverse happens and mx is irreversibly truncated, or “contracted” to a basis having a particular kite structure.
- Parameters:
- Return type:
numpy.ndarray