MaxEntangled: Difference between revisions

From QETLAB
Jump to navigation Jump to search
Uploaded v1.01
Line 45: Line 45:


===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}$:
<pre>
<pre>
>> MaxEntangled(10,1)
>> MaxEntangled(10,1)

Revision as of 19:51, 18 December 2013

MaxEntangled
Produces a maximally entangled bipartite pure state

Other toolboxes required iden
opt_args
Related functions BellState

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