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`
NambuUnitary
​
NambuUnitary
[{u,v}]
represents a Bogoliubov-de Gennes transformation in the Nambu space that is characterized by the
n×n
upper-left and upper-right blocks
u
and
v
, respectively.
​
Details and Options

Examples  
(6)
Basic Examples  
(5)
Consider some fermion modes.
In[1]:=
$n=4;
Construct an initial state.
In[2]:=
in=WickState[{1,0},$n]
Out[2]=
WickState
Modes: 4
Prefactor: 1

In[3]:=
SeedRandom[354];
In[4]:=
wu=RandomNambuUnitary[$n]
Out[4]=
NambuUnitary
Target: All
Dimensions: {4,4}

In[5]:=
barU=Normal[wu];​​barU//ArrayShort​​barU.Topple[barU]//Chop//ArrayShort
Out[5]//MatrixForm=
-0.29782+0.0701004
0.368911+0.21472
-0.306222-0.0531149
0.415105-0.0586185
…
-0.214518-0.194513
-0.0545964-0.358606
-0.470166-0.25852
-0.257193-0.242454
…
-0.276196+0.0100007
-0.100239+0.478109
-0.241555+0.208507
-0.201799-0.326542
…
0.062476+0.341379
-0.421002+0.11886
0.0330062-0.338269
-0.106553+0.1523
…
…
…
…
…
…
Out[5]//MatrixForm=
1
0
0
0
…
0
1
0
0
…
0
0
1
0
…
0
0
0
1
…
…
…
…
…
…
In[6]:=
out=wu**in
Out[6]=
WickState
Modes: 4
Prefactor: 1

In[7]:=
Norm[out]//Chop
Out[7]=
1
​
In[1]:=
$n=4;
In[2]:=
SeedRandom[354];
Recall that in order to avoid redundancy,
NambuMatrix
only keeps the independent blocks U and V of the full unitary matrix,
U
:=
U
V
*
V
*
U

.
In[3]:=
wu=RandomNambuUnitary[$n]​​wu//ArrayShort
Out[3]=
NambuUnitary
Target: All
Dimensions: {4,4}

Out[3]=

-0.29782+0.0701004
0.368911+0.21472
-0.306222-0.0531149
0.415105-0.0586185
-0.214518-0.194513
-0.0545964-0.358606
-0.470166-0.25852
-0.257193-0.242454
-0.276196+0.0100007
-0.100239+0.478109
-0.241555+0.208507
-0.201799-0.326542
0.062476+0.341379
-0.421002+0.11886
0.0330062-0.338269
-0.106553+0.1523
,
0.176701-0.0352446
0.188394+0.20583
-0.356562+0.376824
-0.232192-0.135932
0.338876+0.305656
-0.0361622+0.173385
0.118451-0.257026
-0.219913+0.0604959
-0.543984+0.225341
0.139794+0.16616
0.155693-0.0674951
0.111754-0.0258787
-0.147337+0.128743
0.217871-0.228839
-0.0166458+0.140999
-0.615459-0.0325303

Normal
converts it to the full matrix.
In[4]:=
barU=Normal[wu];​​barU//ArrayShort
Out[4]//MatrixForm=
-0.29782+0.0701004
0.368911+0.21472
-0.306222-0.0531149
0.415105-0.0586185
…
-0.214518-0.194513
-0.0545964-0.358606
-0.470166-0.25852
-0.257193-0.242454
…
-0.276196+0.0100007
-0.100239+0.478109
-0.241555+0.208507
-0.201799-0.326542
…
0.062476+0.341379
-0.421002+0.11886
0.0330062-0.338269
-0.106553+0.1523
…
…
…
…
…
…
If the full matrix is provided,
NambuUnitary
automatically reduce it to the compact form.
In[5]:=
new=NambuUnitary[barU]
Out[5]=
NambuUnitary
Target: All
Dimensions: {4,4}

In[6]:=
new-wu//Chop//MatrixForm
Out[6]=

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

​
In[1]:=
$n=4;
In[2]:=
SeedRandom[354];
If you can working in the normal space (not the Nambu space), then give
{u,0}
to set the upper-right block to the zero matrix.
In[3]:=
u=RandomUnitary[$n];​​u//MatrixForm
Out[3]//MatrixForm=
0.248696-0.151076
0.222527+0.283521
0.462696-0.281419
0.369733+0.596186
-0.153909-0.13342
-0.279898+0.502144
0.320992+0.402601
0.425217-0.426717
0.504483-0.746275
0.157214+0.13215
-0.168049+0.146213
-0.270274-0.154023
0.0688615-0.240137
-0.633685-0.309629
0.426546-0.458293
-0.150427-0.159885
In[4]:=
wu=NambuUnitary[{u,0}];​​wu//ArrayShort
Out[4]=

0.248696-0.151076
0.222527+0.283521
0.462696-0.281419
0.369733+0.596186
-0.153909-0.13342
-0.279898+0.502144
0.320992+0.402601
0.425217-0.426717
0.504483-0.746275
0.157214+0.13215
-0.168049+0.146213
-0.270274-0.154023
0.0688615-0.240137
-0.633685-0.309629
0.426546-0.458293
-0.150427-0.159885
,
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

In[5]:=
new=NambuUnitary[{u,Zero[{$n,$n}]}]
Out[5]=
NambuUnitary
Target: All
Dimensions: {4,4}

In[6]:=
wu-new//Chop//MatrixForm
Out[6]=

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

​
In[1]:=
$n=4;
In[2]:=
SeedRandom[354];
In[3]:=
foo=RandomNambuUnitary[$n]​​bar=RandomNambuUnitary[$n]
Out[3]=
NambuUnitary
Target: All
Dimensions: {4,4}

Out[3]=
NambuUnitary
Target: All
Dimensions: {4,4}

In[4]:=
new=3*foo-2*bar
Out[4]=
NambuUnitary
Target: All
Dimensions: {4,4}

In[5]:=
3*First[foo]-2*First[bar]-First[new]//Chop//Map[MatrixForm]
Out[5]=

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

In[6]:=
new=Dagger[foo]
Out[6]=
NambuUnitary
Target: All
Dimensions: {4,4}

​

© 2025 Wolfram. All rights reserved.

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