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.48304-0.394564,-0.166227+0.763781}
Corresponding density matrix
In[]:=
MatrixForm@state["DensityMatrix"]
Out[]//MatrixForm=
0.389008+0. | -0.221066+0.434524 |
-0.221066-0.434524 | 0.610992+0. |
Corresponding Bloch vector
In[]:=
state["BlochPlot"]
Out[]=
Corresponding Cartesian coordinates {x,y,z}
In[]:=
state["BlochCartesianCoordinates"]
Out[]=
{-0.442131,-0.869047,-0.221985}
Corresponding spherical coordinates {r,θ,ϕ}
In[]:=
state["BlochSphericalCoordinates"]
Out[]=
{1,1.79465,4.24176}
Winger transformed state vector
In[]:=
QuantumWignerTransform[state]
Out[]=
QuantumState
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[]=
Quantum Circuits
Quantum Circuits
Rotate a symbolic quantum state by a angle along y-axis
Show the state vector
Create a quantum circuit operator
Add new operations (another rotation and measurement):
Evaluate the result of circuit:
Show the probabilities for each outcome (note that no assumptions have yet been made about the nature of the parameters):
Add some constraints and simply the formulas:
Add bit-flip as noise, with the probability of error as p
Diagram
Run the noisy circuit
Show the result of noisy circuit
POVMs
POVMs
Create POVM
Corresponding basis for measurement (Wigner Minimal Informationally-Complete)
Add POVM into the circuit
Show measurement results
Show more details of diagram
CHSH Game
CHSH Game
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 (classical strategy never achieves more than 75%)
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:
Simon algorithm
Simon algorithm
A secret sequence
Create corresponding Simon oracle
Create the full circuit
Evaluate the Simon circuit
Plot probabilities
List of all potential results
Find the vector spanning the null space of these results (modulo 2)
The secret bit has been found:
Analog quantum computation
Analog quantum computation
Application to NMR
Application to NMR
Define a time-dependent Hamiltonian:
Define a symbolic initial state:
Evolve the initial state with the Hamiltonian:
Atom-trap quantum hardware
Atom-trap quantum hardware
Set time and other variables of the Hamiltonian:
Create the Hamiltonian operator
Evolve quantum state:
Plot the probability of observing the register state:
Connecting with quantum hardware
Connecting with quantum hardware
Analog quantum processing units: https://wolfr.am/WolframQuEra
Digital quantum processing units:
- AWS
- IBM quantum
Digital quantum processing units:
- AWS
- IBM quantum