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

QuantumPlaybook

Guides

  • QuantumPlaybook

Tech Notes

  • Addition of Numbers
  • Baker-Hausdorff Lemma
  • Chiral Fermion Random Circuit
  • Clifford Operators: How to Test
  • Commutation Relations for Qubits
  • Entanglement Distillation
  • Generalized Pauli Operators: Implementation
  • Hatano-Nelson-Kitaev Model: Monte Carlo Simulation
  • Hatano-Nelson Model: Monte Carlo Simulation
  • Kitaev Chain
  • Kitaev Random Circuit
  • Λ-Matter in a Cavity
  • Measurement of Total Pauli Z
  • Non-Unitary Dynamics of Quantum States
  • Partial Trace: Physical Meaning
  • Quantum Dot Systems
  • A Quantum Playbook
  • Magnetic Exchange Coupling
  • Solovay-Kitaev Algorithm
  • Spin Code
  • Symmetry Effects On Quantum Master Equations
  • Transmon: Quantum Phase Model
  • Transposition as a Supermap
  • Variational Quantum Classifier: Iris
  • Variational Quantum Classifier: Parity
  • Variational Quantum Eigensolver: Transverse-Field Ising Model

Symbols

  • BlochEnergy
  • BlochFunction
  • QuantumPlaybookCheckUpdate
  • QuantumPlaybookEdition
  • QuantumPlaybookUpdate
  • TransmonEnergy
  • TransmonExponent
  • TransmonFunction
  • TransmonHamiltonian
Non-Unitary Dynamics of Quantum States
How Statistical Mixture Arises
Kraus Operators
Here, we gives a illustration how non-unitary dynamics of quantum states arise from the interaction of the system with its environment.
Supermap
Mapping of operators to other operators
PartialTrace
Partial trace over a subsystem of the system
LindbladSolve
Solution of the Lindblad equation (also known as quantum master equation)
Functions related to non-unitary dynamics of quantum states.
Make sure that the
Q3
package is loaded to use the demonstrations in this documentation.
In[246]:=
Needs["QuantumMob`Q3`"]
Throughout this document, symbol S will be used to denote qubits and Pauli operators on them.
In[247]:=
Let[Qubit,S]
How Statistical Mixture Arises
Let us consider a total system consisting of two qubits, one representing the “system” and the other the “environment”.
In[248]:=
SS=S[{1,2},$]
Out[248]=
{
S
1
,
S
2
}
Initially, the total system is assumed to be in a product state.
In[249]:=
in=Ket[SS]
Out[249]=

0
S
1
0
S
2

Suppose that we want to perform a single-qubit rotation around the x-axis. The required Hamiltonian of the system involves the Pauli-X operator.
In[250]:=
H0=S[1,1]*Ω/2;​​H0//PauliForm
Out[251]=
ΩX
2
We choose Ω as our basic energy scale to measure all other energies and time.
In[252]:=
Ω=1
Out[252]=
1
Unfortunately, the system is coupled to the environment via the Ising-type YY interaction. Here, J is the coupling constant.
In[253]:=
Hint=J/2*S[1,2]**S[2,2];​​Hint//PauliForm​​Let[Real,J]
Out[254]=
JY⊗Y
2
This the total Hamiltonian of the total system.
In[256]:=
HH=H0+Hint;​​HH//PauliForm
Out[257]=
X⊗I
2
+
JY⊗Y
2
The evolution of the total system as a closed system is governed by this time-evolution operator.
In[258]:=
U[t_]=MultiplyExp[-I*t*HH]//Elaborate;​​U[t]//PauliForm​​Let[Real,t]
Out[259]=
1
2
-
1
2

1+
2
J
t

1+

1+
2
J
t

I⊗I-
-
1
2

1+
2
J
t

-1+

1+
2
J
t

X⊗I
2
1+
2
J
-
-
1
2

1+
2
J
t

-1+

1+
2
J
t

