Wolfram Quantum Team: quantum@wolfram.com
More Resources in Physics: https://www.wolfram.com/resources/physics/
Wolfram <> Quantum Computation
Wolfram <> Quantum Computation
Wolfram quantum computation framework
Documentation pages: https://resources.wolframcloud.com/PacletRepository/resources/Wolfram/QuantumFramework/
github page: https://github.com/sw1sh/QuantumFramework
Documentation pages: https://resources.wolframcloud.com/PacletRepository/resources/Wolfram/QuantumFramework/
github page: https://github.com/sw1sh/QuantumFramework
Install the paclet:
In[]:=
PacletInstall["Wolfram/QuantumFramework",ForceVersionInstall->True]
Out[]=
PacletObject
Load the context:
In[]:=
Needs["Wolfram`QuantumFramework`"]
Or, use this short URL to get the latest development version:
In[]:=
PacletInstall["https://wolfr.am/DevWQCF",ForceVersionInstall->True]Needs["Wolfram`QuantumFramework`"]
Quantum objects: states, operators, circuits and more
Quantum objects: states, operators, circuits and more
Define a random pure state for a qubit
In[]:=
state=QuantumState["RandomPure"]
Out[]=
QuantumState
Corresponding state vector
In[]:=
state["StateVector"]
Out[]=
SparseArray
In[]:=
Normal[state["StateVector"]]
Out[]=
{0.190019-0.491909,-0.848838-0.0373262}
Corresponding density matrix
In[]:=
MatrixForm@state["DensityMatrix"]
Out[]//MatrixForm=
0.278081+0. | -0.142934+0.424643 |
-0.142934-0.424643 | 0.721919+0. |
Corresponding Bloch vector
In[]:=
state["BlochPlot"]
Out[]=
Corresponding Cartesian coordinates {x,y,z}
In[]:=
state["BlochCartesianCoordinates"]
Out[]=
{-0.285868,-0.849287,-0.443837}
Corresponding spherical coordinates {r,θ,ϕ}
In[]:=
state["BlochSphericalCoordinates"]
Out[]=
{1,2.03067,-1.89548}
Quick Examples: Bloch Plots and Random Walks
Quick Examples: Bloch Plots and Random Walks
Rotate Bloch vector along x-axis by an angle:
In[]:=
Manipulate[(QuantumOperator["RZ"[θz]]@QuantumOperator["RY"[θy]]@QuantumOperator["RX"[θx]]@state)["BlochPlot"],{θx,0,2π},{θy,0,2π},{θz,0,2π},ControlPlacement->Top,TrackedSymbols:>{θx,θy,θz}]
Out[]=
Given the initial state , randomly apply rotations with random angles
|0〉
In[]:=
states=NestList[QuantumOperator[{RandomChoice[{"RX","RY","RZ"}],RandomReal[{-π/10,π/10}]}][#]&,QuantumState["0"],300];
Follow the random motion on the surface of Bloch sphere
In[]:=
coords=#["BlochCartesianCoordinates"]&/@states;
Put all points together and plot them
In[]:=
walk=Table[Show[states[[t]]["BlochPlot"],ListLinePlot3D[coords[[;;t]]]],{t,Length@states}];
In[]:=
ListAnimate[walk,AnimationRunningFalse]
Out[]=
As for the Practice Problems
As for the Practice Problems
◼
◼
Exploring #1
Exploring #1
Check out Wolfram U courses like Introduction to Finite Mathematics and Introduction to Probability for lots more on these topics:
Games like this can also be modeled as a Markov process:
Eventually, either the player or the house run out of chips!
Exploring #9
Exploring #9
Example Circuit
Example Circuit
What happens to the state of the qubit after each quantum operation?
What happens to the measurement probabilities if you did a measurement?
CHSH Game as a Teaching Example
CHSH Game as a Teaching Example
CHSH stands for John Clauser, Michael Horne, Abner Shimony, and Richard Holt.
Charlie is a referee sending random 0 or 1 to Alice and Bob
Let’s look at the statistics of Charlie
Let’s look at the statistics of Charlie
Plot probabilities (quantum predictions)
Simulate the measurement and count results
Classical approach to win CHSH game
Classical approach to win CHSH game
Alice and Bob strategy: report only 0, no matter what Charlie sends
Show some of the possible results:
Count only the winning results (this classical strategy hits a limit around 75% chance to win)
Quantum Strategies for the CHSH game
Quantum Strategies for the CHSH game
Alice and Bob can use a Bell state and leverage entanglement to win the game with higher probability than any classical strategy.
Calculate probabilities
What about the effects of errors?
What about the effects of errors?
Add noise to Alice’s wire and Bob’s wire:
Compute the probabilities of each outcome:
Condense this into the chance to win the game given the noise:
Plot results:
Should Bob’s strategy depend on the amount of noise in Alice’s wire?
Proceed as before:
Get a parametric function for the chance to win:
Use the rest of Wolfram Mathematica’s symbolic capabilities to analyze the result: