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`
Qudit
​
Qudit
is a species representing multi-level quantum systems.
​
Details and Options

Examples  
(3)
Basic Examples  
(2)
Choose a symbol to refer to the system of qudits.
In[1]:=
Let[Qudit,A]
This refers to the specific qudit.
In[2]:=
A[1,$]
Out[2]=
A
1
Consider the operator on the qudit that induces a transition from level 1 to level 2.
In[3]:=
op=A[1,12]
Out[3]=
(|2〉〈1|)
1
In[4]:=
in=Total@Basis@A[1]
Out[4]=

0
A
1
+
1
A
1
+
2
A
1

In[5]:=
op**in
Out[5]=

2
A
1

Refers to a Weyl operator on the qudit.
In[6]:=
op=A[1,$@{1,2}]
Out[6]=
1
X
1
2
Z
1
In[7]:=
in=Total@Basis@A[1]
Out[7]=

0
A
1
+
1
A
1
+
2
A
1

In[8]:=
op**in
Out[8]=
2/3
(-1)

0
A
1
+
1
A
1
-
1/3
(-1)

2
A
1

The Hermitian conjugate of the elementary operator on a qudit.
In[9]:=
Dagger@A[1,12]
Out[9]=
(|1〉〈2|)
1
Test where a given symbol is associated with a qudit.
In[10]:=
QuditQ[A]​​QuditQ[A[1,$]]​​QuditQ[A[1,12]]
Out[10]=
True
Out[10]=
True
Out[10]=
True
Check the dimension of qudits.
In[11]:=
Dimension[A]​​Dimension[A[1,12]]​​Dimension[A[{1,2},]]
Out[11]=
3
Out[11]=
3
Out[11]=
{3,3}
If the operator specification is out of the range defined by the dimension, it is treated as a null operator.
In[12]:=
A[1,13]​​A[1,11]
Qudit
::range
:The quantum level specification s should be within the range 0 ≤ s < d, where the dimension d = 3 for
A
1
.
​
Out[12]=
0
Out[12]=
(|1〉〈1|)
1
You can also create a qudit operator collectively. This shows how to species two transition operators at the same time.
In[13]:=
A[1,1{0,2}]
Out[13]=
{
(|0〉〈1|)
1
,
(|2〉〈1|)
1
}
Similarly,
In[14]:=
jj={0,1,2}​​rj=RotateLeft@jj​​A[1,jjrj]
Out[14]=
{0,1,2}
Out[14]=
{1,2,0}
Out[14]=
{
(|1〉〈0|)
1
,
(|2〉〈1|)
1
,
(|0〉〈2|)
1
}
Qudit operators may act on qudit operators. If two qudit operators belong to the same qudit, the result is simplified.
In[15]:=
A[1,12]**A[1,01]
Out[15]=
(|2〉〈0|)
1
In[16]:=
A[1,22]**A[1,01]
Out[16]=
0
In[17]:=
A[1,11]**A[1,01]
Out[17]=
(|1〉〈0|)
1
In[18]:=
v=A[1,01]**Ket[]​​A[1,22]**v​​A[1,22]**A[1,01]**Ket[]
Out[18]=

1
A
1

Out[18]=
0
Out[18]=
0
In[19]:=
A[1,01]**A[2,12]​​A[2,12]**A[1,01]
Out[19]=
(|1〉〈0|)
1
(|2〉〈1|)
2
Out[19]=
(|1〉〈0|)
1
(|2〉〈1|)
2
​
In[1]:=
Let[Qudit,A]
In[2]:=
FlavorCap@Thread[A[{1,2}]3]
Out[2]=
{
A
1
3,
A
2
3}
In[3]:=
%//InputForm
Out[3]//InputForm=
{A[1, $] -> 3, A[2, $] -> 3}
The level specification should be within the dimension.
In[4]:=
v=Ket[A[1]3]
KetVerify
::qudit
:Invalid value 3 for qudit
A
1
.
​
Out[4]=
$Failed
In[5]:=
v=Ket[A[1]2,A[{1,2}]2,A[{3,4}]1]
Out[5]=

2
A
1
2
A
2
1
A
3
1
A
4

In[6]:=
A[1,20]**v​​A[1,21]**v
Out[6]=

2
A
2
1
A
3
1
A
4

Out[10]//InputForm=
Ket[<|A[1, $] -> 2, A[2, $] -> 2, A[3, $] -> 1, A[4, $] -> 1|>]

© 2025 Wolfram. All rights reserved.

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