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

Q3mini

Guides

  • Fermionic Quantum Computation
  • Q3: Symbolic Quantum Simulation
  • Quantum Information Systems
  • Quantum Many-Body Systems
  • Quantum Spin Systems

Tech Notes

  • About Q3
  • Q3: Quick Start
  • Quantum Fourier Transform
  • Quantum Information Systems with Q3
  • Quantum Many-Body Systems with Q3
  • Quantum Operations
  • Quantum Spin Systems with Q3
  • Quantum States
  • Quantum Teleportation
  • Quick Quantum Computing with Q3

Symbols

  • Basis
  • Boson
  • Bra
  • CNOT
  • ControlledGate
  • ExpressionFor
  • Fermion
  • Heisenberg
  • Ket
  • Let
  • Majorana
  • Matrix
  • Multiply
  • NambuGreen
  • NambuHermitian
  • NambuMatrix
  • NambuUnitary
  • Pauli
  • Phase
  • QuantumCircuit
  • Qubit
  • Qudit
  • RandomWickCircuitSimulate
  • Rotation
  • Species
  • Spin
  • SWAP
  • WickCircuit
  • WickEntanglementEntropy
  • WickEntropy
  • WickGreenFunction
  • WickJump
  • WickLindbladSolve
  • WickLogarithmicNegativity
  • WickMeasurement
  • WickMonitor
  • WickMutualInformation
  • WickNonunitary
  • WickSimulate
  • WickState
  • WickUnitary

Overviews

  • The Postulates of Quantum Mechanics
  • Quantum Algorithms
  • Quantum Computation: Models
  • Quantum Computation: Overview
  • Quantum Error-Correction Codes
  • Quantum Information Theory
  • Quantum Noise and Decoherence
QuantumMob`Q3mini`
WickGreenFunction
​
WickGreenFunction
[ws,{
k
1
,
k
2
,…,
k
m
}]
returns
m×m
matrix
G
ij
:=
c
k
i
†
c
k
j

of Green's functions between fermion modes
k
i
and
k
j
with respect to
Wick state
ws
.
​
​
WickGreenFunction
[ns,{
k
1
,
k
2
,…,
k
m
}]
returns
NambuGreen
[{G,F}]
with
m×m
matrices
G
ij
:=
c
k
i
†
c
k
j

and
F
ij
:=
c
k
i
c
k
j

of normal and anomalous Green's functions, respectively, between fermion modes
k
i
and
k
j
with respect to
Wick state
ns
.
​
​
WickGreenFunction
[in]
is equivalent to
WickGreenFunction
[in,
Range
[n]]
, where
n
is the number of fermion modes for which input
Wick state
in
is defined for.
​
​
WickGreenFunction
[data]
or
WickGreenFunction
[data,{
k
1
,
k
2
,…}]
​ shows a dynamic progress indicator while calculating Green's functions for an (typically large) array
data
of Wick states.
​
​
WickGreenFunction
[{
k
1
,
k
2
,…}]
represents an operator form of WickGreenFunction to be applied to
Wick state
.
​
Details and Options

Examples  
(4)
Basic Examples  
(2)
Set the number of fermion modes to consider.
In[1]:=
$n=4;
Choose a Wick state.
In[2]:=
SeedRandom[354];
In[3]:=
ws=RandomWickState[$n]
Out[3]=
WickState
Modes: 4
Prefactor: 1

Make sure that the state is normalized.
In[4]:=
Norm[ws]
Out[4]=
1
Calculate the Green's functions associated with respect to the Wick state.
In[5]:=
gg=WickGreenFunction[ws];​​gg//ArrayShort
Out[5]=

0.576289
-0.103601+0.00354606
-0.284443+0.0628991
-0.0243118-0.109142
-0.103601-0.00354606
0.336377
-0.0410471-0.0741597
-0.131615+0.0373883
-0.284443-0.0628991
-0.0410471+0.0741597
0.577372
-0.234171+0.190114
-0.0243118+0.109142
-0.131615-0.0373883
-0.234171-0.190114
0.338214
,
0
0.0231364+0.320681
-0.0407901-0.105615
-0.0208461-0.139435
-0.0231364-0.320681
0
0.100234-0.121517
-0.145058+0.193261
0.0407901+0.105615
-0.100234+0.121517
0
0.0687233-0.136495
0.0208461+0.139435
0.145058-0.193261
-0.0687233+0.136495
0

