Difference between revisions of "MaxEntangled"
Jump to navigation
Jump to search
(Uploaded v1.01) |
m |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
|name=MaxEntangled | |name=MaxEntangled | ||
|desc=Produces a [[maximally entangled]] [[bipartite]] [[pure state]] | |desc=Produces a [[maximally entangled]] [[bipartite]] [[pure state]] | ||
− | | | + | |rel=[[Bell]]<br />[[BrauerStates]] |
− | | | + | |cat=[[List of functions#Special_states,_vectors,_and_operators|Special states, vectors, and operators]] |
|upd=November 28, 2012 | |upd=November 28, 2012 | ||
− | |v= | + | |v=0.50}} |
<tt>'''MaxEntangled'''</tt> is a [[List of functions|function]] that returns the canonical [[maximally entangled]] [[bipartite]] [[pure state]]. The state can be chosen to be either full or sparse. | <tt>'''MaxEntangled'''</tt> is a [[List of functions|function]] that returns the canonical [[maximally entangled]] [[bipartite]] [[pure state]]. The state can be chosen to be either full or sparse. | ||
Line 21: | Line 21: | ||
===A maximally entangled qubit state=== | ===A maximally entangled qubit state=== | ||
To generate a maximally entangled pair of qubits you can use the following line of code: | To generate a maximally entangled pair of qubits you can use the following line of code: | ||
− | < | + | <syntaxhighlight> |
>> MaxEntangled(2) | >> MaxEntangled(2) | ||
Line 30: | Line 30: | ||
0 | 0 | ||
0.7071 | 0.7071 | ||
− | </ | + | </syntaxhighlight> |
If you want an unnormalized version of this state in which each entry of the vector is 0 or 1, specify <tt>NRML=0</tt>: | If you want an unnormalized version of this state in which each entry of the vector is 0 or 1, specify <tt>NRML=0</tt>: | ||
− | < | + | <syntaxhighlight> |
>> MaxEntangled(2,0,0) | >> MaxEntangled(2,0,0) | ||
Line 42: | Line 42: | ||
0 | 0 | ||
1 | 1 | ||
− | </ | + | </syntaxhighlight> |
===In larger systems=== | ===In larger systems=== | ||
− | When <tt>DIM</tt> is large, it is usually best to specify <tt>SP=1</tt> in order to save memory. For example, this produces a maximally entangled pure state in $\mathbb{C}^{10} \otimes \mathbb{C}^{10}$: | + | When <tt>DIM</tt> is large, it is usually best to specify <tt>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}$: |
− | < | + | <syntaxhighlight> |
>> MaxEntangled(10,1) | >> MaxEntangled(10,1) | ||
Line 61: | Line 61: | ||
(89,1) 0.3162 | (89,1) 0.3162 | ||
(100,1) 0.3162 | (100,1) 0.3162 | ||
− | </ | + | </syntaxhighlight> |
+ | |||
+ | {{SourceCode|name=MaxEntangled}} |
Latest revision as of 20:01, 6 November 2014
MaxEntangled | |
Produces a maximally entangled bipartite pure state | |
Other toolboxes required | none |
---|---|
Related functions | Bell BrauerStates |
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.7071
If 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
1
In 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.3162
Source code
Click here to view this function's source code on github.