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
"Diagram" (QuantumCircuitOperator property)
​
"ShowWires"
True
whether to show horizontal wires
"WireLabels"
Automatic
wire labeling
"MeasurementWireLabel"
"c"
measurement wire label
"MeasurementWirePosition"
Top
measurement wire position
"ShowMeasurementWire"
True
whether to show a measurement wire
"ShowEmptyWires"
True
whether to render empty wires
Wires.
"ShowLabel"
False
whether to include a circuit label
"ShowGateLabels"
True
whether to show labels on gates
"RotateGateLabel"
Automatic
rotation angle of gate labels
Labels.
"Size"
.75
operator size
"HorizontalGapSize"
1
distance between operators
"VerticalGapSize"
1
distance between wires
Sizes.
"GateBackgroundStyle"
Automatic
gate background style rules
"GateBoundaryStyle"
Automatic
gate boundary style rules
"GateShapeFunction"
Automatic
custom function to render gates
Styling.
"ShowOutline"
False
outline a circuit with a frame
"ShowConnectors"
False
show points of wire-gate connections
"ShowWireEndpoints"
False
show wire end-points
Various graphics elements.
"SubcircuitLevel"
1
level of subcircuits to expand up-to
"SubcircuitOptions"
{}
pass additional diagram options to subcircuits
Sub-circuits.
Barriers can be added to shift gate positions:
In[460]:=
QuantumCircuitOperator
[{"X"2,"Barrier"[;;3],"Y"1,"Z"3}]["Diagram"]
Out[460]=
In[462]:=
QuantumCircuitOperator
[{"X"2,"Barrier"[2;;],"Y"1,"Z"3}]["Diagram"]
Out[462]=
"GateBackgroundStyle" and "GateBoundaryStyle" can include rules for changing gate appearance:
In[386]:=
QuantumCircuitOperator
[{"CX"{1,3},"CY"{3,2},"Z"}]["Diagram","GateBackgroundStyle"{"X"Yellow,"Z"Green},"GateBoundaryStyle"{"Y"Directive[Thickness[0.02],Red]}]
Out[386]=
"GateShapeFunction" can be specified to render gates with a custom function that takes {center, label, horizontalPositions, verticalPositions} arguments:
In[387]:=
QuantumCircuitOperator
[{"X","SWAP","SWAP"{1,3}}]["Diagram","GateShapeFunction""SWAP"Function[{center,label,hPos,vPos},{EdgeForm[Red],FaceForm[Directive[Red,Opacity[0.25]]],Rectangle[center-{.375,.75(Max[vPos]-Min[vPos])},center+{.375,.75(Max[vPos]-Min[vPos])},RoundingRadius0.1],Text[Style[Rotate[label,Pi/2],20,Blue],center]}]​​]
Out[387]=
"Size", "HorizontalGapSize" and "VerticalGapSize" correspondingly control gate size, distance between gates and a distance between wires:
In[388]:=
QuantumCircuitOperator
[{"H","X","T"{3}}]["Diagram","Size".5,"VerticalGapSize".275,"HorizontalGapSize".525]
Out[388]=
"SubcircuitLevel" specifies a level depth of sub-circuits to expand:
"SubcircuitOptions" can be used to pass options to sub-circuit diagrams:
"WireLabels" can be a list of labels or a list of rules:

© 2025 Wolfram. All rights reserved.

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