Now, let us verify the above result by computing the Green's functions in the conventional way.
In[6]:=
Let[Fermion,c]​​cc=c[Range@$n]​​cd=Join[cc,Dagger@cc]
Out[6]=
{
c
1
,
c
2
,
c
3
,
c
4
}
Out[6]=

c
1
,
c
2
,
c
3
,
c
4
,
†
c
1
,
†
c
2
,
†
c
3
,
†
c
4

In[7]:=
alt=ExpressionFor[Matrix[ws],cc]//Chop
Out[7]=
0.41526
0
c
1
0
c
2
0
c
3
1
c
4
+(0.287588-0.177)
0
c
1
0
c
2
1
c
3
0
c
4
+(0.296626-0.0161201)
0
c
1
1
c
2
0
c
3
0
c
4
-(0.162554-0.4185)
0
c
1
1
c
2
1
c
3
1
c
4
+(0.193373-0.0448297)
1
c
1
0
c
2
0
c
3
0
c
4
-(0.050484-0.0891589)
1
c
1
0
c
2
1
c
3
1
c
4
+(0.00325422-0.526565)
1
c
1
1
c
2
0
c
3
1
c
4
-(0.220105+0.219277)
1
c
1
1
c
2
1
c
3
0
c
4

In[8]:=
EchoTiming[new=Dagger[alt]**Outer[Multiply,cd,Dagger@cd]**alt;]​​new//ArrayShort
⌚
2.52748
Out[8]//MatrixForm=
0.576289
-0.103601+0.00354606
-0.284443+0.0628991
-0.0243118-0.109142
…
-0.103601-0.00354606
0.336377
-0.0410471-0.0741597
-0.131615+0.0373883
…
-0.284443-0.0628991
-0.0410471+0.0741597
0.577372
-0.234171+0.190114
…
-0.0243118+0.109142
-0.131615-0.0373883
-0.234171-0.190114
0.338214
…
…
…
…
…
…
Compare the results.
In[9]:=
Normal[gg]-new//Chop//ArrayShort
Out[9]//MatrixForm=
0
0
0
0
…
0
0
0
0
…
0
0
0
0
…
0
0
0
0
…
…
…
…
…
…
In[10]:=
Normal[gg]-new//ArrayZeroQ
Out[10]=
True
​
In[1]:=
$n=4;​​$N=50;
Consider an array of Wick states.
In[2]:=
SeedRandom[362];
In[3]:=
data=Array[RandomWickState[$n]&,{$N,$N}];​​Dimensions[data]​​data〚;;2,;;2〛
Out[3]=
{50,50}
Out[3]=
WickState
Modes: 4
Prefactor: 1
,WickState
Modes: 4
Prefactor: 1
,WickState
Modes: 4
Prefactor: 1
,WickState
Modes: 4
Prefactor: 1

Calculate the Green's functions for individual Wick states.
In[4]:=
grn=WickGreenFunction[data];
In[5]:=
Dimensions[grn]
Out[5]=
{50,50}
Generalizations & Extensions  
(2)

SeeAlso
WickState
 
▪
WickUnitary
 
▪
NambuUnitary
 
▪
NambuHermitian
 
▪
NambuGreen
 
▪
NambuMatrix
TechNotes
▪
Majorana Fermions
▪
Quantum Many-Body Systems with Q3
▪
Q3: Quick Start
RelatedGuides
▪
Fermionic Quantum Computation
▪
Quantum Many-Body Systems
▪
Q3: Symbolic Quantum Simulation
RelatedLinks
▪
S. Bravyi and R. König (2012)
, Quantum Information & Computation 12, 925 (2012), "Classical simulation of dissipative fermionic linear optics."
▪
S. Bravyi (2005)
, Quantum Information & Computation 5, 216 (2005), "Lagrangian representation for fermionic linear optics."
▪
S. Bravyi and A. Y. Kitaev (2002)
, Annals of Physics 298, 210 (2002),"Fermionic Quantum Computation."
▪
B. M. Terhal and D. P. DiVincenzo (2002)
, Physical Review A 65, 032325, "Classical simulation of
noninteracting
-fermion quantum circuits."
▪
Mahn-Soo Choi (2022)
, A Quantum Computation Workbook (Springer).
""

© 2025 Wolfram. All rights reserved.

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