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
  • 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
  • QuditBasis
  • QuditName
Wolfram`QuantumFramework`
QuantumMeasurementOperator
​
QuantumMeasurementOperator
[qb,order]
represents a measurement operator acting at the qubits indexed in
order
in the quantum basis
basis
.
​
​
QuantumMeasurementOperator
[matrix,order,basis]
represents a measurement operator with matrix representation
matrix
, in the quantum basis
basis
, that acts at the qubits indexed in
order
.
​
​
QuantumMeasurementOperator
[basiseig,order]
represents a measurement with respect to the
basis
, with results eigenvalues
eig
, that acts at the qubits indexed in
order
.
​
​
QuantumMeasurementOperator
[
QuantumOperator
[...]["Diagonalize"],...]
represents a measurement operator in the basis of quantum operator's eigenstates, with its corresponding eigenvalues.
​
Details and Options

Examples  
(11)
Basic Examples  
(6)
Specify a
QuantumMeasurementOperator
by basis name:
In[1]:=
QuantumMeasurementOperator
["Z"]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {1}
Dimension: 2→2
Qudits: 1→1
Hermitian: True
Order: {1}→{1}
Unitary: False
Dimensions: {2}→{2}

​
Specify a
QuantumMeasurementOperator
object given a basis with customized eigenvalues:
In[1]:=
QuantumMeasurementOperator
["Bell"{2,3,-1,4}]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {1}
Dimension: 4→4
Qudits: 1→1

Corresponding spectral representation:
In[2]:=
%["Operator"]//TraditionalForm
Out[2]//TraditionalForm=
2|
+
Φ
〉〈
+
Φ
|+3|
-
Φ
〉〈
-
Φ
|-|
+
Ψ
〉〈
+
Ψ
|+4|
-
Ψ
〉〈
-
Ψ
|
​
A measurement can be specified by inputting only the corresponding basis. For example, consider a quantum state in 3D:
In[1]:=
ψ=
QuantumState
["RandomPure",3]
Out[1]=
QuantumState
Pure state
Qudits: 1
Type: Vector
Dimension: 3
Picture: Schrödinger
​

Define the measurement operator, given the basis of the state
In[2]:=
qmo=
QuantumMeasurementOperator
[ψ["Basis"]]
Out[2]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {1}
Dimension: 3→3
Qudits: 1→1

Generate the corresponding measurement object, by applying the measurement operator on the state:
In[3]:=
m=qmo[ψ];​​m["ProbabilityPlot"]
Out[3]=
​
A measurement can be defined in the computational basis for any number of qudits. Define the measurement operator of two qubits:
In[1]:=
qmo=
QuantumMeasurementOperator
[{1,2}]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {1,2}
Dimension: 4→4
Qudits: 2→2

Measure qubits in the computational basis, given a random state:
In[2]:=
m=qmo
QuantumState
[{"RandomPure",2}];​​m["ProbabilityPlot"]​​
Out[2]=
​
A one-qudit measurement operator can act on system of many qudits.
In[1]:=
qmo=
QuantumMeasurementOperator
[{2}]
Out[1]=
QuantumMeasurementOperator
Measurement Type: Projection
Target: {2}
Dimension: 2→2
Qudits: 1→1

In[2]:=
mea=qmo
QuantumState
[{"RandomPure",2}];​​mea["ProbabilityPlot"]
Out[2]=
​
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:
In[4]:=
qmo=
QuantumMeasurementOperator
[povm]
Out[4]=
QuantumMeasurementOperator
Measurement Type: POVM
Target: {1}
Dimension: 2→6
Qudits: 1→2

In[5]:=
qmo
QuantumState
[{1,1}]["ProbabilityPlot"]
Out[5]=

© 2025 Wolfram. All rights reserved.

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