toqito.rand.random_orthonormal_basis ==================================== .. py:module:: toqito.rand.random_orthonormal_basis .. autoapi-nested-parse:: Generates a random orthonormal basis. Module Contents --------------- .. py:function:: random_orthonormal_basis(dim, is_real = False, seed = None) Generate a real random orthonormal basis of given dimension \(d\). The basis is generated from the columns of a random unitary matrix of the same dimension as the columns of a unitary matrix typically form an orthonormal basis [@SE_1688950]. .. rubric:: Examples To generate a random orthonormal basis of dimension \(4\), ```python exec="1" source="above" from toqito.rand import random_orthonormal_basis print(random_orthonormal_basis(4, is_real = True)) ``` It is also possible to add a seed for reproducibility. ```python exec="1" source="above" from toqito.rand import random_orthonormal_basis print(random_orthonormal_basis(2, is_real=True, seed=42)) ``` :param dim: Number of elements in the random orthonormal basis. :param is_real: Bool :param seed: A seed used to instantiate numpy's random number generator.