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`
WickMeasurement
​
WickMeasurement
[k]
represents a measurement of the occupation number on Dirac fermion mode
k
.
​
​
WickMeasurement
[{
k
1
,
k
2
,…}]
represents a sequence of measurements on Dirac fermion modes
{
k
1
,
k
2
,…}
.
​
​
WickMeasurement
[{{
v
1
,…,
v
2n
}}]
represents a measurement of the occupation number of the
Dirac fermion
mode
b:=
Σ
k
v
k
c
k
constructed from Majorana fermion modes
c
k
.
​
​
WickMeasurement
[mat]
represents a sequence of measurements of
†
b
i
b
i
, where
b
i
:=
Σ
j
mat
ij
c
j
are dressed
Dirac fermion
modes consisting of bare Majorana fermion modes
c
j
.
​
​
WickMeasurement
[spec][ws]
simulates the measurement on Wick state
ws
, and returns the post-measurement state.
​
Details and Options

Examples  
(13)
Basic Examples  
(3)
Consider a certain number of fermion modes.
In[1]:=
$n=4;
Take an initial state.
In[2]:=
SeedRandom[370];
In[3]:=
in=RandomWickState[$n]
Out[3]=
WickState
Modes: 4
Prefactor: 1

Make sure it is normalized.
In[4]:=
Norm[in]
Out[4]=
1
Pick a fermion mode to perform the measurement on.
In[5]:=
msr=WickMeasurement[1]
Out[5]=
WickMeasurement[1]
Operate the measurement on the input state.
In[6]:=
out=msr[in]​​Readout[msr]
Out[6]=
WickState
Modes: 4
Prefactor: 1

Out[6]=
0
Repeatedly perform measurements.
In[7]:=
{states,data}=Transpose@Table[​​{out=msr@in,Readout[msr]},​​10​​];
In[8]:=
states//ArrayShort
Out[8]=
WickState
Modes: 4
Prefactor: 1
,WickState
Modes: 4
Prefactor: 1
,WickState
Modes: 4
Prefactor: 1
,WickState
Modes: 4
Prefactor: 1
,…
In[9]:=
data
Out[9]=
{0,0,1,1,1,0,1,1,0,1}
​
Let us verify the above results by conventional methods. To analyse the results, consider a specific set of fermion modes.
In[1]:=
Let[Fermion,c]​​cc=c[Range@$n]​​cd=Join[cc,Dagger@cc]
Out[1]=
{
c
1
,
c
2
,
c
3
,
c
4
}
Out[1]=

c
1
,
c
2
,
c
3
,
c
4
,
†
c
1
,
†
c
2
,
†
c
3
,
†
c
4

In[2]:=
EchoTiming[​​alt=ExpressionFor[Matrix[in],cc]//Chop​​]
⌚
0.008723
Out[2]=
0.437105
0
c
1
0
c
2
0
c
3
0
c
4
-(0.391019+0.307682)
0
c
1
0
c
2
1
c
3
1
c
4
+(0.0836836+0.220554)
0
c
1
1
c
2
0
c
3
1
c
4
+(0.116218+0.100849)
0
c
1
1
c
2
1
c
3
0
c
4
+(0.194988+0.105684)
1
c
1
0
c
2
0
c
3
1
c
4
-(0.382598-0.279783)
1
c
1
0
c
2
1
c
3
0
c
4
+(0.0774607+0.262235)
1
c
1
1
c
2
0
c
3
0
c
4
+(0.357178-0.0765382)
1
c
1
1
c
2
1
c
3
1
c
4

Define the projection operator for each outcome.
In[3]:=
Clear[prj]​​prj[0]:=AbsSquareLeft[c@First@msr]​​prj[1]:=AbsSquareRight[c@First@msr]
Get the post-measurement states by applying the projection operators corresponding to the outcomes.
In[4]:=
mint=Chop@KetNormalize[(prj/@data)**alt];
Compare the post-measurement states from the two methods.
In[5]:=
vv=Matrix[states,cc];​​ww=CanonicalizeVector/@Matrix[mint,cc];​​vv-ww//ArrayZeroQ
Out[5]=
True
​
Let us examine the distribution of measurement outcomes. To do that, first calculate the probability to get 0.
In[1]:=
prb=Dagger[alt]**prj[0]**alt//Chop
Out[1]=
0.517949
Perform the measurement repeatedly many times.
In[2]:=
data=Table[msr@in;Readout[msr],samples=1000];
In[3]:=
Histogram[data,​​PlotRange{0,samples},​​FrameLabel{"outcome","counts"}]
Out[3]=
Scope  
(3)

Applications  
(3)

Properties & Relations  
(4)

SeeAlso
WickState
 
▪
WickUnitary
 
▪
WickNonunitary
 
▪
WickCircuit
 
▪
RandomWickCircuitSimulate
 
▪
NambuUnitary
 
▪
NambuHermitian
 
▪
NambuGreen

© 2025 Wolfram. All rights reserved.

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