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

QuantumFramework

Tutorials

  • Getting Started

Guides

  • Wolfram Quantum Computation Framework

Tech Notes

  • Bell's Theorem
  • Circuit Diagram
  • Exploring Fundamentals of Quantum Theory
  • QPU Service Connection
  • Quantum object abstraction
  • Quantum Optimization
  • Second Quantization Functions
  • Tensor Network
  • Quantum Computation

Symbols

  • QuantumBasis
  • QuantumChannel
  • QuantumCircuitMultiwayGraph [EXPERIMENTAL]
  • QuantumCircuitOperator
  • QuantumDistance
  • QuantumEntangledQ
  • QuantumEntanglementMonotone
  • QuantumEvolve
  • QuantumMeasurement
  • QuantumMeasurementOperator
  • QuantumMeasurementSimulation
  • QuantumMPS [EXPERIMENTAL]
  • QuantumOperator
  • QuantumPartialTrace
  • QuantumPhaseSpaceTransform
  • QuantumShortcut [EXPERIMENTAL]
  • QuantumStateEstimate [EXPERIMENTAL]
  • QuantumState
  • QuantumTensorProduct
  • QuantumWignerMICTransform [EXPERIMENTAL]
  • QuantumWignerTransform [EXPERIMENTAL]
  • QuditBasis
  • QuditName
Wolfram`QuantumFramework`
QuantumEvolve
​
QuantumEvolve
[op]
represents a symbolic quantum state evolved in time with the symbolic Hamiltonian or Liouvillian
op
, from the initial register state, by setting the variable
t
as the time parameter.
​
​
QuantumEvolve
[op,qs,t]
represents a symbolic quantum state evolved in time with the symbolic Hamiltonian or Liouvillian
op
, from the initial state
qs
, and time as
t
.
​
​
QuantumEvolve
[op,qs,{t,
t
i
,
t
f
}]
represents a numeric quantum state evolved in time with the numeric Hamiltonian or Liouvillian
op
, from the initial numeric state
qs
, with variable
t
as time in the range
t
i
to
t
f
.
​
​
QuantumEvolve
[op,
None
,…]
represents an evolution operator of the Hamiltonian or Liouvillian
op
.
​
​
QuantumEvolve
[op,{
L
1
,
L
2
,…},…]
specify Lindblad jump operator.
​
​
QuantumEvolve
[op,{
L
1
,
L
2
,…}{
γ
1
,
γ
2
,…},…]
specify gamma damping rates.
​
​
QuantumEvolve
[…,"AdditionalEquations"spec]
represents an evolution, given some additional specifications especially for piecewise or hybrid systems.
​
​
QuantumEvolve
[…,opt]
represents an evolution, given options specified by
opt
, which can be any options similar to
NDSolve
or
DSolve
.
​
​
QuantumEvolve
[…,"ReturnEquations"True]
returns differential equations, corresponding to the desired dynamics specified.
​
Details and Options

Examples  
(10)
Basic Examples  
(4)
Evolve a symbolic quantum state by a time-independent Hamiltonian, with independent variable 
t
:
In[1]:=
ψf=
QuantumEvolve

QuantumOperator
["X"],
QuantumState
[{α,β}],t
Out[1]=
QuantumState
Pure state
Qudits: 1
Type: Vector
Dimension: 2

Start with register state, without specifying any independent variable (note 
t
will be treated as formal parameter):
In[2]:=
QuantumEvolve

QuantumOperator
["X"]
Out[2]=
cos(t.)|0〉-sin(t.)|1〉
If initial state is
None
,
QuantumEvolve
returns an evolution operator as
QuantumOperator
:
In[3]:=
U=
QuantumEvolve

