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
Magnetic Exchange Coupling
Here we discuss the magnetic exchange coupling as an example of possible applications of the
Fock
package.
FermionBasis
Constucts the basis the elements of which are grouped by conserved quantities
FockAddSpin
Constructs the irreducible basis of the total angular momentum.
FockAddSpinZ
Constructs the irreducible basis of the total directional angular momentum.
FockNumber
Returns an operator corresponding to the total number of particles.
FockHopping
Returns an operator describing hoppings.
Some useful functions used in the example.
Load the package.
In[74]:=
Needs["QuantumMob`Q3`"]
In[75]:=
Let[Fermion,c,d,Spin1/2]​​Let[Real,t,ϵ,U]
Single quantum dot
In[77]:=
H0=ϵ*FockNumber[d[All]]​​Hu=U[0]*FockNumber[d[Up]]**FockNumber[d[Down]]​​HH=H0+Hu
Out[77]=
ϵ
†
d
↓
d
↓
+
†
d
↑
d
↑

Out[78]=
†
d
↓
†
d
↑
d
↑
d
↓
U
0
Out[79]=
ϵ
†
d
↓
d
↓
+
†
d
↑
d
↑
+
†
d
↓
†
d
↑
d
↑
d
↓
U
0
In[80]:=
bsNS=FermionBasis[d,"Representation""Generators"];​​bsNS//PrintFermionBasis
Out[81]=
{0,0}
{|≍〉}
1,
1
2


†
d
↑
≍
{2,0}
-
†
d
↓
†
d
↑
≍
Define a utility function to display the matrix representation.
In[82]:=
showMatrix[mat_Association]:=With[​​{frm=KeyGroupBy[mat,First,Values]},​​MatrixForm[​​Map[MatrixForm,Values@frm,{2}],​​TableHeadings{Keys@frm,Keys@frm}​​]​​]
In[83]:=
mNS=MatrixIn[HH,FockKet@bsNS,FockKet@bsNS];​​mNS//showMatrix
Out[84]//MatrixForm=
{0,0}
1,
1
2

{2,0}
{0,0}
(
0
)
(
0
)
(
0
)
1,
1
2

(
0
)
(
ϵ
)
(
0
)
{2,0}
(
0
)
(
0
)
(
2ϵ+
U
0
)
In[85]:=
mNS=MatrixIn[HH,FockKet@bsNS];​​MatrixForm/@mNS
Out[86]=
{0,0}(
0
),1,
1
2
(
ϵ
),{2,0}(
2ϵ+
U
0
)
In[89]:=
bsNS=FermionBasis[{c,d},"Representation""Generators"];​​bsNS//PrintFermionBasis
Out[90]=
{0,0}
{|≍〉}
1,
1
2


†
d
↑
≍,
†
c
↑
≍
{2,0}
-
†
c
↓
†
c
↑
≍,-
†
c
↓
†
d
↑
|≍〉
2
+
†
c
↑
†
d
↓
|≍〉
2
,-
†
d
↓
†
d
↑
≍
{2,1}

†
c
↑
†
d
↑
≍
3,
1
2

-
†
c
↓
†
c
↑
†
d
↑
≍,
†
c
↑
†
d
↓
†
d
↑
≍
{4,0}

†
c
↓
†
c
↑
†
d
↓
†
d
↑
≍
In[91]:=
mNS=MatrixIn[HH,FockKet@bsNS,FockKet@bsNS];​​mNS//showMatrix
Out[92]//MatrixForm=
{0,0}
1,
1
2

{2,0}
{2,1}
3,
1
2

{4,0}
{0,0}
(
0
)
(
0
0
)
(
0
0
0
)
(
0
)
(
0
0
)
(
0
)
1,
1
2


0
0


ϵ
0
0
0


0
0
0
0
0
0


0
0


0
0
0
0


0
0

{2,0}
0
0
0
0
0
0
0
0
0
0
0
0
0
ϵ
0
0
0
2ϵ+
U
0
0
0
0
0
0
0
0
0
0
0
0
0
{2,1}
(
0
)
(
0
0
)
(
0
0
0
)
(
ϵ
)
(
0
0
)
(
0
)
3,
1
2


0
0


0
0
0
0


0
0
0
0
0
0


0
0

ϵ
0
0
2ϵ+
U
0

0
0

