Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

QuantumPlaybook

Guides

  • QuantumPlaybook

Tech Notes

  • Addition of Numbers
  • Baker-Hausdorff Lemma
  • Chiral Fermion Random Circuit
  • Clifford Operators: How to Test
  • Commutation Relations for Qubits
  • Entanglement Distillation
  • Generalized Pauli Operators: Implementation
  • Hatano-Nelson-Kitaev Model: Monte Carlo Simulation
  • Hatano-Nelson Model: Monte Carlo Simulation
  • Kitaev Chain
  • Kitaev Random Circuit
  • Λ-Matter in a Cavity
  • Measurement of Total Pauli Z
  • Non-Unitary Dynamics of Quantum States
  • Partial Trace: Physical Meaning
  • Quantum Dot Systems
  • A Quantum Playbook
  • Magnetic Exchange Coupling
  • Solovay-Kitaev Algorithm
  • Spin Code
  • Symmetry Effects On Quantum Master Equations
  • Transmon: Quantum Phase Model
  • Transposition as a Supermap
  • Variational Quantum Classifier: Iris
  • Variational Quantum Classifier: Parity
  • Variational Quantum Eigensolver: Transverse-Field Ising Model

Symbols

  • BlochEnergy
  • BlochFunction
  • QuantumPlaybookCheckUpdate
  • QuantumPlaybookEdition
  • QuantumPlaybookUpdate
  • TransmonEnergy
  • TransmonExponent
  • TransmonFunction
  • TransmonHamiltonian
Transposition as a Supermap
Overview
Positive, But Not Completely Positive
Operator-Sum Representation
​
Regarding transposition as a supermap, we find the Choi matrix and construct an explicit operator-sum representation of the transposition supermap. The Choi matrix allows to quickly check that transposition is not completely positive.
Supermap
Rerepsents a supermap
PartialTranspose
Returns the partial transposition of a linear operator
ChoiMatrix
The Choi matrix of a supermap
Functions related to the transposition supermap.
Make sure to load Q3.
In[1]:=
Needs["QuantumMob`Q3`"]
Overview
Recall the defining equation of the Choi matrix
C
of a supermap
ℱ
,
ℱ

ρ
=
Σ
ij
Σ
kl

F
ij

ρ
†

F
kl
C
ij;kl
,
where

F
ij
:=|
v
i
〉
v
j

. An equivalent definition is
ℱ(|
v
k
〉〈
v
l
|)=
Σ
ij
|
v
i
〉
C
ik;jl

v
j

with respect to a given orthonormal basis
{|
v
k
〉|k=1,2,…,d}
.
The Choi matrix of the transposition supermap is given by
C
ij;kl
=
δ
jk
δ
il
.
Operator-Sum Representation
Let us consider a
d
-level system. The quantum levels are labeled by integers from 0 to
d-1
.
In[2]:=
$d=3;​​jj=Range[$d]-1
Out[3]=
{0,1,2}
In[4]:=
Let[Qudit,A,Dimension$d]
We want to select a set of operators to span the supermaps that we are interested in; in this particular case, the standard basis of operators on the
d
-dimensional Hilbert space. We first construct all possible ordered pairs of level indices.
In[5]:=
tpl=Tuples[jj,{2}]
Out[5]=
{{0,0},{0,1},{0,2},{1,0},{1,1},{1,2},{2,0},{2,1},{2,2}}
Recalling that
C
ij;kl
=
δ
jk
δ
il
the transposition supermap, we construct the list of reversed pairs from the previously constructed list of ordered pairs.
In[6]:=
rvs=Reverse/@tpl
Out[6]=
{{0,0},{1,0},{2,0},{0,1},{1,1},{2,1},{0,2},{1,2},{2,2}}
We then construct the set of operators from the above ordered pairs.
In[7]:=
ops=Map[A,Rule@@@rvs]
Out[7]=
{(|0〉〈0|),(|0〉〈1|),(|0〉〈2|),(|1〉〈0|),(|1〉〈1|),(|1〉〈2|),(|2〉〈0|),(|2〉〈1|),(|2〉〈2|)}

Using Graph

Here is one way to get the Choi matrix for transposition: using graph and its adjacency matrix.
Construct the edges.
In[8]:=
edges=Thread[tplrvs]
Out[8]=
{{0,0}{0,0},{0,1}{1,0},{0,2}{2,0},{1,0}{0,1},{1,1}{1,1},{1,2}{2,1},{2,0}{0,2},{2,1}{1,2},{2,2}{2,2}}
In many cases, you do not have to specify the vertices explicitly. However, in this case, doing it is necessary to keep the order of vortices as we want.
In[9]:=
grf=Graph[tpl,edges,VertexLabels"Name"]
Out[9]=
In[10]:=
mat=AdjacencyMatrix[grf];​​mat//MatrixForm
Out[11]//MatrixForm=
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
With the Choi matrix given, construct the supermap.
In[12]:=
spr=Supermap[ops,mat];
To verify the supermap, think of a few examples of input operators.
In[13]:=
in=A[02]
Out[13]=
(|2〉〈0|)
In[14]:=
out=spr[in]
Out[14]=
(|0〉〈2|)
In[15]:=
in=A[02]+I*A[12]
Out[15]=
(|2〉〈0|)+(|2〉〈1|)
In[16]:=
out=spr[in]
Out[16]=
(|0〉〈2|)+(|1〉〈2|)
Note that this is different from the Hermitian conjugate.
In[17]:=
Dagger[in]
Out[17]=
(|0〉〈2|)-(|1〉〈2|)

Using Permutation

Here is another method to get the Choi matrix: using permutation matrix.
In[18]:=
prm=FindPermutation[tpl,rvs]
Out[18]=
Cycles[{{2,4},{3,7},{6,8}}]
In[19]:=
new=PermutationMatrix[prm,9];​​new//MatrixForm
Out[20]//MatrixForm=
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
In[21]:=
mat-new//MatrixForm
Out[21]//MatrixForm=
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Positive, But Not Completely Positive
Let us further analyse the Choi matrix using its spectral decomposition.
Now, let us optimize the operator-sum representation. Before doing that, check the eigenvectors are orthonormal to each other.
It turns out that they are orthogonal to each other, but are not normalized. Just normalization suffices.
Double check that they are orthogonal to each other with respect to the Hilbert-Schmidt inner product.
Finally, let us construct the supermap in terms of this new set of operators and the eigenvalues.
Check that this new specification of the supermap produces the same result.
Take the dyadic product of it with itself to construct the (pure-state) density operator.
Obviously, as a pure state, it only has non-negative eigenvalues.
What about the partial transposition.

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com