Feature: Generate random orthonormal basis
Opened this issue · 0 comments
vprusso commented
This particular feature may be of use if we wish to generate a collection of quantum states (basis of vectors) that have the property of being orthonormal. The columns of a randomly generated unitary matrix can be used to generate an orthonormal basis
Something like this could be used:
def random_orthonormal_basis(dim: int) -> list[np.ndarray]:
# Generate a random unitary matrix
U = unitary_group.rvs(dim)
# The columns of U form an orthonormal basis
basis = [U[:, i] for i in range(dim)]
return basis
This feature should live in rand/random_orthonormal_basis.py
and would need to have the requisite coverage and testing in tests/test_random_orthonormal_basis.py
.