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
Q3: Quick Start
Quantum Information Systems
Quantum Spin Systems
Quantum Many-Body Systems
​
Q3: Symbolic Quantum Simulation
is a symbolic quantum simulation framework written in the
Wolfram Language
to help study quantum information systems, quantum many-body systems, and quantum spin systems. It provides various tools and utilities for symbolic and numerical calculations on these representative quantum systems.
The first thing to do is loading the
Q3: Symbolic Quantum Simulation
package.
In[8]:=
Needs["QuantumMob`Q3`"]
Quantum Information Systems
◼
  • See also tutorial "
    Quantum Information Systems with Q3
    " for more details about the use of Q3 to study quantum information system.
  • ◼
  • See also guide "Quantum Information Systems" for a list of Q3 functions related to quantum information systems.
  • Make sure you have loaded the package.
    In[43]:=
    Needs["QuantumMob`Q3`"]
    Choose a symbol to use to refer to the set of qubits. For example, choose S, and declare it to be a qubit.
    In[44]:=
    Let[Qubit,S]
    The following expression involves two qubits S[1,$] and S[2,$]. The final index denotes different Pauli operators acting on the qubit. For example, S[1,3] means the Pauli Z acting on S[1,$].
    In[45]:=
    op=S[1,1]**S[2,1]+S[1,3]
    Out[45]=
    X
    S
    1
    X
    S
    2
    +
    Z
    S
    1
    Multiply another operator to the above expression.
    In[46]:=
    S[2,3]**op
    Out[46]=
    
    X
    S
    1
    Y
    S
    2
    +
    Z
    S
    1
    Z
    S
    2
    The computational basis state are specified by
    Ket
    [<|…|>]
    . As in many other Q3 functions, one can skip the final
    $
    for each qubit; it is added automatically. Therefore, the following two expressions give the identical result.
    In[47]:=
    Ket[S[1,$]1,S[2,$]1]​​Ket[S[1]1,S[2]1]
    Out[47]=
    
    1
    S
    1
    1
    S
    2
    
    Out[48]=
    
    1
    S
    1
    1
    S
    2
    
    Construct a quantum state by taking a linear superposition of the computational basis states.
    In[49]:=
    ket=Ket[S[1]0,S[2]0,S[3]0]+3Ket[S[1]1,S[2]1,S[3]1]
    Out[49]=
    
    0
    S
    1
    0
    S
    2
    0
    S
    3
    +3
    1
    S
    1
    1
    S
    2
    1
    S
    3
    
    Now, apply the operator on the quantum state.
    In[50]:=
    new=op**ket
    Out[50]=
    
    0
    S
    1
    0
    S
    2
    0
    S
    3
    +3
    0
    S
    1
    0
    S
    2
    1
    S
    3
    +
    1
    S
    1
    1
    S
    2
    0
    S
    3
    -3
    1
    S
    1
    1
    S
    2
    1
    S
    3
    
    Quantum Many-Body Systems
    ◼
  • See also tutorial "
    Quantum Many-Body Systems with Q3
    " for more details about the use of Q3 to study quantum many-body system.
  • ◼
  • See also guide "Quantum Many-Body Systems" for a list of Q3 functions related to quantum many-body systems.
  • Make sure that the
    Q3: Symbolic Quantum Simulation
    package is loaded.
    In[51]:=
    Needs["QuantumMob`Q3`"]
    Choose a symbol to denote a set of Fermions.
    In[52]:=
    Let[Fermion,c]
    Here is an operator expression involving two species of fermions, c[1] and c[2].
    In[53]:=
    op=c[1]**Dagger[c[1]]**c[2]**Dagger[c[2]]+Dagger[c[2]]**c[2]
    Out[53]=
    1-
    †
    c
    1
    c
    1
    +
    †
    c
    1
    †
    c
    2
    c
    2
    c
    1
    Multiply another operator to the above expression.
    In[54]:=
    Dagger[c[2]]**op
    Out[54]=
    †
    c
    2
    +
    †
    c
    1
    †
    c
    2
    c
    1
    Construct a set of computational basis with up to 2 particles.
    In[63]:=
    bs=Catenate@FermionBasis[c@{1,2},2]
    Out[63]=
    
    0
    c
    1
    0
    c
    2
    ,
    1
    c
    1
    0
    c
    2
    ,
    0
    c
    1
    1
    c
    2
    ,
    1
    c
    1
    1
    c
    2
    
    Apply the operator on each element in the basis.
    In[64]:=
    op**bs
    Out[64]=
    
    0
    c
    1
    0
    c
    2
    ,0,
    0
    c
    1
    1
    c
    2
    ,
    1
    c
    1
    1
    c
    2
    
    Or, construct a linear superposition of the computation basis states.
    In[65]:=
    ket=Total[bs]
    Out[65]=
    |
    0
    c
    1
    0
    c
    2
    +|
    0
    c
    1
    1
    c
    2
    +|
    1
    c
    1
    0
    c
    2
    +|
    1
    c
    1
    1
    c
    2
    
    Then, apply the operator on the above state.
    In[66]:=
    out=op**ket
    Out[66]=
    |
    0
    c
    1
    0
    c
    2
    +|
    0
    c
    1
    1
    c
    2
    +|
    1
    c
    1
    1
    c
    2
    
    Quantum Spin Systems
    ◼
  • See also tutorial "
    Quantum Spin Systems with Q3
    " for more details about the use of Q3 to study quantum spin system.
  • ◼
  • See also guide "Quantum Spin Systems" for a list of Q3 functions related to quantum spin systems.
  • Again, make sure that the
    Q3: Symbolic Quantum Simulation
    package is loaded.
    In[67]:=
    Needs["QuantumMob`Q3`"]
    Choose a symbol to use to denote different spins.
    In[68]:=
    Let[Spin,J]
    Here are two spin angular momentum operators acting on two spins S[1,$] and S[2,$], respectively.
    In[69]:=
    op=J[1,2]**J[2,2]+J[1,3]
    Out[69]=
    Z
    J
    1
    +
    Y
    J
    1
    Y
    J
    2
    Multiply another operator to the above expression.
    In[70]:=
    J[1,1]**op
    Out[70]=
    -
    1
    2
    
    Y
    J
    1
    +
    1
    2
    
    Z
    J
    1
    Y
    J
    2
    Here is the computation basis.
    In[71]:=
    bs=Basis[J@{1,2}]
    Out[71]=
    
    1
    2
    J
    1
    1
    2
    J
    2
    ,
    1
    2
    J
    1
    -
    1
    2
    J
    2
    ,
    -
    1
    2
    J
    1
    1
    2
    J
    2
    ,
    -
    1
    2
    J
    1
    -
    1
    2
    J
    2
    
    Specify a quantum state taking a superposition of basis states. Note that these two states are actually the same.
    In[72]:=
    ket=Ket[J@{1,2}1/2]+I*Ket[J@{1,2}-1/2]
    Out[72]=
    
    -
    1
    2
    J
    1
    -
    1
    2
    J
    2
    +
    1
    2
    J
    1
    1
    2
    J
    2
    
    Then, operate the above operator on the quantum state.
    In[73]:=
    out=op**ket
    Out[73]=
    -
    1
    4
    -
    
    2
    
    -
    1
    2
    J
    1
    -
    1
    2
    J
    2
    +
    1
    2
    -
    
    4
    
    1
    2
    J
    1
    1
    2
    J
    2
    
    RelatedGuides
    ▪
    Quantum Information Systems
    ▪
    Quantum Many-Body Systems
    ▪
    Quantum Spin Systems
    ▪
    Q3: Symbolic Quantum Simulation
    RelatedTechNotes
    ▪
    Quantum Information Systems with Q3
    ▪
    Quantum Many-Body Systems with Q3
    ▪
    Quantum Spin Systems with Q3
    RelatedLinks
    ▪
    Mahn-Soo Choi (2022)
    , A Quantum Computation Workbook (Springer).
    ""

    © 2025 Wolfram. All rights reserved.

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