Getting Started
Getting Started
How to install and load the paclet
Install the paclet from the cloud:
In[1]:=
PacletInstall["https://wolfr.am/DevWQCF",ForceVersionInstallTrue]
Out[1]=
PacletObject
|
Load the paclet:
In[2]:=
<<Wolfram`QuantumFramework`
Check whether definitions are now available:
In[3]:=
Names["Quantum*"]
Out[3]=
{QuantumBasis,QuantumChannel,QuantumCircuitOperator,QuantumDiagramProcess,QuantumDistance,QuantumEntangledQ,QuantumEntanglementMonotone,QuantumLabelName,QuantumMeasurement,QuantumMeasurementOperator,QuantumOperator,QuantumPartialTrace,QuantumPartialTranspose,QuantumState,QuantumStateEstimate,QuantumStateEstimation,QuantumStateSampler,QuantumTensorProduct,QuantumWignerTransform}
A quantum gate for the magic basis transformation (transforming 2 qubit computational basis to the Bell basis):
In[4]:=
qc=
[{"S","S"2,"H"2,"CNOT"{2,1}}];qc["Diagram"]
QuantumCircuitOperator |
Out[4]=
In[5]:=
qc
["00"]
["PhiPlus"]
QuantumState |
QuantumState |
Out[5]=
True
In[6]:=
qc
["10"]
["PsiPlus"]
QuantumState |
QuantumState |
Out[6]=
True
In[7]:=
qc
["01"]
["PhiMinus"]
QuantumState |
QuantumState |
Out[7]=
True
In[8]:=
qc
["11"]
["PsiMinus"]
QuantumState |
QuantumState |
Out[8]=
True
In[9]:=
u=
["H",{3}];qc=
[{{"C",u,{1,2}}}];qc["Diagram"]
QuantumOperator |
QuantumCircuitOperator |
Out[9]=
Define the quantum operator v as the square-root of u:
In[139]:=
v=
[Sqrt[u],"Label""V"]
QuantumOperator |
Out[139]=
QuantumOperator
|
Construct the decomposition circuit:
In[140]:=
decomp=
[{{"C",v,{2}},"CX",{"C",v["Dagger"],{2}},"CX",{"C",v,{1}}}];decomp["Diagram"]
QuantumCircuitOperator |
Out[141]=
""