<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.11/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.11/ http://www.mediawiki.org/xml/export-0.11.xsd" version="0.11" xml:lang="en">
  <siteinfo>
    <sitename>QETLAB</sitename>
    <dbname>njohnsto_qetlab</dbname>
    <base>https://qetlab.com/Main_Page</base>
    <generator>MediaWiki 1.45.3</generator>
    <case>first-letter</case>
    <namespaces>
      <namespace key="-2" case="first-letter">Media</namespace>
      <namespace key="-1" case="first-letter">Special</namespace>
      <namespace key="0" case="first-letter" />
      <namespace key="1" case="first-letter">Talk</namespace>
      <namespace key="2" case="first-letter">User</namespace>
      <namespace key="3" case="first-letter">User talk</namespace>
      <namespace key="4" case="first-letter">QETLAB</namespace>
      <namespace key="5" case="first-letter">QETLAB talk</namespace>
      <namespace key="6" case="first-letter">File</namespace>
      <namespace key="7" case="first-letter">File talk</namespace>
      <namespace key="8" case="first-letter">MediaWiki</namespace>
      <namespace key="9" case="first-letter">MediaWiki talk</namespace>
      <namespace key="10" case="first-letter">Template</namespace>
      <namespace key="11" case="first-letter">Template talk</namespace>
      <namespace key="12" case="first-letter">Help</namespace>
      <namespace key="13" case="first-letter">Help talk</namespace>
      <namespace key="14" case="first-letter">Category</namespace>
      <namespace key="15" case="first-letter">Category talk</namespace>
    </namespaces>
  </siteinfo>
  <page>
    <title>Main Page</title>
    <ns>0</ns>
    <id>1</id>
    <revision>
      <id>35997</id>
      <parentid>35532</parentid>
      <timestamp>2023-08-01T01:54:15Z</timestamp>
      <contributor>
        <username>Nathaniel</username>
        <id>1</id>
      </contributor>
      <minor/>
      <comment>LaTeX fix</comment>
      <origin>35997</origin>
      <model>wikitext</model>
      <format>text/x-wiki</format>
      <text bytes="5124" sha1="hvljigul1oxjikuv0r63ovxar6iexff" xml:space="preserve">__NOTOC____NOEDITSECTION__== QETLAB: A MATLAB Toolbox for Quantum Entanglement ==
'''QETLAB''' ('''Q'''uantum '''E'''ntanglement '''T'''heory '''LAB'''oratory) is a MATLAB toolbox for exploring quantum entanglement theory. While there are many quantum information theory toolboxes that allow the user to perform basic operations such as the [[PartialTranspose|partial transposition]], new tests are constantly discovered. The goal of QETLAB is to remain up-to-date and contain an ever-growing catalogue of separability criteria, positive maps, and related functions of interest. Furthermore, QETLAB is designed to work well both with full matrices and with large sparse matrices, and makes use of many advanced techniques based on semidefinite programming.

{{DownloadBox}}


==Getting started: some introductory examples==
===Pure state entanglement and the Schmidt decomposition===
The heart of QETLAB is a suite of functions that make working with quantum entanglement quick and easy. Working with pure state entanglement is a breeze, as demonstrated by the following code snippet, which generates a random pure state (according to uniform spherical measure/Haar measure) and computes its Schmidt decomposition:
&lt;code&gt;&lt;nowiki&gt;&gt;&gt; d = 3; % this example will be in 3 \otimes 3 dimensions
&gt;&gt; phi = &lt;/nowiki&gt;[[RandomStateVector]]&lt;nowiki&gt;(d^2);
&gt;&gt; [s,a,b] = &lt;/nowiki&gt;[[SchmidtDecomposition]]&lt;nowiki&gt;(phi)

s =

    0.9159
    0.3951
    0.0709


a =

  -0.8062            -0.5411             0.2392          
  -0.2685 - 0.0526i   0.0305 + 0.2555i  -0.8357 + 0.4006i
   0.1580 + 0.5002i  -0.3599 - 0.7152i  -0.2814 + 0.0681i


b =

  -0.1401 - 0.3521i   0.0829 - 0.7178i  -0.3997 - 0.4176i
  -0.2513 + 0.1492i  -0.3837 + 0.3479i   0.0874 - 0.7992i
   0.5520 - 0.6828i  -0.3670 + 0.2737i  -0.1378 - 0.0208i
&lt;/nowiki&gt;&lt;/code&gt;

