toqito.state_props.is_mutually_orthogonal

Checks if quantum states are mutually orthogonal.

Module Contents

toqito.state_props.is_mutually_orthogonal.is_mutually_orthogonal(vec_list)[source]

Check if list of vectors are mutually orthogonal [@WikiOrthog].

We say that two bases

[
begin{equation}

mathcal{B}_0 = left{u_a: a in Sigma right} subset mathbb{C}^{Sigma} quad text{and} quad mathcal{B}_1 = left{v_a: a in Sigma right} subset mathbb{C}^{Sigma}

end{equation}

]

are mutually orthogonal if and only if (left|langle u_a, v_b rangleright| = 0) for all (a, b in Sigma).

For (n in mathbb{N}), a set of bases (left{ mathcal{B}_0, ldots, mathcal{B}_{n-1} right}) are mutually orthogonal if and only if every basis is orthogonal with every other basis in the set, i.e. (mathcal{B}_x) is orthogonal with (mathcal{B}_x^{prime}) for all (x not= x^{prime}) with (x, x^{prime} in Sigma).

Examples

The Bell states constitute a set of mutually orthogonal vectors.

`python exec="1" source="above" from toqito.states import bell from toqito.state_props import is_mutually_orthogonal states = [bell(0), bell(1), bell(2), bell(3)] print(is_mutually_orthogonal(states)) `

The following is an example of a list of vectors that are not mutually orthogonal.

`python exec="1" source="above" import numpy as np from toqito.states import bell from toqito.state_props import is_mutually_orthogonal states = [np.array([1, 0]), np.array([1, 1])] print(is_mutually_orthogonal(states)) `

Raises:

ValueError – If at least two vectors are not provided.

Parameters:

vec_list (list[numpy.ndarray | list[float | Any]]) – The list of vectors to check.

Returns:

True if vec_list are mutually orthogonal, and False otherwise.

Return type:

bool