Wolfram Language
Paclet Repository
Community-contributed installable additions to the Wolfram Language
Primary Navigation
Categories
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
Create a Paclet
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
QuantumMeasurement
QuantumMeasurementOperator
QuantumOperator
QuantumPartialTrace
QuantumState
QuantumTensorProduct
QuditBasis
QuditName
Getting Started
How to install and load the paclet
Install the paclet from the cloud:
I
n
[
1
]
:
=
P
a
c
l
e
t
I
n
s
t
a
l
l
[
"
h
t
t
p
s
:
/
/
w
o
l
f
r
.
a
m
/
D
e
v
W
Q
C
F
"
,
F
o
r
c
e
V
e
r
s
i
o
n
I
n
s
t
a
l
l
T
r
u
e
]
O
u
t
[
1
]
=
P
a
c
l
e
t
O
b
j
e
c
t
N
a
m
e
:
W
o
l
f
r
a
m
/
Q
u
a
n
t
u
m
F
r
a
m
e
w
o
r
k
V
e
r
s
i
o
n
:
1
.
0
.
2
2
Load the paclet:
I
n
[
2
]
:
=
<
<
W
o
l
f
r
a
m
`
Q
u
a
n
t
u
m
F
r
a
m
e
w
o
r
k
`
Check whether definitions are now available:
I
n
[
3
]
:
=
N
a
m
e
s
[
"
Q
u
a
n
t
u
m
*
"
]
O
u
t
[
3
]
=
{
Q
u
a
n
t
u
m
B
a
s
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