Please get the latest version of quantum paclet from the developer link below
PacletInstall["https://wolfr.am/DevWQCF",ForceVersionInstall->True]Needs["Wolfram`QuantumFramework`"]
The official paclet link (PacletInstall[“Wolfram/QuantumFramework”]) is updated less frequently.
Always pay attention to the “order” for any operation, whether it’s a usual unitary or a different type like channels. If not specified, it will be automatically set, eliminating the need to specify identity on other qudits.
Define channel
In[]:=
ops={QuantumOperator["XX"],QuantumOperator["YY"]}Sqrt[.5];channel=QuantumChannel[ops]
Out[]=
QuantumChannel
Define a random pure state of 4-qubits
In[]:=
r=QuantumState[{"RandomPure",4}]
Out[]=
QuantumState
Action of above channel on the state
In[]:=
channel[r]
Out[]=
QuantumState
Quantum circuit version of above operation (same, but maybe helps for the sake of visualizations)
In[]:=
qc=QuantumCircuitOperator[{r->"Label"->"InitialState",channel}];qc["Diagram"]
Out[]=
Check that the action of circuit is the same as channel on initial state:
In[]:=
qc[]==channel[r]
Out[]=
True
Some new features:
QuasiProbability of initial state (for more details, look into documentation page of QuantumWignerTransform)
In[]:=
MatrixPlot[r["QuasiProbability"],PlotLegends->Automatic]
Out[]=
QuasiProbability of final state:
In[]:=
MatrixPlot[channel[r]["QuasiProbability"],PlotLegends->Automatic]
Out[]=