toqito.states.max_entangled
- toqito.states.max_entangled(dim, is_sparse=False, is_normalized=True)[source]
Produce a maximally entangled bipartite pure state [WikEnt].
Produces a maximally entangled pure state as above that is sparse if
is_sparse = Trueand is full ifis_sparse = False. The pure state is normalized to have Euclidean norm 1 ifis_normalized = True, and it is unnormalized (i.e. each entry in the vector is 0 or 1 and the Euclidean norm of the vector issqrt(dim)ifis_normalized = False.Examples
We can generate the canonical \(2\)-dimensional maximally entangled state
\[u = \frac{1}{\sqrt{2}} \left( |00 \rangle + |11 \rangle \right)\]using
toqitoas follows.>>> from toqito.states import max_entangled >>> max_entangled(2) [[0.70710678], [0. ], [0. ], [0.70710678]]
By default, the state returned in normalized, however we can generate the unnormalized state
\[v = |00\rangle + |11 \rangle\]using
toqitoas follows.>>> from toqito.states import max_entangled >>> max_entangled(2, False, False) [[1.], [0.], [0.], [1.]]
References
[WikEnt]Wikipedia: Quantum entanglement https://en.wikipedia.org/wiki/Quantum_entanglement
- Parameters:
dim – Dimension of the entangled state.
is_sparse – True if vector is spare and False otherwise.
is_normalized – True if vector is normalized and False otherwise.
- Returns:
The maximally entangled state of dimension
dim.