MaxEntangled
Jump to navigation
Jump to search
| MaxEntangled | |
| Produces a maximally entangled bipartite pure state | |
| Other toolboxes required | none |
|---|---|
| Related functions | Bell |
| Function category | Special states, vectors, and operators |
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 (optional, default 1): A flag (either 1 or 0) indicating that PSI should or should not be scaled to have Euclidean norm 1. If NRML=0 then PSI has Euclidean norm sqrt(DIM) and every element of PSI is 0 or 1.
Examples
A maximally entangled qubit state
To generate a maximally entangled pair of qubits you can use the following line of code:
>> MaxEntangled(2)
ans =
0.7071
0
0
0.7071If you want an unnormalized version of this state in which each entry of the vector is 0 or 1, specify NRML=0:
>> MaxEntangled(2,0,0)
ans =
1
0
0
1In larger systems
When DIM is large, it is usually best to specify SP=1 in order to save memory. For example, this code produces a maximally entangled pure state in $\mathbb{C}^{10} \otimes \mathbb{C}^{10}$:
>> MaxEntangled(10,1)
ans =
(1,1) 0.3162
(12,1) 0.3162
(23,1) 0.3162
(34,1) 0.3162
(45,1) 0.3162
(56,1) 0.3162
(67,1) 0.3162
(78,1) 0.3162
(89,1) 0.3162
(100,1) 0.3162Source code
Click here to view this function's source code on github.