0% found this document useful (0 votes)
2 views

Chapter 16c

Quantum computing utilizes quantum mechanics to perform calculations much faster than classical computers, leveraging phenomena such as superposition and entanglement. Key algorithms like Grover's and Shor's demonstrate its potential for tasks like searching and factoring. However, practical challenges include the need for extremely low temperatures and the fragile nature of qubits.

Uploaded by

Lohitha Jangala
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Chapter 16c

Quantum computing utilizes quantum mechanics to perform calculations much faster than classical computers, leveraging phenomena such as superposition and entanglement. Key algorithms like Grover's and Shor's demonstrate its potential for tasks like searching and factoring. However, practical challenges include the need for extremely low temperatures and the fragile nature of qubits.

Uploaded by

Lohitha Jangala
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 38

Quantum computing

Based on C Kaufman, R. Perlman, etc, Network Security, 2023


1
. . . the most incomprehensible thing about the world is
that it is comprehensible.

Albert Einstein

2
• A computer that takes advantage of quantum mechanics
phenomena.
• A quantum computer can do certain calculations much faster than
conventional computers
• For some tasks, it can compute with only storage as if it were
operating on values in parallel

What is a Quantum Computer


3
Serious limitations
• If you read its state, you only read one value, with the others
disappearing

• Most designs need to operate at temperatures close to absolute zero

• The short lifespan of the information in a qubit.

What is a Quantum Computer


4
Important Quantum algorithms

• Grover’s algorithm: reduces the search time to the square root of the
size of the search space

• Shor’s algorithm: can efficiently factor numbers and calculate


discrete logs

What is a Quantum Computer


5
. . . trying to find a computer simulation of physics
seems to me to be an excellent program to follow out. .
. . the real use of it would be with quantum mechanics.

. . . Nature isn’t classical . . . and if you want to make a


simulation of Nature, you’d better make it quantum
mechanical, and by golly it’s a wonderful problem,
because it doesn’t look so easy.
Richard Feynman

What is a Quantum Computer


6
The theory of computation has traditionally been
studied almost entirely in the abstract, as a topic in
pure mathematics.
This is to miss the point of it. Computers are physical
objects, and computations are physical processes.
What computers can or cannot compute is determined
by the laws of physics alone, and not by pure
mathematics.

David Deutsch

What is a Quantum Computer


7
Overview, Scope
• Theoretical basis for quantum computing.
• Practical basis for quantum computing
• Near-term potential of quantum computing
• Other applications of quantum information

Qubits, gates and vector spaces


8
• Computes based on information stored in bits
• A bit is either 0 or 1: so with 3 bits the possible states are

000, 001, 010, 011,100, 101, 110, 111


• Classical computers use gates (eg AND, NOT) and take a number of
bits and output a number of bits
• Example: an AND gate input output
00 0
01 0
10 0
11 1

What is a classical computer


9
• A photon behaves as a qubit, where polarization can be thought of as a quantum
state

• Interpret up/down polarization as 1, right/left as 0, and anything else as in between.

• If a polarized filter is exactly aligned with the photon’s polarization it will pass
through it.

• If the filter is off from the photon’s polarization, it will not pass

• If the filter is off from the photon’s polarization, it passes through with probability 1/2

• If the photon is polarized at an angle relative to the filter the probability it will

pass is

Examples of a qubit
10
Real life example
• Put two filters aligned from each other on top of each other: no light will pass.
• Insert a third filter between the two aligned from the others: ½ will pas though the
first filter, and of this ½ will pas through the third filter.
• Bell’s theorem: Locality (“speed of light”) and Realism (things have definite values)
are incompatible with quantum mechanics (the mechanics of waves)
(Bell's Theorem Video: The Quantum Venn Diagram Paradox, https://www.youtube.com/watch?v=zcqZHYo7ONswatch?v
Bell's Inequality Video: The weirdest theorem in the world | Nobel Prize 2022, https://www.youtube.com/watch?v=9OM0jSTeeBg )

Examples of a qubit
11
• QCs use qubits
• A qubit’s state can be a mixture of 0 and 1 – known as a superposition
• The notation for describing superposition is known as ket, a bar “” followed by
a right angle “.
• A classical bit is an intuitive concept, it is either equal to:

0= or 1 =
• The state of a single qubit (in superposition) is: where are complex numbers
that are probability amplitudes, such that the probability of outcome with
value is and that the probability of outcome with value is , so that .

QUBITS and superposition 12


Examples
• The state of one or more qubits is usually written:
• For two qubits: + the probability amplitudes determine how likely the
measured value will be: 00, 01, 10, 11.
• The squared absolute values of the probability amplitudes are
probabilities that we get the values 00, 01, 10, 11. So we must have

QUBITS and superposition


13
There is no way to observe the quantum
state of a qubit
without disturbing it
• Any attempt to measure (or read) the state of a qubit

results in with probability , and with probability .


• After the measurement, the system is in the measured state !
• That is, the post-measurement state , will beor
• Further measurements will always yield the same value.

QUBITS and superposition, measuring the state


14
With entanglement the state of a collection of qubits in superposition
can only be described collectively, not by specifying the states of
individual qubits.
– Entangled qubits are correlated such that they cannot be described
independently from each other.
– With entangled qubits, whatever operation happens to the state of one
qubit in an entangled collection of qubits, also affects the state of the
other qubits.
– When qubits become entangled, they remain so even when separated by
vast distances.

Multi-qubit states and entanglement


15
• Measurement typically happens one qubit at a time.
• For three entangled qubits with state :
– If the first qubit is measured and we get value 1, then the coefficients of all
states that don’t match the measured value (i.e. go to zero, so we only get
– if however the first qubit is measured and its value is 0, then the coefficient
goes to zero and we get the entangled 2 qubits whose coefficients are
increased linearly to make their sum of their squared absolute values to be
1, that is:

Measuring entangled multi-qubits


16
… no measurement today please …

… the cat is in a suspended state until measurement takes place ...

Quantum superposition is something that happens to particles, or groups of particles,


when they’re isolated from their environments.
Needing the particles to be isolated is why it’s so hard to build a quantum computer.
A cat isn’t found in a superposition of alive and dead states, because it constantly
Schrodinger’s cat interacts with its environment. These interactions essentially leak information.

17
• Entanglement 1: Given the state of multiple entangled qubits, one
cannot express the state of individual qubits separately.
Example: for 2 superposed qubits for entanglement we
need:
(
• Entanglement 2: Given the state of multiple entangled qubits,
measuring a qubit individually will reveal the state of other qubits.
Example: for the 2 superposed qubits:
– Measure qubit #1: it is 0 or 1 with probability ½. If it is 0 then qubit # 2 is 0; if it is 1
then qubit #2 is 1. Similarly for the measurement of qubit #2 So the qubits are
entangled.
• We shall show how to generate entangled qubits with CNOT gates in the
next slides
Multi-qubit entanglement
18
• It requires coefficients to express the state of entangled qubits. That
is, for entangled qubits we need 1,024 coefficients.
• If the qubits are not entangled then their state can be described with
only coefficients: for the first one, for the second, etc. Then for
qubits we only need 20 coefficients.

Multi-qubit states and entanglement


19
• The state of a qubit describes more than just its measurement
probabilities
• The superposition of |0 〉 and |1 〉 describes a physical structure, and
not merely a probability mass function over possible measurement
outcomes. For example:

all have a 50% chance of being in either state |0 〉 or |1 〉 if measured,


but all correspond to different superpositions, which will evolve
differently.

Qubits and superposition


20
•Various operators (gates) can cause superposition and/or entanglement
• The Hadamard gate takes a qubit that is or (a deterministic state) and
sets it to be a superposition of them.
• This is an example of “ interfering” two deterministic states to yield a
superposition state

Quantum operators as gates, Hadamard


gate 21
• If the input to the Hadamard gate was then we would add the
outputs of and in proportion to the coefficients of the input state: for
you multiply the output by and for by

• The reason why we can multiply the output of a state by the


coefficients of that superposed state is because of a property of
gates called linearity.

Linearity of Quantum gates


22
• We can write the state as a vector:
• A quantum gate can be represented by a matrix of multipliers. For example a
NOT-gate can be represented by 1 qubit gate:
• An example of a 2 qubit controlled not-gate CNOT is:

This gate flips the second qubit betweenalways


0 0and 1 only if the first qubit is 1

• To generate entangled qubits with CNOT gates:


superposed
entangled
; H(); CNOT()
States and gates as vectors and matrices
23
• An interesting consequence of linearity is that you cannot clone a qubit (or
a set of entangled qubits)

• As with conventional computers you might think that if you have a qubit
you could “XOR” it with a qubit in state and wind up with two qubits, each
in state .

• Instead you wind up with two entangled qubits in state

No Cloning theorem
24
• Linearity constrains the possible things a quantum gate can do.
• Another constraint is unitarity.
• Unitarity requires that: if the input state of the gate is normalized (the sum
of the squared absolute values of the coefficients is 1) then the output state
is normalized.
• Unitary gates:
• For the Hadamard gate

• Unitarity forbids certain kinds of gates. For example zeroize gates for which
the truth table output consists of zeroes (they do not have an inverse)
• Classical operations that cannot be turned into unitary gates are called
irreversible.

Unitarity of quantum gates


25
Quantum phenomena are described using linear
algebra, which is the study of vector spaces and linear
operations thereon.
The states of a quantum system form a vector space
and their transformations are described by linear
operators.
A finite-dimension vector space with a defined inner
product is also known as a Hilbert space. David Hilbert

The need for linear algebra and the Hilbert space


26
Ket and Bra: physical states of a quantum system ,
Hilbert space H: set of all possible state vectors describing a physical
system
Superposition: a linear combination of two or more state vectors

is also a state of the quantum system.


Completeness and linear independence: The set of qubits {} is a basis
for the state space if it is complete and linearly independent.
– It is complete if every state of the system is a linear combination of the basis.
– It is linearly independent if one cannot express a given basis vector as a linear
combination of the rest of the basis.

Vector spaces in quantum mechanics, Dirac notation 27


Ket and Bra notation: is a vector and is a linear mapping, where , are
the complex conjugates of , .

Inner product: = , is a real number


– If =0 then =0.

– If =0 then , are said to be orthogonal.

The norm (length) of the state vector is:

In particular, = =1 and = =0.

Vector spaces in quantum mechanics, Dirac notation


28
Example:
Let .
These can be represented by column vectors: , , and the dot product is:
= [0, , 0, ] = 0 0 + 0 + 0 + =

Vector spaces in quantum mechanics, Dirac notation


29
If , … , is a basis, then
, ... , , and .
In particular, the inner product: .
Matrix representation of operators: the operation can be written

Matrix representation 30
A geometrical representation of the state space of a
qubit
State Space postulate
The state of a quantum system can be described by a unit vector in
Hilbert space H Felix Bloch (1905 –1983)

The most general state written as a superposition of the basis


vectors , can be described by a vector
, where and

The Bloch sphere


31
• In a quantum computer all gates can be approximated with a relatively
small number of gates.
• A universal quantum gate set consists of
– a Hadamard gate
– a CNOT gate and a
– a Phase shift gate (shift historically known as ), described below.

-gate,
initial state final state

Universal quantum gates 32


• Brute force search in the square root of the time ) it would take
on a classical computer
• Assume we want to find which key encrypts a plaintext to a
ciphertext
• On a classical computer this would take on average keys (worst
case )

Lov Kumar Grover

Grover’s algorithm
33
• To superpose all possible -bit values onto qubits begin by zeroing
each qubit: measuring it, if its 1 inverting it and then applying the
Hadamard gate to each qubit.

• The amplitudes at this point that should be for each qubit. (Slide 21)

Grover’s algorithm, analysis


34
Outline
1. Initialize qubits such that, if the set were read to produce an n-bit value
then each of the possible is equally likely
2. Iteratively boost the probability of reading until after roughly iterations
the likelihood of reading is close to 1

Grover’s algorithm
35
Now loop over the following two operations

1. Multiply the amplitude of by -1 (negating the amplitude is a Unitary operation)

2. Reflect the amplitudes of all states about the mean of all the amplitudes

Figure 7-5. First Iteration of Grover’s Algorithm,

Grover’s algorithm, analysis 36


• The mean will be very close to the common amplitude, except for .

• Repeat the operations all the amplitudes get a little smaller (except for
).

Figure 7-5. First Iteration of Grover’s Algorithm,

Grover’s algorithm, analysis


37
• The Figure below shows how the probability of reading changes as the algorithm proceeds.
• Note that the probability of reading increase to a maximum and then decreasesas more
iterations are performed.
• So it is important to know when to stop the iteration.

Figure 7-6. Overview of Grover’s Algorithm

Grover’s algorithm, analysis


38

You might also like