JY⊗Y
2
1+
2
J
The above expression looks simpler with the trigonometric functions than the exponential function.
In[261]:=
U[t_]=MultiplyExp[-I*t*HH]//Elaborate//ExpToTrig;​​U[t]//PauliForm​​
Out[262]=
1
2
I⊗ICos
1
2
1+
2
J
t-Sin
1
2
1+
2
J
t1+Cos
1+
2
J
t+Sin
1+
2
J
t-
X⊗ICos
1
2
1+
2
J
t-Sin
1
2
1+
2
J
t-1+Cos
1+
2
J
t+Sin
1+
2
J
t
2
1+
2
J
-
JY⊗YCos
1
2
1+
2
J
t-Sin
1
2
1+
2
J
t-1+Cos
1+
2
J
t+Sin
1+
2
J
t
2
1+
2
J
Here is the final state of the total system.
In[263]:=
out=U[t]**in
Out[263]=
Cos
1
2
1+
2
J
t
0
S
1
0
S
2
-

1
S
1
0
S
2
Sin
1
2
1+
2
J
t
1+
2
J
+
J
1
S
1
1
S
2
Sin
1
2
1+
2
J
t
1+
2
J
Note that the above state has entanglement between the system and environment. To see this, the environment is traced out. After all, we have no access to the environment.
In[264]:=
rho=PartialTrace[out,SS,S[2]]//Elaborate​​Matrix[rho,S[1]]//MatrixForm
Out[264]=
1
2
+

-
1+
2
J
t

-1+
2
1+
2
J
t


y
S
1
4
1+
2
J
+
1
4
-
1+
2
J
t

1+
2
1+
2
J
t


z
S
1
Out[265]//MatrixForm=
1
2
+
1
4
-
1+
2
J
t

+
1
4

1+
2
J
t

-
-
1+
2
J
t

4
1+
2
J
+

1+
2
J
t

4
1+
2
J
-
1+
2
J
t

4
1+
2
J
-

1+
2
J
t

4
1+
2
J
1
2
-
1
4
-
1+
2
J
t

-
1
4

1+
2
J
t

The degree of entanglement between the system and environment in state out can be quantified by the von Neumann entanglement of reduced density operator rho.
In[266]:=
entropy[t_]=VonNeumannEntropy[PartialTrace[out,S[2]]]
Out[266]=
-
1
4
1+
2
J
Log[2]
-
1+
2
J
t

2

1+
2
J
t

1+
2
J
-
4
2
1+
2
J
t

+
2
J
+2
2
1+
2
J
t

2
J
+
4
1+
2
J
t

2
J
Log
-
1+
2
J
t

2

1+
2
J
t

1+
2
J
-
4
2
1+
2
J
t

+
2
J
+2
2
1+
2
J
t

2
J
+
4
1+
2
J
t

2
J
4
1+
2
J
-
1
4
1+
2
J
Log[2]
-
1+
2
J
t

2

1+
2
J
t

1+
2
J
+
4
2
1+
2
J
t

+
2
J
+2
2
1+
2
J
t

2
J
+
4
1+
2
J
t

2
J
Log
-
1+
2
J
t

2

1+
2
J
t

1+
2
J
+
4
2
1+
2
J
t

+
2
J
+2
2
1+
2
J
t

2
J
+
4
1+
2
J
t

2
J
4
1+
2
J

Plot the entropy as a function of time.
In[267]:=
Block[​​{J=0.8},​​Plot[Chop@entropy[t],{t,0,9},​​PlotRangeAll,​​FrameLabel{"time (Ωt)","von Neumann entropy"}]​​]
Out[267]=
Kraus Operators
For the particular example given in the precious section, we first construct dyadic products acting on the “environment”.
Now, construct the Kraus elements by tracing out the environment.
Check if the resulting Kraus elements satisfy the trace-preserving condition.
Finally, obtain the density operator using these Kraus elements and compare it with rho that was obtained by tracing out the environment in the composite state out.

© 2025 Wolfram. All rights reserved.

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