MaxEntangled

MaxEntangled is a function that returns the canonical maximally entangled bipartite pure state. The state can be chosen to be either full or sparse.

Syntax

 * PSI = MaxEntangled(DIM)
 * PSI = MaxEntangled(DIM,SP)
 * PSI = MaxEntangled(DIM,SP,NRML)

Argument descriptions

 * DIM: The dimension of the local subsystems on which PSI lives.
 * SP (optional, default 0): A flag (either 1 or 0) indicating that PSI should or should not be sparse.
 * NRML</tt> (optional, default 1): A flag (either 1 or 0) indicating that PSI</tt> should or should not be scaled to have Euclidean norm 1. If NRML=0</tt> then PSI</tt> has Euclidean norm sqrt(DIM)</tt> and every element of PSI</tt> is 0 or 1.

A maximally entangled qubit state
To generate a maximally entangled pair of qubits you can use the following line of code:

If you want an unnormalized version of this state in which each entry of the vector is 0 or 1, specify NRML=0</tt>:

In larger systems
When DIM</tt> is large, it is usually best to specify SP=1</tt> in order to save memory. For example, this code produces a maximally entangled pure state in $\mathbb{C}^{10} \otimes \mathbb{C}^{10}$: