Quantumcomputing Cern
Quantumcomputing Cern
Elı́as F. Combarro
[email protected]
2 / 30
I, for one, welcome our new quantum overlords
4 / 30
Tools and resources
• Jupyter Notebooks
• Web application to create and execute notebooks that
include code, images, text and formulas
• They can be used locally (Anaconda) or in the cloud
(mybinder.org, Google Colab...)
• IBM Quantum Experience
• Free online access to quantum simulators (up to 32 qubits)
and actual quantum computers (1, 5 and 15 qubits) with
different topologies
• Programmable with a visual interface and via different
languages (python, qasm, Jupyter Notebooks)
• Launched in May 2016
• https://quantum-computing.ibm.com/
• Quirk
• Online simulator (up to 16 qubits)
• Lots of different gates and visualization options
• http://algassert.com/quirk
• D-Wave Leap
• Access to D-Wave quantum computers
• Ocean: python library for quantum annealing
• Problem specific (QUBO, Ising model...)
• https://www.dwavesys.com/take-leap
6 / 30
The shape of things to come
7 / 30
What is quantum computing?
Quantum computing
Quantum computing is a computing paradigm that exploits
quantum mechanical properties (superposition, entanglement,
interference...) of matter in order to do calculations
8 / 30
Models of quantum computing
• There are several models of quantum computing (they’re
all equivalent)
• Quantum Turing machines
• Quantum circuits
• Measurement based quantum computing (MBQC)
• Adiabatic quantum computing
• Topological quantum computing
• Regarding their computational capabilities, they are
equivalent to classical models (Turing machines)
10 / 30
What technologies are used to build quantum
computers?
11 / 30
What is a quantum computer like?
13 / 30
What are the elements of a quantum circuit?
14 / 30
Part II
15 / 30
What is a qubit?
• A classical bit can take two different values (0 or 1). It is
discrete.
• A qubit can “take” infinitely many different values. It is
continuous.
• Qubits live in a Hilbert vector space with a basis of two
elements that we denote |0i y |1i.
• A generic qubit is in a superposition
|ψi = α |0i + β |1i
where α and β are complex numbers such that
|α|2 + |β|2 = 1
17 / 30
The Bloch sphere
18 / 30
The Bloch sphere (2)
• From |ψi = cos 2θ |0i + eiϕ sin 2θ |1i we can obtain spherical
coordinates for a point in R3
(sin θ cos ϕ, sin θ sin ϕ, cos θ)
UU † = U † U = I
20 / 30
Reversible computation
• As a consequence, all the operations have an inverse:
reversible computing
• Every gate has the same number of inputs and outputs
• We cannot directly implement some classical gates such
as or , and, nand, xor ...
• But we can simulate any classical computation with small
overhead
• Theoretically, we could compute without wasting energy
(Landauer’s principle, 1961)
22 / 30
Action of a one-qubit gate
that is, into the state |ψi = (aα + bβ) |0i + (cα + dβ) |1i
• Since U is unitary, it holds that
23 / 30
The X or NOT gate
|0i X |1i
|1i X |0i
that is, it acts like the classical NOT gate
• On a general qubit its action is
24 / 30
The Z gate
• Its action is
|0i Z |0i
|1i Z − |1i
25 / 30
The H or Hadamard gate
• The H or Hadamard gate is defined by the (unitary) matrix
1 1 1
√
2 1 −1
• Its action is
|0i+|1i
|0i H √
2
|0i−|1i
|1i H √
2
• We usually denote
|0i + |1i
|+i := √
2
and
|0i − |1i
|−i := √
2
26 / 30
Other important gates
• Y gate
0 −i
i 0
• S gate
1 0
π
0 ei 2
• T gate
1 0
π
0 ei 4
• The gates X , Y and Z are also called, together with the
identity, the Pauli gates. An alternative notation is σX , σY ,
σZ .
27 / 30
Rotation gates
cos 2θ −i sin 2θ
−i θ2 X θ θ
RX (θ) = e = cos I − i sin X =
2 2 −i sin 2θ cos 2θ
cos 2θ − sin 2θ
θ θ θ
RY (θ) = e−i 2 Y = cos I − i sin Y =
2 2 sin 2θ cos 2θ
θ
!
e−i 2
−i θ2 Z θ θ 0 1 0
RZ (θ) = e = cos I−i sin Z = ≡
2 2 0
θ
ei 2 0 eiθ
28 / 30
Using rotation gates to generate one-qubit gates
θ θ θ
U ≡ e−i 2 r ·σ = cos I − i sin (rx X + ry Y + rz Z )
2 2
• For instance, choosing θ = π and r = ( √1 , 0, √1 ) we can
2 2
see that
θ 1
H ≡ e−i 2 r ·σ = −i √ (X + Z )
2
• Additionally, it can also be proved that there exist angles α,
β and γ such that
29 / 30
Hello, quantum world!
|0i H
|0i + |1i
√
2
• When we measure, we obtain 0 or 1, each with 50%
probability: we have a circuit that generates perfectly
uniform random bits!
30 / 30