We could verify that this Schmidt decomposition is correct as follows:

&lt;code&gt;&lt;nowiki&gt;&gt;&gt; phi2 = s(1)*kron(a(:,1),b(:,1)) + s(2)*kron(a(:,2),b(:,2)) + s(3)*kron(a(:,3),b(:,3));
&gt;&gt; norm(phi - phi2)

ans =

  5.8378e-016
&lt;/nowiki&gt;&lt;/code&gt;

However, QETLAB has a [[TensorSum|built-in function]] that acts as the inverse of the Schmidt decomposition, to make this process easier:
&lt;code&gt;&lt;nowiki&gt;&gt;&gt; phi3 = &lt;/nowiki&gt;[[TensorSum]]&lt;nowiki&gt;(s,a,b);
&gt;&gt; norm(phi - phi3)

ans =

  5.8378e-016
&lt;/nowiki&gt;&lt;/code&gt;

===Mixed state entanglement and detecting bound entanglement===
QETLAB can also handle mixed state entanglement without trouble. To demonstrate these features, let's start by creating a bound entangled state and then detecting its entanglement.

One well-known way to create bound entangled states is via unextendible product bases (UPBs)&lt;ref name="BDM99"&gt;C.H. Bennett, D.P. DiVincenzo, T. Mor, P.W. Shor, J.A. Smolin, and B.M. Terhal. Unextendible product bases and bound entanglement. ''Phys. Rev. Lett.'' 82, 5385&amp;ndash;5388, 1999. E-print: [http://arxiv.org/abs/quant-ph/9808030 arXiv:quant-ph/9808030]&lt;/ref&gt;&lt;ref name="DMS03"&gt;D.P. DiVincenzo, T. Mor, P.W. Shor, J.A. Smolin, and B.M. Terhal. Unextendible product bases, uncompletable product bases and bound entanglement. ''Commun. Math. Phys.'' 238, 379&amp;ndash;410, 2003. E-print: [http://arxiv.org/abs/quant-ph/9908070 arXiv:quant-ph/9908070]&lt;/ref&gt;. Let's first generate the "Tiles" UPB in &lt;math&gt;\mathbb{C}^3 \otimes \mathbb{C}^3&lt;/math&gt; and construct a bound entangled state from it:
&lt;code&gt;&lt;nowiki&gt;&gt;&gt; u = &lt;/nowiki&gt;[[UPB]]&lt;nowiki&gt;('Tiles') % generate the "Tiles" unextendible product basis

u =

    0.7071         0         0         0    0.3333
   -0.7071         0         0         0    0.3333
         0    0.7071         0         0    0.3333
         0         0         0    0.7071    0.3333
         0         0         0         0    0.3333
         0   -0.7071         0         0    0.3333
         0         0         0   -0.7071    0.3333
         0         0    0.7071         0    0.3333
         0         0   -0.7071         0    0.3333

&gt;&gt; rho = eye(9) - u*u'; % rho is the projection onto the orthogonal complement of the UPB vectors
&gt;&gt; rho = rho/trace(rho); % scale rho to have trace 1
&lt;/nowiki&gt;&lt;/code&gt;

Now &lt;tt&gt;rho&lt;/tt&gt; is a bound entangled state. We can verify this in QETLAB as follows:
&lt;code&gt;&lt;nowiki&gt;&gt;&gt; &lt;/nowiki&gt;[[IsPPT]]&lt;nowiki&gt;(rho) % this will show that rho has positive partial transpose

ans =

     1

&gt;&gt; &lt;/nowiki&gt;[[IsSeparable]]&lt;nowiki&gt;(rho) % this will show that rho is entangled

Determined to be entangled via the realignment criterion. Reference:
K. Chen and L.-A. Wu. A matrix realignment method for recognizing entanglement. Quantum Inf. Comput., 3:193-202, 2003.

ans =

     0
&lt;/nowiki&gt;&lt;/code&gt;

QETLAB can also carry out many related functions, such as [[SymmetricExtension|finding entanglement witnesses that detect entanglement in a given state]], [[IsBlockPositive|determining whether or not a given operator is an entanglement witness]], and [[IsUPB|deciding whether or not a given set of vectors form an unextendible product basis]]. Furthermore, there are numerous examples scattered throughout the documentation that make learning how to carry out these operations a breeze.

==References==
&lt;references /&gt;</text>
      <sha1>hvljigul1oxjikuv0r63ovxar6iexff</sha1>
    </revision>
  </page>
</mediawiki>
