spheres.utils.bitstring_basis¶
-
spheres.utils.
bitstring_basis
(bitstring, dims=2)[source]¶ Generates a basis vector corresponding to a given bitstring, which may be a list of integers or a string of integers. The dimensionality of each tensor factor is given by dims, which may be either an integer (all the same dimensionality) or a list (a dimension for each factor).
- Parameters
bitstring (str) –
dims (int or list) –
- Returns
tensor_state
- Return type
qt.Qobj