toqito.matrices.standard_basis¶
Constructs the standard basis.
Module Contents¶
- toqito.matrices.standard_basis.standard_basis(dim, flatten=False)[source]¶
Create standard basis of dimension dim.
Create a list containing the elements of the standard basis for the given dimension:
]
This function was inspired by [@Seshadri_2021_Git, Seshadri_2021_Theory, Seshadri_2021_Versatile]
Examples
```python exec=”1” source=”above” from toqito.matrices import standard_basis
- Parameters:
dim (int) – The dimension of the basis.
flatten (bool) – If True, the basis is returned as a flattened list.
- Returns:
A list of numpy.ndarray of shape (n, 1).
- Return type:
list[numpy.ndarray]