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

  • Diagram
  • Exploring Fundamentals of Quantum Theory
  • Quantum Computation

Symbols

  • QuantumBasis
  • QuantumChannel
  • QuantumCircuitOperator
  • QuantumDistance
  • QuantumEntangledQ
  • QuantumEntanglementMonotone
  • QuantumEvolve
  • QuantumMeasurement
  • QuantumMeasurementOperator
  • QuantumMeasurementSimulation
  • QuantumOperator
  • QuantumPartialTrace
  • QuantumStateEstimate[EXPERIMENTAL]
  • QuantumState
  • QuantumStuff
  • QuantumTensorProduct
  • QuditBasis
  • QuditName
Wolfram`QuantumFramework`
QuantumMeasurementOperator
​
QuantumMeasurementOperator
[op,order,t,qb]
represents a measurement operator given by op that acts on a state at the qubits indexed in
order
of type t in the discrete quantum basis
qb
.
​
​
QuantumMeasurementOperator
[matrix,order,qb]
represents a measurement operator with matrix representation
matrix
, in the discrete quantum basis
qb
, that acts on a state at the qubits indexed in
order
.
​
​
QuantumMeasurementOperator
[basiseig,order]
represents a measurement with respect to the
QuantumBasis
basis
, with results eigenvalues
eig
, that acts on a state at the qubits indexed in
order
.
​
​
QuantumMeasurementOperator
[qm,qb]
changes the basis of the
QuantumMeasurementOperator
qm
, to the basis
qb
.
​
Details and Options

Examples  
(15)
Basic Examples  
(8)
Specify a
QuantumMeasurementOperator
by basis name:
In[1]:=
QuantumMeasurementOperator
["PauliZ"]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {1}
Dimension: 2→2
Qudits: 1→1

​
Specify a
QuantumMeasurementOperator
object given a basis with customized eigenvalues:
In[1]:=
QuantumMeasurementOperator
["Bell"{1,2,3,4}]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {1}
Dimension: 4→4
Qudits: 1→1

​
One can measure an observable by inputting its matrix:
In[1]:=
qmo=
QuantumMeasurementOperator
[PauliMatrix[2]]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {1}
Dimension: 2→2
Qudits: 1→1

In[2]:=
m=qmo
QuantumState
1+

2
,+
1
2

Out[2]=
QuantumMeasurement
Target: {1}
Measurement Outcomes: 2

Probability plot of measurement results:
In[3]:=
m["ProbabilityPlot"]
Out[3]=
Post-measurement states:
In[4]:=
#["Formula"]&/@m["StateAssociation"]//Map@Simplify
Out[4]=
0
1
2
(-1-
2
)0+(+
2
)1,1
1
2
(+
2
)0+(1+
2
)1
​
A measurement can be specified by inputting only the corresponding basis. For example, let's measure a 3D-qudit system

3
|0〉+
2
|1〉+
5
|2〉
in the state basis:
In[1]:=
ψ0=
QuantumState
[Sqrt@{-3,2,5},3]
Out[1]=
QuantumState
StateType: Vector
Qudits: 1
Type: Pure
Dimension: 3
Picture: Schrödinger
​

In[2]:=
qmo=
QuantumMeasurementOperator

QuantumBasis
[ψ0["Dimensions"]]
Out[2]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {1}
Dimension: 3→3
Qudits: 1→1

In[3]:=
m=qmo[ψ0];​​m["ProbabilityPlot"]
Out[3]=
​
A measurement can be defined in the computational basis for any number of qudits. For example, define measurement of a two-qudit system

3
|00〉+
2
|01〉+|10〉+
5
|11〉
in the computational basis:
In[1]:=
qmo=
QuantumMeasurementOperator
["Computational",{1,2}]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {1,2}
Dimension: 4→4
Qudits: 2→2

Note if not specified, the basis is by default the computational one:
In[2]:=
qmo
QuantumMeasurementOperator
[{1,2}]
Out[2]=
True
In[3]:=
m=qmo
QuantumState
[Sqrt@{-3,2,-1,5}];​​m["ProbabilityPlot"]​​
Out[3]=
​
A one-qudit measurement operator can act on system of many qudits when the order (target qudit for measurement) is given (by default it will be the 1st qudit):
In[1]:=
qmo=
QuantumMeasurementOperator
["ComputationalBasis",{2}]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {2}
Dimension: 2→2
Qudits: 1→1

In[2]:=
qmo
QuantumState
[{"UniformSuperposition",2}]["StateAmplitudes"]
Out[2]=
000
1
2
,010,10
1
2
,110,1000,01
1
2
,100,11
1
2

​
Define measurement operator by a QuantumBasis object (as an eigenbasis) and a list of eigenvalues:
In[1]:=
qmo=
QuantumMeasurementOperator
["Bell"{1,2,3,4}]
​
Test each element of POVM is explicitly positive semi-definite:
Test the complete relation of POVM elements:
Define the quantum measurement using POVM:

© 2025 Wolfram. All rights reserved.

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