QuantumOperator
["X"],None,t
Out[3]=
Cos[t]|0〉〈0|-Sin[t]|0〉〈1|-Sin[t]|1〉〈0|+Cos[t]|1〉〈1|
Evolve
|0〉
by above unitary:
In[4]:=
U[]
Out[4]=
cos(t)|0〉-sin(t)|1〉
​
Define a time-dependent Hamiltonian:
In[1]:=
h=
ω
1
2
Cos[α]
QuantumOperator
["Z"]+
ω
1
2
Sin[α]Cos[ωt]
QuantumOperator
["X"]+Sin[ωt]
QuantumOperator
["Y"]
Out[1]=
1
2
Cos[α]
ω
1
|0〉〈0|+
1
2
Sin[α](Cos[tω]-Sin[tω])
ω
1
|0〉〈1|+
1
2
Sin[α](Cos[tω]+Sin[tω])
ω
1
|1〉〈0|-
1
2
Cos[α]
ω
1
|1〉〈1|
Define a symbolic initial state:
In[2]:=
ψi=
QuantumState
[{Cos[α/2],Sin[α/2]}]
Out[2]=
QuantumState
Pure state
Qudits: 1
Type: Vector
Dimension: 2

Evolve the initial state with the Hamiltonian:
In[3]:=
ψf=
QuantumEvolve
[h,ψi,t];
Show the final state vector, with
λ=
-
2
ω
+2ωCos[α]
ω
1
-
2
ω
1
:
In[4]:=
FullSimplify[Normal[ψf["StateVector"]]]/.
_
λ,1
_
1λ
Out[4]=

-
1
2
tω

Cos
α
2
Cosh
tλ
2
+
Sinh
tλ
2
(ω-
ω
1
)
λ
,
tω
2

Sin
α
2
Cosh
tλ
2
-
Sinh
tλ
2
(ω+
ω
1
)
λ

​
Define a time-dependent Hamiltonian:
In[1]:=
hamiltonian=ω0
QuantumOperator
["JZ"]+2ωpCos[ω0t]
QuantumOperator
["JX"];
Set numerical values for Hamiltonian parameters:
In[2]:=
ω0=2π;ωp=π/10;​​tf=2π/ωp;
Find the final state :
In[3]:=
r1=
QuantumEvolve
[hamiltonian,{t,0,tf}];
Plot the evolution of Bloch vector components:
In[4]:=
Plot[Evaluate@Re@r1[t]["BlochVector"],{t,0,tf},PlotRangeAll,PlotLegends{"
r
x
","
r
y
","
r
z
"}]
Out[4]=
Include relaxation dynamics with raising and lowering spin angular momentum operators, in a Lindblad dynamical equation:
In[5]:=
γ=1/20;​​r2=
QuantumEvolve
hamiltonian,
γ

QuantumOperator
["J+"],
QuantumOperator
["J-"],{t,0,2tf}
Out[5]=
QuantumState
Parametric state
Qudits: 1
Type: Matrix
Dimension: 2

Plot the evolution of Bloch vector components:
In[6]:=
Plot[Evaluate@Re@r2[t]["BlochVector"],{t,0,2tf},PlotRangeAll,PlotLegends{"
r
x
","
r
y
","
r
z
"}]
Out[6]=
​
T
1
and
T
2
relaxation of spin:
In[1]:=
Ls=
1
T1
QuantumOperator
["J+"],
1
T1
QuantumOperator
["J-"],
1
T2
QuantumOperator
["JZ"];
Show the density matrix:
In[2]:=
$Assumptions=T1>0&&T2>0&&Ω0>0;
In[3]:=
FullSimplify/@Normal
QuantumEvolve
Ω0
QuantumOperator
["JZ"],Ls,
QuantumState
[Array[ρ,{2,2}]],t["Computational"]["DensityMatrix"]//MatrixForm
Out[3]//MatrixForm=
1
2
ρ[1,1]+
-
2t
T1

(ρ[1,1]-ρ[2,2])+ρ[2,2]
t-
1
T1
-
1
2T2
-Ω0

ρ[1,2]
t-
1
T1
-
1
2T2
+Ω0

ρ[2,1]
1
2
ρ[1,1]+ρ[2,2]+
-
2t
T1

(-ρ[1,1]+ρ[2,2])

© 2025 Wolfram. All rights reserved.

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