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
Circuit Diagram
​
"Diagram" is a property of QuantumCircuitOperator, with some options for customizing that. Here we shall briefly review those options.
"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
"ShowExtraQudits"
False
whether to show non-positive ancillas
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[174]:=
QuantumCircuitOperator
[{"X"2,"Barrier"[;;3],"Y"1,"Z"3}]["Diagram"]
Out[174]=
In[175]:=
QuantumCircuitOperator
[{"X"2,"Barrier"[2;;],"Y"1,"Z"3}]["Diagram"]
Out[175]=
"GateBackgroundStyle" and "GateBoundaryStyle" can include rules for changing gate appearance:
In[176]:=
QuantumCircuitOperator
[{"CX"{1,3},"CY"{3,2},"Z"}]["Diagram","GateBackgroundStyle"{"X"Yellow,"Z"Green},"GateBoundaryStyle"{"Y"Directive[Thickness[0.02],Red]}]
Out[176]=
In[127]:=
QuantumCircuitOperator
[{"ZSpider"1{1,2},"XSpider"{2,3}2,"X","ZSpider"}]["Diagram","GateBackgroundStyle"{"ZSpider"Green,"XSpider"Red,"X"Orange}]
Out[127]=
"GateShapeFunction" can be specified to render gates with a custom function that takes {center, label, horizontalPositions, verticalPositions} arguments:
In[177]:=
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[177]=
"Size", "HorizontalGapSize" and "VerticalGapSize" correspondingly control gate size, distance between gates and a distance between wires:
In[178]:=
QuantumCircuitOperator
[{"H","X","T"{3}}]["Diagram","Size".5,"VerticalGapSize".275,"HorizontalGapSize".525]
Out[178]=
"SubcircuitLevel" specifies a level depth of sub-circuits to expand:
"SubcircuitOptions" can be used to pass options to sub-circuit diagrams:
Show extra qudits used by channels and measurements:
Extra qudits are always shown when there is an explicit gate there:
"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