{4,0}
(
0
)
(
0
0
)
(
0
0
0
)
(
0
)
(
0
0
)
(
2ϵ+
U
0
)
Construct the Hamiltonian for double quantum dots.
In[93]:=
H0=ϵ*FockNumber[d[1,All],d[2,All]]​​Ht=-t*PlusDagger@FockHopping[d[1,All],d[2,All]]​​Hu=U[0]*Sum[FockNumber[d[j,Up]]**FockNumber[d[j,Down]],{j,1,2}]+​​U[1,2]/2*FockNumber[d[1,All]]**FockNumber[d[2,All]]
Out[93]=
ϵ
†
d
1,↓
d
1,↓
+
†
d
1,↑
d
1,↑
+
†
d
2,↓
d
2,↓
+
†
d
2,↑
d
2,↑

Out[94]=
Out[95]=

†
d
1,↓
†
d
1,↑
d
1,↑
d
1,↓
+
†
d
2,↓
†
d
2,↑
d
2,↑
d
2,↓

U
0
+
1
2

†
d
1,↓
†
d
2,↓
d
2,↓
d
1,↓
+
†
d
1,↓
†
d
2,↑
d
2,↑
d
1,↓
+
†
d
1,↑
†
d
2,↓
d
2,↓
d
1,↑
+
†
d
1,↑
†
d
2,↑
d
2,↑
d
1,↑

U
1,2
In[96]:=
HH=H0+Ht+Hu;
In[97]:=
bsNS=FermionBasis[d@{1,2},"Representation""Generators","Conserved"{"Number","Spin"}];​​bsNS//PrintFermionBasis
Out[98]=
{0,0}
{|≍〉}
1,
1
2


†
d
2,↑
≍,
†
d
1,↑
≍
{2,0}
-
†
d
1,↓
†
d
1,↑
≍,-
†
d
1,↓
†
d
2,↑
|≍〉
2
+
†
d
1,↑
†
d
2,↓
|≍〉
2
,-
†
d
2,↓
†
d
2,↑
≍
{2,1}

†
d
1,↑
†
d
2,↑
≍
3,
1
2

-
†
d
1,↓
†
d
1,↑
†
d
2,↑
≍,
†
d
1,↑
†
d
2,↓
†
d
2,↑
≍
{4,0}

†
d
1,↓
†
d
1,↑
†
d
2,↓
†
d
2,↑
≍
In[99]:=
bsNone=FermionBasis[d@{1,2},"Representation""Generators","Conserved""None"];​​bsNone//PrintFermionBasis​​
Out[100]=
{}
≍,
†
d
2,↓
≍,
†
d
2,↑
≍,-
†
d
2,↓
†
d
2,↑
≍,
†
d
1,↓
≍,
†
d
1,↓
†
d
2,↓
≍,
†
d
1,↓
†
d
2,↑
≍,-
†
d
1,↓
†
d
2,↓
†
d
2,↑
≍,
†
d
1,↑
≍,
†
d
1,↑
†
d
2,↓
≍,
†
d
1,↑
†
d
2,↑
≍,-
†
d
1,↑
†
d
2,↓
†
d
2,↑
≍,-
†
d
1,↓
†
d
1,↑
≍,-
†
d
1,↓
†
d
1,↑
†
d
2,↓
≍,-
†
d
1,↓
†
d
1,↑
†
d
2,↑
≍,
†
d
1,↓
†
d
1,↑
†
d
2,↓
†
d
2,↑
≍
In[101]:=
mNS=MatrixIn[HH,FockKet@bsNS,FockKet@bsNS];​​mNS//showMatrix
Out[102]//MatrixForm=
{0,0}
1,
1
2

{2,0}
{2,1}
3,
1
2

{4,0}
{0,0}
(
0
)
(
0
0
)
(
0
0
0
)
(
0
)
(
0
0
)
(
0
)
1,
1
2


0
0


ϵ
-t
-t
ϵ


0
0
0
0
0
0


0
0


0
0
0
0


0
0

{2,0}
0
0
0
0
0
0
0
0
0
2ϵ+
U
0
-
2
t
0
-
2
t
2ϵ+
U
1,2
2
-
2
t
0
-
2
t
2ϵ+
U
0
-t
0
t
0
0
0
0
0
0
0
0
0
{2,1}
(
0
)
(
0
0
)
(
-t
0
t
)
2ϵ+
U
1,2
2
(
0
0
)
(
0
)
3,
1
2


0
0


0
0
0
0


0
0
0
0
0
0


0
0

3ϵ+
U
0
+
U
1,2
-t
-t
3ϵ+
U
0
+
U
1,2

0
0

{4,0}
(
0
)
(
0
0
)
(
0
0
0
)
(
0
)
(
0
0
)
(
4ϵ+2
U
0
+2
U
1,2
)
In[103]:=
mNone=MatrixIn[HH,FockKet@bsNone,FockKet@bsNone];​​MatrixForm/@mNone

© 2025 Wolfram. All rights reserved.

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