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
  • Example Repository Functions
  • Exploring Fundamentals of Quantum Theory
  • Quantum object abstraction
  • Tensor Network

Symbols

  • QuantumBasis
  • QuantumChannel
  • QuantumCircuitMultiwayGraph [EXPERIMENTAL]
  • QuantumCircuitOperator
  • QuantumDistance
  • QuantumEntangledQ
  • QuantumEntanglementMonotone
  • QuantumEvolve
  • QuantumMeasurement
  • QuantumMeasurementOperator
  • QuantumMeasurementSimulation
  • QuantumMPS [EXPERIMENTAL]
  • QuantumOperator
  • QuantumPartialTrace
  • QuantumShortcut [EXPERIMENTAL]
  • QuantumStateEstimate [EXPERIMENTAL]
  • QuantumState
  • QuantumTensorProduct
  • QuantumWignerMICTransform [EXPERIMENTAL]
  • QuantumWignerTransform [EXPERIMENTAL]
  • QuditBasis
  • QuditName
Wolfram`QuantumFramework`
QuantumMeasurementOperator
​
QuantumMeasurementOperator
[matrix,target,basis]
represents a measurement operator with matrix representation
matrix
, in the quantum basis
basis
, that acts at the qubits indexed in
target
.
​
​
QuantumMeasurementOperator
[basis,target]
represents a measurement operator acting at the qubits indexed in
target
in the quantum basis
basis
.
​
​
QuantumMeasurementOperator
[basiseig,target]
represents a measurement with respect to the
basis
, with results eigenvalues
eig
, that acts at the qubits indexed in
target
.
​
​
QuantumMeasurementOperator
[
QuantumOperator
[...]["Diagonalize"],...]
represents a measurement operator in the basis of quantum operator's eigenstates, with its corresponding eigenvalues.
​
Details and Options

Examples  
(12)
Basic Examples  
(4)
Specify a
QuantumMeasurementOperator
by basis name:
In[1]:=
QuantumMeasurementOperator
["X"]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {1}
Dimension: 2→2
Qudits: 1→1
Hermitian: True
Order: {1}→{1}
Unitary: False
Dimensions: {2}→{2}
ParameterArity: 0
Parameters: {}

Return its traditional form
In[2]:=
QuantumMeasurementOperator
["X"]//TraditionalForm
Out[2]//TraditionalForm=
|
ℰ
0

+
〉〈

+
|+|
ℰ
1

−
〉〈

−
|
Note that above measurement resembles a spider-like transformation, with one input (bra) and two outputs (kets) where one of the outputs (denoted by
ℰ
i
) represents the environment (aka detector). Diagram representation of quantum measurement operator shows the detector/environment as the extra qudit:
In[3]:=
QuantumCircuitOperator

QuantumMeasurementOperator
["X"]["Diagram","ShowExtraQudits"True]
Out[3]=
When focused solely on measurement outcomes, one can readily compute them directly from the quantum state by appropriately transforming it into the relevant basis.
Generate a random pure state in the computational basis. Determine measurement outcomes by applying the quantum measurement operator associated with the X basis. Additionally, calculate measurement results directly from the state transformed into the X basis:
In[4]:=
state=
QuantumState
["RandomPure"];​​
QuantumState
[state,"X"]["Probabilities"]
QuantumMeasurementOperator
["X"][state]["ProbabilitiesList"]
Out[4]=
True
​
Specify a
QuantumMeasurementOperator
object given a basis with customized eigenvalues:
In[1]:=
QuantumMeasurementOperator
[basis]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {1}
Dimension: 4→4
Qudits: 1→1

Corresponding spectral representation:
In[2]:=
TraditionalForm[%]
Out[2]//TraditionalForm=
|
ℰ
-1
+
Ψ
〉〈
+
Ψ
|+|
ℰ
2
-
Φ
〉〈
-
Φ
|+|
ℰ
3
-
Ψ
〉〈
-
Ψ
|+|
ℰ
4
+
Φ
〉〈
+
Φ
|
​
A one-qudit measurement operator can act on system of many qudits.
In[1]:=
qmo=
QuantumMeasurementOperator
["X",{2}]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {2}
Dimension: 2→2
Qudits: 1→1

In[2]:=
mea=qmo
QuantumState
[{"RandomPure",2}]
Out[2]=
QuantumMeasurement
Target: {2}
Measurement Outcomes: 2

In[3]:=
mea["Probabilities"]
Out[3]=
|

+
〉0.327595,|

−
〉0.672405
Additional measurement operator can be applied on a quantum measurement:
In[4]:=
QuantumMeasurementOperator
[{1}][mea]["Probabilities"]
Out[4]=
|0

+
〉0.235724,|0

−
〉0.5117,|1

+
〉0.0918707,|1

−
〉0.160705
​
One can also input any set of operators,
{
E
m
}
with
∑
E
m
=
I
and
E
m
=

M
m
M
m
, to generalize measurements as positive operator-valued measures (POVMs):
In[1]:=
povm=
2
3
,0,{0,0},
1
6
,
1
2
3
,
1
2
3
,
1
2
,
1
6
,-
1
2
3
,-
1
2
3
,
1
2
;
Test each element of POVM is explicitly positive semi-definite:
In[2]:=
PositiveSemidefiniteMatrixQ/@povm
Out[2]=
{True,True,True}
Test the complete relation of POVM elements:
In[3]:=
(Plus@@povm)IdentityMatrix[2]
Out[3]=
True
Define the quantum measurement using POVM, and apply it on a quantum state:
In[4]:=
QuantumMeasurementOperator
[povm]
Out[4]=
QuantumMeasurementOperator
Measurement Type: POVM
Target: {1}
Dimension: 2→6
Qudits: 1→2

In[5]:=
QuantumMeasurementOperator
[povm]
QuantumState
[{1,1}]["ProbabilityPlot"]
Out[5]=
Scope  
(2)

Generalizations & Extensions  
(2)

Applications  
(3)

Possible Issues  
(1)

SeeAlso
QuantumMeasurement
 
▪
QuantumOperator
RelatedGuides
▪
Wolfram Quantum Computation Framework
""

© 2025 Wolfram. All rights reserved.

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