here we go hey welcome back horncon
thanks for uh listening to us uh shoot
uh the crap right now you have dr mark
carney he's a technical specialist in
research and he's going to give you a
great talk on tears for quantum fierce
uh see you guys after hello hello hello
thank you very much so yes my name is
mark carney bank of england
uh i am very glad to be presenting a
quick kind of uh
overview of quantum and security so
we're going to look at
what quantum means and how it relates to
security what do you need to know the
idea is
here not to give a condensed lecture
series with just slides of mathematics
there is one math slide sorry no
actually no i'm not sorry
you know just i'm sorry for my lack of
apology there you go
um what i'm gonna do is i'm gonna sort
of present uh today uh this this
particular talk now with added kittens
um so we're gonna sort of go through
what is quantum and then we're gonna
look at the way in which it's gonna be
affecting security and it's kind of like
if you listen to quantum people too much
they'll say things like
the wind is coming it is already blowing
and that's kind of like yeah that's not
very helpful
um what we need is actual facts and
figures and a way of looking at this
quite critically so that's what we're
going to do today
just facts resources links there's qr
codes so if you have a mobile phone or a
tablet get that ready because that'll be
best to view some of the links so you
know what is a quantum anyway
if you ask google you'll hear one of a
few things
okay you'll find that quantum is
dishwasher powder finish
powerball quantum ultimate sounds very
very
sort of feeling so powerful you know the
quantum ultimate
um it's also beer the quantum state is a
4.2
section ipa i think they sell this at
asda which is our version of walmart
um then there's sure for men motion
sense quantum dry
for your man who's a photon in the
streets and a boson in the sheets
um and that might lead to needing a
quantum buggy
quantum pram yes genuinely there are
prams
marketed as quantum and my favorite
is toilet roll bog roll
lou roll toilet paper um
yeah seriously quantum is everywhere
it's a bit of a buzz word what does it
actually mean so quantum means just this
it's the smallest finite piece of
something i did check
quantum toilet roll they do not sell you
the smallest finite piece of toilet roll
don't ask how i checked that experiment
is between me and me alone
so quantum effects are what you're
seeing when someone says we're going to
use a quantum technology
they're talking about quantum effects
and there's generally two that they're
talking about
okay superposition and entanglement
now superposition is when a particle is
in multiple states simultaneously and
i'm going to give you kind of a sense of
what that really means
okay and then entanglement has a lot of
quantum
woo about it but realistically two
particles can
in a sense become inseparable and
actually the inner sense bits really
important there there's a
mathematical thing the the polynomials
are inseparable for those who care
um and they are linked in such a way
that if you measure one
you know some information about the
other okay
so that's all entanglement really means
that's what superposition really means
and they're kind of very very useful
effects but they only really happen at
the quantum level we just don't see them
at the macro level where we live and
breathe and talk to each other
so we we i could go at length about what
these are but i'm not going to i'm not
really going to touch on entanglement at
all
superposition will become relevant but
realistically when you hear
quantum technology you're usually
dealing with one of these two
or possibly a similar technology which
is kind of related to the like wave
particle
duality or something um so what i if
there's only one slide you look at
let it be this one okay uh there are
four domains of effect that you're going
to see
for quantum when it comes to security
the first thing you're going to see is
quantum computing
quantum computing does pose somewhat of
a threat theoretically at least
to classical cryptography then you're
going to see post-quantum cryptography
which is basically a cryptography that
doesn't rely on the same hardness
problem that regular cryptography
has for the last 20 30 40 years
and we're going to look why do we care
why does nist care about it we're going
to look at quantum key distribution
which is where you
use quantum effects to actually derive a
key and do key exchange
and lastly we're going to have a very
quick look at some called some quantum
algorithms
to show how actually maybe we can use
these like in our day-to-day
uh work uh to gain benefit from quantum
computers and their capabilities
so um this is the first one if you want
to have a look please scan that qr code
i'll give people a second i will also
put the link
uh in the discord afterwards but
someone's probably got a faster fingers
than i have
um so it's just a geogebra just to sort
of demonstrate
what's going on okay i'm going to assume
you can see this if not i
uh i guess quan con 2 will tell me um so
this is how we usually think
about uh uh bits
okay you have either an up going towards
a zero
or you're in a one state and you're
never in both you're always in one or
the other okay
so you have two states for one bit and
then you have four states between two
bits
and then you have eight states between
three bits and it just keeps multiplying
up in powers of two from there
right now that's absolutely fine um
and we use that as inspiration uh when
it comes to quantum bits
so a qubit has a very similar structure
now we change the notation you'll see
things like this this is a zero with
like a funny line and a right angle
bracket here
that's called a ket um the if it points
the other way it's called a bra
bra for those of you realizing yes
that's why
amazon called their quantum service
bracket
um so yeah if it's pointing down here
it's going to be in the one
state so the ket being state so there's
a zero state and the one state
and again we can be sort of either or
okay
or you know what we could be i don't
know somewhere in a 3d plane
okay now when you're in this 3d plane
you can actually say well we're going to
have
um you know some other vector and some
other points and actually there's a
whole infinitive of points they line up
on a sphere like
this okay so when you're dealing with a
qubit this is probably the best picture
to have
this point can be all the way up at zero
okay
or it can be all the way down in one
but it can also be for example exactly
halfway in between
and this is superposition because it's
neither in zero or one it's exactly
halfway
and that's superposition of these
particular states okay
so when you talk here about sort of the
magic of qubits the magic
of quantum this is the picture that i'd
like you to have in your mind
okay this is the kind of model that
you're going to be using
okay so you you don't just have zero or
one you have
a zero and a one and then you have this
kind of sphere of possibilities
uh that you can use on top of that okay
now
i have a play with that the judge bar is
online i'll put the link in the discord
if someone
doesn't beat me to it um and there's
there's the link again on the qr code if
you want to be quick so now that we've
gone through that that's kind of the
overall
model that's the fundamental kind of
model that you deal with with a qubit
okay um at least that's the one that
most people talk about
so we're going to have a very quick very
fast quantum computation
class zero we're not going to go into
any details i'm just going to give you
the shape for those who care of what the
maths kind of looks like and it's very
difficult to
not have maths in a talk about quantum
computing right
because we haven't yet got the
abstraction layers
quantum computers are very close to
zx80s okay
you have to understand the very low
level of what's going on in order to
really program
and make it make it do things so what's
the model well a qubit
a quantum bit is a computing unit that
can be some combination
of zero state and one state not just one
or the other
it could be somewhere in between as well
mathematically it looks like this two
lines of math that's all
um so you get an alpha and beta these
are complex numbers
so when you saw this sphere earlier what
two of those axes were real one was
imaginary
okay and you have a rule alpha squared
plus beta squared must equal to one
because otherwise it doesn't sit on the
sphere basically um and then you can
express the states as follows the zero
state is the pointing up state the one
zero state
the one state is the pointing down state
the zero one state
and so some state psi is a combination
of those two
right so you can write rewrite this as a
as a vector of alpha of the top and beta
on the bottom
so with that in mind the model is called
the block sphere spelled this way for
those who want to go and have a look
but you don't really need to understand
that all you need to see is that there's
little two place vectors
and then you need to know how to
actually interact with them so
classically a classical computer is a
sequence of gates
okay and or nand nor xor we're all very
very familiar with those
so logic gates form regular computers
well quantum gates
form quantum computers and quantum gates
are two by two matrices to match with
the
two place vectors okay and then for
every qubit you add
uh you get the next power of two size
matrix
being uh in play and that's all that
happens
you string the various matrices together
and what you get
is what's called a quantum circuit and
that's your quantum algorithm
so you'll see these kinds of line
diagrams and those are quantum circuits
okay now a brief brief break it's fine
that's fine these are your
post math kittens to make sure we can
get everyone through all right
um little kid a little little one in the
middle i can let naughty uncle
schwerdinger near you
so um what do these circuits look like
well they look like this
so this is a circuit it's got three uh
qubits here
and it's got a classical register at the
bottom it's three bits wide but it
doesn't really matter
we assume that they are always in the
zero reset state
um until we sort of manipulate them with
gates so the first gate is a paulie x
that turns it from a zero to a one
that's what that does
the hadamard gate the h box is the
superposition gate so you put it into
one and then you put it into
superposition from there
okay and that's different from putting
it into superposition from a zero
and then you have interesting gates like
this so this is the controlled not
gate so this is a not if and only if the
upper bit is a one
so if this is a one then whatever goes
in here is
is not the output okay and then if this
is a zero it's a straight through
okay and that's quite straightforward
why do we need this
turns out a c naught controlled knot
which is what this is
um is actually an entangler and
detangler kind of useful
so you just build these out into a
quantum algorithm you'll get something
like this the little black boxes are
measurements
so you we measure qubit zero and we
measure qubit one and then we measure
qubit two and we put the answer into the
register
okay now this circuit has a very fancy
name
it's called the quantum teleporter
very star trek so what this does is it
just teleports the state
of qubit one into the state of qubit two
um
even if you don't know what the state in
q1 is so i said that the
x sets it to one so you would expect
then to see
the one moved over into the most
significant bit of the output
and if you measure it that's what you
see this is what it looks like
it might look suspiciously like python
that's because it is
this is all run from a python notebook
this is a qasm simulator
how did i come up with these how did i
learn what to do well i looked at the
ibm quantum experience this is what it
looks like in fact i can actually show
you
messing around with little circuits so
it's drag and drop
i want to add a qubit i press a button
it's really straightforward i can just
go through uh add some qubits oh i don't
i like the way this one's arranged so i
can
rearrange it like that and if you know
what you're doing this is quite
straightforward
and then i can just go okay i want a
measurement there and i want a
measurement there i can always check the
phase here
and i can look up here how many times i
want to run it which computer do i want
to use and just go run
you'll also note here there's a thing
called qasm
there's a quantum assembly language okay
it's
not as complex as cisc from x86
uh nowhere near in fact it's not really
as complicated as
as arm but it does exist and it lets you
describe the circuits as sequences of
gates
okay so kind of the theory of quantum
computing is growing
and it's only going to kind of get more
and more so like showing people and
exposing people to this is
i think entirely useful and appropriate
especially with quantum computing
not necessarily being a million miles
away we're going to come to exactly what
i mean by that
in a minute so let's just look at some
resources i'm not going to go on any
further about this
i'm going to show you um some resources
so the first resource is kisked
kiskit is a really easy to use very well
documented
uh quantum circuit uh library
for python it plugs directly into the
ibm quantum experience so you can use
the ui
or you can just use the api from a
jupiter notebook and it
just works it just connects up you give
it the api token which you can sign up
for free
and you can just go and start running
quantum circuits in fact if you get
really bored in this talk
you can have a play with that it's a you
know it's kind of fun i think
then again i'm that kind of person so
once you've sort of made a few circuits
and haven't had a bit of a play you
might
want to go oh i want some more
algorithms well one resource is called
quantiki
which i'm not gonna lie sounds like a
cocktail
in fact actually maybe i should go like
can we go into like a def con
on a selfie with jack daniel holding a
quan tikki
we need to make that happen somehow i'll
have a think about that anyway
um you might go to kwan tiki first
quantity is a little bit easier to read
uh quantum algorithm zoo is more
comprehensive i think but
um it's kind of written by postgraduate
physics students for
postgraduate physics students so you
might not understand everything
everywhere
because there's it's still mostly
physicists doing this okay i'm a
mathematician by training
um that's what my phd is in uh so i'm
looking at this and i'm like
that physics that's physics okay because
they do weird things like sort of
they've got these equations and they go
and this bit doesn't matter and i'm like
doesn't it you can't just do that
turns out you can and there's good
reasons for it it's how they sort of
rationalize
uh the math that sort of makes the
physics and the physical world make
sense for us
but these are these are some good
resources if you want to actually look
at
some quantum computing resources there's
loads out there the three that i'm
going to mention here the ibm quantum
experience i've already mentioned
um likewise there's also d-wave leap
um now d-wave's different d-o d-wave is
a thing called a quantum
annealing machine which is different
from the ibm
quantum experience quantum computer i
wouldn't say how or why or what is
different
but you'll notice differences um and the
last one is uh
it's like azure quantum i mean i'd love
to talk about them i've been trying to
email them for six weeks if anyone knows
anyone at azure quantum
do let me know because it's like i'd
love to just
just get some more documentation ask
some questions but they're like
it's like trying to contact monks so
let's get back to security which is why
we're all here
what breaks and how
shaw's algorithm what does it do
it takes a number and it finds its prime
factors now you can write a program to
do that
in python it's a few lines right the
difference is your python program will
take
exponentially long to run compared to
uh you know sort of the act of actually
just finding the number by multiplying
two numbers together what do i mean
take the numbers 2 and 60.
multiply those together you get 120. but
if you want to find out which two
numbers i had
to multiply together to get 120 you have
seven pairs excluding 120 and one
you've got seven pairs of 14 numbers to
choose from and find
right and that that's why it's a hard
problem as the numbers get bigger and
bigger and bigger and bigger the number
of factors
also gets bigger and bigger and bigger
and bigger and bigger
um so much so that we we we know that
it's a very
very hard problem mp hard problem to
actually factor prime
uh factor numbers and see if and find
their primes uh the frames that make
them up
now quantum computers
can factor numbers in sub-exponential
time
and that's why it's a thing that's why
people are losing their heads
okay it's bad because we rely on
factoring to be hard if factoring is no
longer hard
rsa and ecc immediately start to have
problems okay likewise grover's
algorithm poses problems
to basically any symmetric cipher
because what it does is it lets you do a
dictionary search or
a database search that it has n many
entries
and lets you do it in square root of n
many tries what does that really mean
well
square root is taking a thing to the
exponent of one half if you don't
believe me
i mean have a go so if you take
the key length and halve it that's the
effective length now
it's not actually quite that simple
there's a lot of nuance and detail which
i am skipping way over
but for the purposes of genuine
intuition take the key length harvard so
as128 becomes
aes64 or des
as you might want to call it aas256
becomes as128 now as128 is still very
secure it's all got 128 bits of security
inside it
but you know it it you still have this
problem
okay doesn't sort of go away okay if you
listen to crypto pros they just go
quantum
and that's it end of talk and it's like
no
there's more to it than that what can we
do about it there's quite a few things
we can do about it
so shaw's algorithm is going to take
roughly seven years
to really sort of work to be workable on
a quantum computer this is making
assumptions
the assumptions are that we're going to
double the number of qubits in a single
machine
every year and we're going to have
lots and lots and lots of stability so
at the moment
a qubit is stable for i think the
longest is a
millisecond no microsecond um
however you would need orders of days
and weeks potentially so there's a lot
of engineering
and magic and plumbing and you know sort
of absolute wizardry that has to happen
before these things come about
seven years for sure's algorithm eight
years based on estimates
for grover's algorithm to become
workable against say aes256
right if you look at mit's most
efficient algorithm which runs in a few
hours still needs 20 million cubits
right so like this is you know sort of
seven to 15 years
eight to 18 years potentially uh away
and that's making
grand assumptions okay now nist's
project
is going to come come live but there's
things you can do in the short term
first of all you can use longer keys if
this is a genuine threat
if you're actually caring about this
then use longer keys
all right um 496 bit for rsa
use ecc with p384 um upgrade to as256 as
much as possible
and also use aas in gcm mode gal while
counter mode
is really kind of nifty it's got that
lovely gawa feel which gives that nice
auth tag
it makes it more complicated doesn't
make it quantum resist more quantum
resistant in
a sense of algorithms but it does make
it like you've got to have more qubits
you've got to do more work
okay so just make it harder the way that
you usually do when you want to make
things
sort of uh more secure you you start off
by making things more difficult
ultimately we're really going to rely on
nist making their mind up
at some point about post-quantum
cryptography
now um nist are on their way
okay and we're gonna have a little look
at what's going on with uh post quantum
cryptography
um they have currently sort of uh got it
down to round three
okay so let's just have a little look at
what's going on so
casual crypto with its algorithms that
are vulnerable to quantum
algorithms ah no no we don't want that
we want post quantum cryptography my
friend
that is the way forward okay what does
it mean
it means this it's cryptography that
doesn't rely
on number factoring i think we know
content computers are really good at
it doesn't rely on that problem for its
security that's all it really means okay
so there's several different schemes out
there the finalists are these
so lattice-based crypto super singular
isogeny is on elliptic curves
that's going to get you a good score
scrabble and there's some hashing
algorithms as well
so let's look at what's going on okay so
this is a very bare-bones example if you
want more
uh link at the bottom there's a summer
school slides which are really good
these are taken from those slides okay
verbatim not quite but never enough um
where we're just gonna look at an old
problem where we know the solution and
then we can modulate it to make it that
we don't have a solution
and also we don't think content
computers do either
right so here's what happens you have an
array of numbers
and then you have a secret and you
multiply that secret down and then take
the answer
mod 13. okay now if you did a linear
algebra course at high school which by
the way is all you really need
mathematically to do a lot of quantum
stuff
then you'll know that this isn't secure
there's a thing called gaussian
elimination
uh which is a very straightforward
algorithm that actually lets you easily
work out what the secret is okay if i
know
the random array and the output can very
straightforward work out what's going on
in the middle
okay however i can make it more
difficult if i do this
if i add a little bit of noise there's
two bits of noise the first bit is
whether it's a zero or one
and the second bit is whether it's
adding or taking away and there's a
confusion with two of the bits because
if you add zero or take away zero then
you know
it's the same thing right so you've got
this little bit of noise
that doesn't get recorded it just gets
used in this calculation
so here you can see that all the numbers
on the right in the output
have kind of modulated just a little bit
so the problem so this is called with a
this is the with errors bit of learning
with errors okay
this random noise skews everything just
a little bit
but of course over very large arrays and
very large numbers and lots and lots of
iterations
that error grows and grows and grows so
actually the problem becomes this given
the random array and the output
which by the way is what forms your
public key for learning with errors and
a similar thing for ring learning with
errors the difference being that you
don't store the whole array
the array is made up of rotational
permutations of like various rows
um given an array and given an output
and facts you know about it like it's
modulo 13
find the red thing okay find the secret
and that's actually really really hard
we know it's hard because it's the same
problem as this if i
put a blue dot in the middle okay and
then
i have this lovely lattice array so i
have all these lovely parallel
vectors here and these lovely parallel
vectors going this way then if i put a
dot in the middle
what's the shortest what's the nearest
valid point
to that dot now in two dimensions it
doesn't look particularly difficult
but as you put more and more and more
dimensions on this as your arrays get
bigger and bigger and bigger and bigger
right
that problem gets exponentially hard and
the important point is this there is no
known quantum algorithmic speed up for
this problem
okay and that my friends is what makes
it
post quantum okay we haven't used number
factoring anywhere
and okay you might say but how does it
know if it's a one or a zero when the
error term isn't is thrown away
because what you get is you get like
0.012 or you get 0.998
so you get numbers that are very close
to 1 and very close to zero and you go
close enough close enough close enough
close enough close enough
and you get the right answer out the
other end if you try and do it
any other way you get nonsense which is
kind of the idea of cryptography
so we know it works but we don't know
yet whether nist think that it works
well enough for it to be used
uh widespread so when will this be
commonplace well
currently the candidates just so they're
here again by the way yes it is a
hashing algorithm called
crystals dilithium okay just in case you
wonder that's the actual name
um there's these which are set out so
psych i think
is from microsoft with aws well i know
aws i think support it
um ntru comes out of i can't remember
where it comes out about how to double
check that i'm sure someone in the chat
somewhere will correct me um but like
these things have all been submitted
these are the main eight
and then what you're going to have as
well there's lots of backups so you i
think you've got like 13 or 15 backups
waiting in the wings because as they've
they started with a huge list of them
and gradually they've worked out this
isn't as strong as we thought this is a
problem over here
someone finds a new attack against the
crypto system and then they sort of take
it out of the running
so what's left should be pretty good now
we're into round three we can expect
more attacks to come about we can expect
more writing to come about we don't even
know it's going to be called though
i don't even know if nist know what it's
going to be called you had dez and aes
and that was like we're going to choose
one i don't think we're going to get one
i think we're going to have in around
two years we're going to have
multiple ciphers with lots of notes and
requirements and considerations
and recommendations and estimations and
all
manner of different key lengths okay i i
think it's a mistake to say that nist
are gonna go
here is the solution i think that
genuinely it's gonna be
so here's what we've ended up with and
we're just gonna have to make sense of
it
somehow the way that we obviously have
done
in every other area of security
again i make every apology for my lack
of apology for the maths but here's a
little math cut with a little mew
just going to leave that there but i'm a
mathematician
okay the comedy is a bonus all right
okay
so quantum key distribution is
the next kind of topic i'm not going to
go too much in depth all i'm going to do
is say that in 1984
uh bennett and bressar worked out a way
of using quantum effects to make a
provably secure
quantum key exchange mechanism okay so
this became known as bb-84 okay
and then there was a subsequent system
called eckhart 91 or e-91
and then after that there's been loads
ever since all kind of modulations and
changes bipide and all these other
things
um and these are in use there are
companies that produce these systems in
fact bt and toshiba announced just
yesterday that they were building the
uk's first
quantum secure industrial network
between key uk smart production
facilities
so what are they doing well here's a
kind of a rough thing this paper by the
way at the bottom
is really good it's a little bit
physically and messy at times but it's
actually
the bits that you that are quite
readable are worth having a look at if
this if you this tickles your fancy and
you're a little bit curious
so here's what happens alice chooses
some basis
left right up down diagonal or the other
diagonal right
and then polarizes a photon and then
sends that down a fiber
that goes around and it ends up in bob's
inbox or bob's input port right
bob then chooses either the up down left
right basis or the 45 degree rotated
basis
and then does a measurement and then
they swap information so alongside the
fiber line
you've also got a lot of quantum sorry a
lot of classical channels as well okay
where you're constantly swapping
information i'm about to send a bit
here's what i did here's all these
things there's a lot of error correction
that happens as well because quantum
systems are very prone to error
um and then once you go through
everything you can see that uh
you know where they match up in the
bottom there um bob
miss measures the wrong basis so there's
a zero at the end
then bob gets it right so there's a one
then bob gets it wrong
but here he measures a one instead and
so you get this kind of output here
and then once you've gone through it
enough times
um the output is the reason for that one
by the way is um
to be positional um once you go through
enough times
then you have enough information to be
able to say ah okay this is the key and
we know we have a secret
okay i mentioned the error term if
there's someone listening on the line
then that error term will rise
and that's how you know if there's an
eve on the line it's called the beta
term in the mathematics
and that's how you measure it so you can
actually work out oh we think there's an
eve there we're going to go and do
something else or we're going to start
again
so these algorithms are quite sort of
quite quite nifty there's a lot of
interesting stuff going on
but if it's from the mid 80s you might
say well why isn't it everywhere then
well remember i said
you have to have a fiber line between
alice and bob
now let me walk you through some facts
about qkd which often aren't talked
about
the mathematics that makes regular
crypto secure doesn't care about the
channel it's communicated over
whereas the mathematics that makes
quantum systems secure
they do care okay because it's part of
the system so what you get out the
end is that you you can't packet switch
photons without measuring them
all right now um i did a a a lot of
another discussion in an article in
forbes where with davey winder and a few
others
to talk about loft orbital and you know
they're using space which is great you
know sort of yeah space
rockets brilliant um all the things
quantum
space oh my god um but ultimately like
sort of there's problems like if it's
cloudy
you can't do key exchange
you can't also you can't control
atmospheric
dispersion and diffusion and diffraction
you can't that's just just happens no
matter how narrow your laser beam is it
happens
so if you want to have a look there's a
qr code to the link or you can just
search for the meet the scrappy space
startup
love that really nice bit of a bit of
headline manship there
companies that make ukd systems include
a company called id contigue
uh based in switzerland but they've been
doing it like 2001. they've got a lot of
expertise around this magic with their
queue
um i've been around for a while as well
and toshiba have been in this space for
some time
if you want to kind of scare a qkd
vendor though
ask them how their tech works with
cloud-based infrastructure
just ask i'll say no more
now you might say i want to hack this
wouldn't it be cool to do it to be a
quantum hacker would be brilliant
it's you know absolutely fantastic
however you wouldn't be the first
back in 2011 uh lars leidersen
and company found that you could shine a
very bright
laser beam down the fiber and then work
out
by the reflection what the phase was uh
what the measurement phase that bob was
using was
so actually um you find that uh you know
you can actually
get all these little side channels and
hacks the original qkd system from the
80s
you didn't need to be eve you just
listened
for which optics were being switched in
and out because they all made different
sounds
so if you were in the lab you could
easily work out what the key was
you know there's stuff like injection
locking
and trojan states being put in through
various sort of laser modulation
patterns and laser frequencies
it's absolutely fascinating there was
these slides will be online afterwards
so don't worry about scribbling them
down now
but there's some really interesting
stuff out there and kind of the last
point in my final
few minutes i'm going to talk about like
sort of quantum algorithms okay
i've talked about quantum computers
surely there's more to it than just
you know breaking factoring big numbers
for tlas like sure there's more to life
than that and there is
quantum finance is a thing doing you
know sort of a stock market
uh modeling and pricing on a quantum
computer is an active area of study
okay quantum chemistry simulations i
mean you've got a quantum system
except you can control every part of it
so can you
simulate molecules for example and the
answer is yes like
google released a thing last uh last
week or month i think i think it was
where they said yes we're going to
actually uh you know state the claim
that we've we've
simulated um i think what was it salt i
can't remember
um but like so yeah these are really
growing areas of
of research and and innovation what
about quantum
random number generator because i've
mentioned that quantum is a really good
source of randomness
so why don't we actually go well can we
see the csprng
cryptographically secure studio random
number generator off quantum well
yes so what i'm going to release at the
end of in a couple of slides and show
you is some code that
actually does this okay um so this is
kind of the workflow that we're going to
follow
um we use local entropy
and then when we want more we just see
the entropy
uh in the from our entropy pool into the
random number generator
and then once we run low on bits we ask
ibm q
for some for a load of qubits and then
we get them
now the circuit we use is really simple
if you remember i said that we use the
hadamard gate to go to superposition
superposition means you have equal
probability of being a one or a zero
that's what it means right so if you do
a hadamard
rotation and you go into superposition
that's the same thing as a u2 rotation
which is why that's what you're seeing
in the circuit
quantum computers don't implement the
theoretical gates
they always transpile into what the
gates
are actually available on the system so
what i worked out was that actually i
could
on the larger machines the ibm q machine
in melbourne has 15 available qubits
um and you can run up to 8192
individual shots which means i can get
8192
multiplied by 15 bits of output okay
and then i can go right i've now got 122
880 potential random bits now the
problem is they're not secret to me
but they're very good high quality
random so if i blend them with the local
sources of randomness
i get something kind of cool so i've
just
made a little gist with a little kind of
python class to show you
um let me pull up some code like i can
demonstrate that it actually runs
it uh if i don't actually do that
actually run the code
it helps i suppose uh let me just shrink
this down so this is it just generally
generating things
um you'll see in a second when it gets
rolling it's gonna add a job
so it's gonna go oh look i've got all
these random bits oh i need to
run a background ibm cue process and if
i look at the results here
if i just refresh this page then you can
see it's
added uh this job here we go just a few
seconds ago
and it's going to run in 15 minutes so
long after i am off the stage
long halfway through uh chris's talk um
but like
yeah that will actually run and then if
i leave this running it will see
directly into it qr code here for those
who want to play along at home
what does the code look like it's just
python so i
coded in um the blum blum shub real name
the blum shrub uh csprng and i
coded it all in a few dirty hacks here
and there sorry this is not for
production if you put this in production
that's a
silly thing to do but i know that this
is a good random number generator so i
am just sort of implementing it kind of
haphazardly that i have not taken any
care or consideration
in this this is all proof of concept to
show that i can have a background
process that
deals with ibm q as you can see here so
i make the circuit
i run the circuit i get the bits
i do some hashing because ketchup three
is actually
really really useful um to be able to
say look
i take the hp pool which is my local
secrecy i take the really high quality
randomness
quality rounding risk courtesy of ibmq
and i
just hash the two together and i just do
that over and over again for all the
bits
i then do another one at the end just
because i can
and it adds a little bit more entropy to
the whole system and then it just keeps
going round and round all i'm doing here
is i'm just generating
billions of bits okay and you can see
the output here is uh
throwing out numbers every eight
thousand 8192 bits i think
and that's that's that's the code this
actually works i've had this running on
a system
for a couple of days and it ran just
fine
absolutely fine no problems no issues
it just kept going so like this is
perfectly workable the quantity the ibm
system works perfectly fine
if you want to have a look i put loads
of comments in to explain what i'm doing
and why and also why you shouldn't use
this in production
i cannot stress this enough but like
yeah
it works and it's there and if you want
to have a play there's a worked example
of how you can use quantum algorithms to
do something that's kind of nifty
so i'm gonna sort of put the fin slide
up and say
thank you very much i'm gonna end it
there and i'm gonna
entertain whatever questions you have
thank you very much for your time
all right thank you dr mark clan carney
uh was awesome uh you got a lot of good
comments here i'm gonna see if there's
any questions in them
uh besides more cow math from when you
know
um yeah that goes with the cowbell um
you know actually cow is the name of i
think cow is the name of a quantum key
distribution system i actually think
that's right
i'll check that i'll check that then i
you got one uh give the quantum computer
a limit to solve then
why is this right that was actually in
discord
i was in disco yeah i don't know uh
i don't know what part of your speech it
was at but
um i don't know i mean quantum computers
are really useful like
um i think that's at the moment they're
small like they are like
they're sub zx80s right so actually if
you're gonna start learning how things
are going
and learning what to do now is actually
a pretty good time because kiskit
documentation is
thorough if you don't remember your high
school 2x2 matrices
they've got a really nice page in line
for the page you're trying to read and
understand
it's all there so actually kiskit's got
a lot of really good documentation
um and i think that actually you can
have a lot of uh
uh fun with these things just like
playing around with things actually
having a 16 cubic well 15 cubic computer
from um from ibm available it's kind of
really handy you can do shaw's algorithm
to factor the number 17.
[Laughter]
i guess there's no other questions i'll
give them like a couple more cents for
anyone answering the questions or if
when has another comment he wants to
make i'm sure he'll i
i'm sure we just we just listened on the
wind and uh we will uh we will hear him
uh forthwith we got one uh can you share
quantum break timeline again
quantum break timeline yes let me find
that slide for you
so uh fundamentally uh
the assumptions i've made here if i get
rid of the q a
um the assumptions i've made here are
that we currently have about two to the
six qubits in one machine that's about
we got 53
so you know kind of nearby um
if we assume doubling every year so it's
gonna go from two to the six then next
year two to the seven then two to the
eight and two to the nine okay it's just
going to go up iteratively
so like a really really fast moore's law
because moore's law was 18 months
wasn't it so like we know the thresholds
are breaking
like rsa so we know how many qubits we
need
so like you just keep multiplying until
you've got enough okay and then you go
it's at least at least seven years it's
at least eight years but that's making
huge assumptions about engineering and
physics
realistically you're gonna be talking 10
to 15 years
but like you know like the iphone is 15
years old next year
okay like it's it's it it'll go quite
quickly i think
uh there's a lot of money being plumbed
into this there's a lot of people
looking at this
are these problems so i think there's a
high chance that we might see things
some things a little sooner some things
a little later we'll just have to see
how it goes but there's
there's the slide i think that people
are after all right great
i don't see any more questions in any
place
so i think you're all set thank you so
much mark
thank you very much corncon i've really
enjoyed it take care yeah hopefully see
you next year
absolutely all right
um next up at uh 3 30 we're gonna have
chris roberts he's a geek hacker and
he's at hillbilly hit squad he's gonna
talk to you about all your
votes are belong to i should be good
talk
talk to you soon bye guys
you