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
  • QuantumWignerTransform
  • QuditBasis
  • QuditName
Wolfram`QuantumFramework`
QuantumWignerTransform
​
QuantumWignerTransform[obj]
transforms a quantum object into its phase-space representation.
​
Details and Options

Examples  
(22)
Basic Examples  
(5)
Generate the Wigner transformation a quantum state in the phase space:
In[1]:=
ρ=
QuantumState
["RandomMixed",3];​​
QuantumWignerTransform
[ρ]
Out[1]=
QuantumState
Pure state
Qudits: 1
Type: Vector
Dimension: 9
Picture: PhaseSpace
​

It is the same as the basis transformation of the doubled state into the corresponding Wigner basis:
In[2]:=
QuantumState
ρ["Double"],
QuantumBasis
[{"Wigner",ρ["Dimension"]}]%
Out[2]=
True
​
The state vector in the Wigner basis corresponds to PhaseSpace representation of the state
In[1]:=
ρ=
QuantumState
["RandomMixed",3];​​
QuantumWignerTransform
[ρ]["StateVector"]Flatten@ρ["PhaseSpace"]
Out[1]=
True
Note for odd dimensions, PhaseSpace has the dimension
d×d
In[2]:=
MatrixForm[ρ["PhaseSpace"]]
Out[2]//MatrixForm=
0.130718
0.118202
0.163459
0.0412652
-0.0685234
0.178726
0.240855
0.158132
0.0371668
​
For even dimensions, PhaseSpace has the dimension
2d×2d
In[1]:=
d=4;​​ρ=
QuantumState
["RandomMixed",d];​​ρ["PhaseSpace"]
Out[1]=
SparseArray
Specified elements: 64
Dimensions: {8,8}

If we partition the PhaseSpace into four blocks of the dimension
d×d
, the upper left one corresponds to the StateVector of the Wigner transformation:
In[2]:=
QuantumWignerTransform
[ρ]["StateVector"]Flatten[ρ["PhaseSpace"]〚;;d,;;d〛]
Out[2]=
True
​
Winger transformation of an operator:
In[1]:=
op=
QuantumWignerTransform

QuantumOperator
["X"]
Out[1]=
QuantumOperator
Picture: PhaseSpace
Arity: 1
Dimension: 4→4
Qudits: 1→1

Show its representation in the phase space:
In[2]:=
TraditionalForm[op]
Out[2]//TraditionalForm=

1

00

1

00
+
2

00

2

00
-
4

00

4

00
-
3

00

3

00

​
Wigner transformation of a quantum circuit (pay attention to wire dimensions)
In[1]:=
qc=
QuantumWignerTransform

QuantumCircuitOperator
["Bell"];​​qc["Diagram","ShowWireDimensions"True]
Out[1]=
Return the result of circuit on a register state:
In[2]:=
qc[]["Amplitudes"]
Out[2]=

1

00
1

00

1
16
,
1

00
2

00
0,
1

00
4

00
0,
1

00
3

00
0,
2

00
1

00
0,
2

00
2

00

1
16
,
2

00
4

00
0,
2

00
3

00
0,
4

00
1

00
0,
4

00
2

00
0,
4

00
4

00

1
16
,
4

00
3

00
0,
3

00
1

00
0,
3

00
2

00
0,
3

00
4

00
0,
3

00
3

00
-
1
16

Check that the Weyl transformation of the outcome is the same as the Bell state:
In[3]:=
QuantumWeylTransform[qc[]]["Formula"]
Out[3]=
1
2
|00〉+
1
2
|11〉
Scope  
(8)

Generalizations & Extensions  
(4)

Applications  
(4)

Interactive Examples  
(1)

SeeAlso
QuantumState
 
▪
QuantumBasis
 
▪
QuantumOperator
RelatedGuides
▪
Wolfram Quantum Computation Framework
""

© 2025 Wolfram. All rights reserved.

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