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

  • 10. Bell's Theorem: CHSH inequality
  • 09. Bosonic Operator Algebra
  • 03. Circuit Diagram
  • 11. Exploring Fundamentals of Quantum Theory
  • 01. Getting Started
  • 17. An IBM Quantum Error Map
  • 15. Connecting to QPU Services
  • 13. Quantum Machine Learning in Phase Space
  • 04. Quantum Object Abstraction
  • 05. Quantum Object Composition
  • 16. Sending Queries to IBM QPUs
  • 06. Tensor Network
  • 07. Time Evolution
  • 12. Fast Gates on a Transmon
  • 02. Quantum Computation

Guides

  • Wolfram Quantum Computation Framework

Tech Notes

  • 14. Quantum Optimization
  • 08. Second Quantization Functions

Symbols

  • CliffordChannel
  • EinsteinSummation
  • GraphState
  • IBMJob
  • IBMJobSubmit
  • LocalComplement
  • PauliStabilizer
  • QiskitCircuit
  • QiskitTarget
  • QuantumBasis
  • QuantumChannel
  • QuantumCircuitMultiwayGraph [EXPERIMENTAL]
  • QuantumCircuitOperator
  • QuantumDistance
  • QuantumEntangledQ
  • QuantumEntanglementMonotone
  • QuantumEvolve
  • QuantumMeasurement
  • QuantumMeasurementOperator
  • QuantumMeasurementSimulation
  • QuantumMPS [EXPERIMENTAL]
  • QuantumOperator
  • QuantumPartialTrace
  • QuantumPhaseSpaceTransform
  • QuantumQASM
  • QuantumShortcut [EXPERIMENTAL]
  • QuantumSimilarity
  • QuantumStateEstimate [EXPERIMENTAL]
  • QuantumState
  • QuantumTensorProduct
  • QuantumWignerMICTransform [EXPERIMENTAL]
  • QuantumWignerTransform [EXPERIMENTAL]
  • QuditBasis
  • QuditName
  • StabilizerFrame
  • StabilizerStateQ
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
▪
QuantumMeasurementOperator
supports non-Hermitian measurement operator.
▪
Properties of a
QuantumMeasurementOperator
can be found using
QuantumMeasurementOperator
[…]["Properties"]
.
▪
The following properties are supported:
"Basis"
basis of the underlying operator
"Eigenbasis"
eigen basis of the target qubits
"TargetBasis"
basis of the targets qubits
"Dimensions"
dimensionality of the operator
"HermitianQ"
True
if the operator is Hermitian and
False
otherwise
"UnitaryQ"
True
if the operator is Unitary and
False
otherwise
"Order"
order
, the wire positions of the operator
"Eigenvalues"
QuditNames with eigenvalues of the operator
"EigenvalueVectors"
eigenvalues for each measurement
"Eigenvectors"
eigenvectors of the operator
"POVMElements"
POVM elements
"POVM"
POVM representation of measurement
"OrderedPOVMElements"
POVM elements adjusted according to their orders
"DiscardExtraQudits"
corresponding transformation, after tracing out the detector (i.e. the quantum system at which the measurement is encoded)
▪
When the measurement basis is not specified, the default is the computational basis.
Examples  
(12)
Basic Examples  
(4)
Specify a
QuantumMeasurementOperator
by basis name:
In[1]:=
QuantumMeasurementOperator
["X"]
Out[1]=
QuantumMeasurementOperator
Measurement Type: POVM
Target: {1}
Dimension: 2→4
Order: {1}→{0,1}

Return its traditional form
In[2]:=
QuantumMeasurementOperator
["X"]//TraditionalForm
Out[2]=
|
ℰ
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]=
|
ℰ
-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)


© 2026 Wolfram. All rights reserved.

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