Você está na página 1de 43

Volatility and

quantum neural networks


Kreso Bilan
10 Sep 2009
Kings College London
M.Sc. in Financial Mathematics
Abstract
In the case of a moderate volatility between nancial instruments, one can
use superconducting quantum processors to run Adiabatic quantum computing
algorithm to nd Maximum independent set of those nancial instruments. This
maximum independent set will then represent the most diversied portfolio. The
connection between neural networks theory and Adiabatic quantum computing
is hinted.
Contents
1 Introduction 2
1.1 Public key cryptography standard . . . . . . . . . . . . . . . . . 2
1.2 Breaking RSA encryption with quantum computer . . . . . . . . 3
1.3 Classes of problems . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.4 SQUID and quantum neural networks . . . . . . . . . . . . . . . 12
1.5 Some basic notions of graph theory . . . . . . . . . . . . . . . . . 16
2 Methods 20
2.1 Maximum independent set portfolio . . . . . . . . . . . . . . . . 20
3 Results 34
3.1 Orion returned results . . . . . . . . . . . . . . . . . . . . . . . . 34
3.2 Further pruning of diversied portfolio - graph theory . . . . . . 36
3.3 Is learning rate in classical neural network related to Adiabatic
quantum computing? . . . . . . . . . . . . . . . . . . . . . . . . . 36
4 Discussion and conclusion 39
4.1 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.2 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
1
Chapter 1
Introduction
1.1 Public key cryptography standard
Lets illustrate the importance of Quantum Information Theory on the simple
example of breaking cryptographic protection. Most of the secure type internet
connections from 2000s in the commercial and private use are using Public Key
Cryptography Standard, which was initially started by the company RSA Data
Security Inc. Now, the work is being transferred to the IETF PKIX group.There
are two dierent branches of algorithms that are used today for establishing and
using secure connections:
symmetric (private) key algorithms
asymmetric public key algorithms
Symmetric (private) key algorithms are faster, but they require pre-sharing of
the private key between parties. This is not convenient as a single internet server
can have secure connections with millions or more of its client. Asymmetric
public key algorithms enable secure connections between parties previously not
known to each other. The drawback in the latter algorithms is that they are
much more computationally intensive.
Lets assume Alice has fallen in love with celebrity Bob, who doesnt know
Alice. Alice has a key of an apartment which she wants to share with and
only Bob. Alice can simply send the key to Bob, if only Bob will obtain the
letter. One of the problems is that Eve could eavesdrop on the Alices letter
with key, could take the key of the apartment and send it to Bob herself. So,
Alice proceeds in the following way:
Bob takes two big prime numbers, multiplies them, and asks authorities to
issue him the passport with exactly the same number he also picks another
relative prime number and writes it down to the passport (which will serve
as a public encoding asymmetric key). Bob also keeps for himself a private
asymmetric decoding key.
Alice can check validity of the passport with the authorities (which ex-
tends to the Home Oce and Government) which are organised in a Chain
of Trust. Alice then makes a photo of the apartment key (this is a private
2
symmetric key). She then encrypts the photo with Bobs public asymmet-
ric key. Alice sends to Bob encrypted photo of her apartment key.
Upon receiving message from Alice, Bob uses his private decoding asym-
metric key to obtain the photo of the apartment key, so he can gut it (this
is private symmetric key)
Eve can eavesdrop only if she is able to guess the private decoding asym-
metric key based on the passport number. But if the passport number is
big, that is dicult. (E.g.
143 = 11 13
, which is easy to check but more dicult to guess.) Eve cannot forge the
Bobs passport to deceive Alice because of the Chain of Trust.
From the above, it is visible that the crucial is the existence of the problem
for which once a given solution, it is easy to check, but dicult to nd the
solution. More in the section 3. Classes of problems. All widespread secure
connections, like VPN (virtual private networks) or HTTPS (secure http) use
the same principle. VPNs though perform mutual party authentication, while
our above example usually perform a single party authentication. HTTPS can
optionally perform mutual authentication, and not only a single party authenti-
cation. In short, to perform authentication internet server and client would use
a predened cryptographic suite with (a) integrity algorithm (or authenti-
cation) algorithm (e.g. RSA - Ronald Rivest, Adi Shamir, Leonard Adleman,
1977, or AES or 3DES), (b) pseudo-random (or hash) algorithm (in the
example above it was digital photo of the actual key; usually hash is used to
produce a unique number - handle for some content) and with (c) condential-
ity or ciphering algorithm (which uses exchanged symmetric key). The public
deciphering asymmetric key is contained in the X.509 certicate veriable
through a Chain of trust.
1.2 Breaking RSA encryption with quantum com-
puter
It will be shown how to eciently nd an algorithm that determines period r
of the function f(x). This is crucial for factoring large numbers as a product of
prime numbers. Finding of the period r is not easy, because not all periodic
functions have a simple shape, as e.g. sinusoid. The shape within the period
can uctuate widely, making it dicult to discover the period r. The best
known classical algorithms (as of now) scale exponentially with n
1/3
. In 1994
Peter Schor discovered that quantum computer can do it faster than n
3
. Schors
algorithm can be applied to successfully break an RSA algorithm.
A set of positive integers less than N constitutes under a multiplication mod-
ulo N if the set satises three conditions any group has to satisfy: (a) it possesses
an identity element, (b) each element has an inverse and (c) multiplication op-
eration is closed within the group. The order of the group is the number of the
elements of the group. The order of the subgroup (any group contained within
the original group) is a divisor of the order of the original group. That can be
established as follows.
3
Figure 1.1: A typical ow when establishing secure connections
4
For any element a of group G and subgroup S we dene a coset space aS
which contains all elements of the form g = as, where s is any member in S.
Any coset aS has the same number of members as the subgroup S.
If two cosets aS and bS have a common member then they are identical,
which is seen from as = bs

then (as)S = (bs

)S and a(sS) = b(s

S) so that
aS = bS.
Since 1 is in S, then any member of G is in some coset S. Then since the
cosets have the same number of elements as the subgroup S, since they are
disjoint, then the order of the subgroup S divides the order of the group G.
In dierence to the order of the group, the order of an element a is given as
the smallest non-zero k for which a
k
= 1. The sequence a, a
2
, a
3
, ...a
k1
forms
a subgroup of k elements, therefore k divides the order of the group G.
Lets pick up two prime numbers p and q and pq = N. One can pick all
numbers relatively prime to N to form the group modulo N G
N
. It is easy to
show Little Fermats theorem starting from:
_
k

i=1
a
i
_
p
= a
p
1
+a
p
2
+ a
p
k
+

p!
n
1
!n
2
! . . . n
k
!
a
n
1
1
a
n
2
2
. . . a
n
k
k
and noting that the sum on the right hand side is divisible by p to
(a
1
+a
2
+ a
k
)
p
a
p
1
+a
p
2
+ a
p
k
(modp)
from which (assuming a
i
= 1
a
p
a(modp)
Then for the same reason:
_
a
q1

p1
1(modp)
and
_
a
p1

q1
1(modp)
Since a
p1q1
1 divides both p and q, then
a
(p1)(q1)
1(modpq)
It is easy to see that also it must hold:
a
1+s(p1)(q1)
a(modpq)
If we now take c being a relative prime to (p-1)(q-1) (the probability that two
large random number are relatively prime numbers is greater then 1/2), then c
is an element G
(p1)(q1)
, such that it has an inverse d and
cd 1 (mod (p 1) (q 1))
The following three equations (which follow from the above) are then the basis
of the RSA encryption:
a
cd
a mod (pq)
,
b a
c
(modpq) b
d
a (modpq)
5
If one would now return briey to the section 1, Bob would pick up two big
(2048 bits, en example) prime numbers, p and q, and would communicate to
Alice N = pq. Bob would also pick up a public encoding key c = (p-1)(q-1).
He keeps d strictly to himself. When Alice sends the message a she encrypts it
and sends b a
c
(modpq). Only Bob can decoded by performing b
d
mod (pq).
Were Eve to eavesdrop, she would have to guess d, in other words she would
have to nd p and q, and then nd d as an inverse of c (p 1)(q 1).
If Eve would have an ecient period nding function, here is how she would
proceed. Eve nds the period of the intercepted message b. I.e. Eve nds r, so
that b
r
b. This the order of b in the G
pq
. But this the order of a as well since
b a
c
(modpq). Since r is the order of G
pq
, it must divide (p-1)(q-1) which is
the number of the elements in G
pq
. Therefore, r and c do not have common
divisor. Then, there must exist d

so that
cd

= modr
Eve can then calculate (because a
r
1)
b
d

a
cd

= a
1+mr
= a (a
r
)
m
a (modpq)
One wants to nd the period of the function
f (x) = b
x
mod (N)
f (x +r) = f (x)
which is not easy classically because the values of f uctuate (visually almost
randomly). For start, one can use super fast Quantum Fourier transform dened
on the computational basis (see the simple explanation for this and notation
used below the equation)
U
FT
|x
n
=
1
2
n/2
2
n
1

y=0
e
2ixy/2
n
|y
n
Here, the notation means the following:
|
n
n is the number of the Qbits used. Each Qbit represent a quantum subsystem
that can be in any state a
0

0 +a
1

1 where a
0
and a
1
are complex numbers which
squared modules |a
0
|
2
and |a
1
|
2
give the probability that the Qbit will be in
states

0 or

1, respectively. Dirac introduced instead of an arrow for the vector,
the |. So, e.g. |5 could be written in base-2 as |5 = |1 |0 |1 = |101. Which
means that we would have 3 Qbits (3 quantum subsystems, each having two
possible states) and in this particular example 1st Qbit is in the state |1, the
second Qbit is in the state |0 and the third Qbit is in the state |1. Note that
in this example one doesnt mention probabilities as we denitely know we are
in state |5.
e
2ixy/2
n
2
n/2
is the numerical factor - amplitude, whose modules squared will give the prob-
ability of nding the quantum (system) computer in the state |y
U
FT
6
is a complex linear operator that one wants to physically realise, so that the
transformation from the state |x
n

1
2
n/2
2
n
1

y=0
e
2ixy/2
n
|y
n
is done by quan-
tum computer. (What one wants is similar trying to design an analog computer
to solve a given problem).
Lets introduce some helping operators Z and H
Z|y
n
= e
2iy/2
n
|y
n
and
H =
1

2
_
1 1
1 1
_
where we assume

0 = |0 =
_
1
0
_
and

1 = |1 =
_
0
1
_
, so that e.g. H|1 =
1

2
(|1 |0) One denotes the operation of H on each and all Qbits by H
n
and then one has
H
n
|0
n
=
1
2
n/2
2
n
1

y=0
|y
n
And nally putting both helping operators together
U
FT
|x
n
= Z
x
H
n
|0
n
We proceed with our attempt to construct U
FT
and restrict ourselves to the
case of n = 4. Now with subscripts next to H denoting on which Qbit does
it act. Subscripts next to x identify Qbit (note that these subscripts would
correspond to the powers of 2, if we would be writing binary digits in the usual
computer science/ telecommunication literature).
U
FT
|x
3
|x
2
|x
1
|x
0
= Z
x
H
3
H
2
H
1
H
0
|0
n
With the introduction of the third helping operator, number operator n dened
by n|1 = 1 |1 = |1 and n|0 = 0 |0 = 0, Z is then given by
Z = e
i
8
(8n
3
+4n
2
+2n
1
+n
0
)
and
Z
x
= e
i
8
(8x
3
+4x
2
+2x
1
+x
0
)(8n
3
+4n
2
+2n
1
+n
0
)
Using the obvious e
(2in)
= 1 one obtains
Z
x
= e
i[n
3
x
0
+(x
1
+
1
2
x
0)n
1
+(x
2
+
1
2
x
1
+
1
4
x
0)n
2
+(x
3
+
1
2
x
2
+
1
4
x
1
+
1
8
x
0)n
3]
Since it is also obvious e
(ixn)
H|0 = H|x we can write
e
i(x
0
n
3
+x
1
n
2
+x
2
n
1
+x
3
n
0
)
H
3
H
2
H
1
H
0
|0 |0 |0 |0 =
e
i(x
0
n
3
)
H
3
e
i(x
1
n
2
)
H
2
e
i(x
2
n
1
)
H
1
e
i(x
3
n
0
)
H
0
|0 |0 |0 |0 =
H
3
H
2
H
1
H
0
|x
0
|x
1
|x
2
|x
3

Not to forget, we are trying to nd out out how to construct quantum Fourier
transform and we have practically nished. We shall re-arrange the terms and
introduce two more simple helping operators.
U
FT
|x
3
|x
2
|x
1
|x
0
= e
i[
1
2
x
0
n
2
+(
1
2
x
1
+
1
4
x
0)n
1
+(
1
2
x
2
+
1
4
x
1
+
1
8
x
0)n
0]
H
3
H
2
H
1
H
0
|x
0
|x
1
|x
2
|x
3

7
or
U
FT
|x
3
|x
2
|x
1
|x
0
= H
3
e
in
2
1
2
x
0
H
2
e
in
1(
1
2
x
1
+
1
4
x
0)
H
1
e
in
0(
1
2
x
2
+
1
4
x
1
+
1
8
x
0)
H
0
|x
0
|x
1
|x
2
|x
3

or using again e
(ixn)
H|0 = H|x one obtains (note that the order of x sub-
scripts is reversed)
U
FT
|x
3
|x
2
|x
1
|x
0
= H
3
e
i
1
2
n
2
n
3
H
2
e
in
1(
1
2
n
2
+
1
4
n
3)
H
1
e
in
0(
1
2
n
1
+
1
4
x
2
+
1
8
n
3)
H
0
|x
0
|x
1
|x
2
|x
3

With the introduction of the helping operators V and permutation P we are


nally arriving at the compact expression for U
F
T which can be easily gener-
alised to the cases other then n = 4.
V
ij
= e
in
i
n
j
/2
|ij|
P|x
3
|x
2
|x
1
|x
0
= |x
0
|x
1
|x
2
|x
3

U
FT
|x
3
|x
2
|x
1
|x
0
= H
3
(V
32
H
2
) (V
32
V
31
H
1
) (V
32
V
31
V
30
H
0
) P|x
3
|x
2
|x
1
|x
0

Coming back to the question of nding the period r. We are preparing


an initial state of the quantum computer as (as mentioned previously with
f (x) = b
x
mod (N) ) which is not dicult. Such an initial state preparation is
more powerful with quantum computer then with classical computer as function
f can be made on all computational basis vectors in one go (this is the rst
crucial fact in this algorithm). We just mention here that the rst n Qbits in
the equation below are input Qbits, and the n
0
are the output Qbits.
1
2
n/2
2
n
1

x=0
|x
n
|f (x)
n
0
When we perform measurement on the output Qbits, these Qbits will collapse
in a single state with the value f(x
0
) = f
0
. Generalised Born rule for the
collapse of the quantum states are then saying that the input Qbits will be a
superposition
|
n
=
1

m
m

k=0
|x
0
+kr
n
where m depends on the size of the input register. To retrieve the value of the
period r, we shall apply quantum Fourier transform to this input Qbits (but
after we let the operator of the function f to work upon both input and output
Qbits and after we measured output Qbits)
U
FT
1

m
m1

k=0
|x
0
+kr
n
=
1
2
n/2
2
n
1

y=0
1

m
m1

k=0
e
2i(x
0
+kr)y/2
n
|y
=
2
n
1

y=0
e
2ix
0
y/2
n
1

2
n
m
m1

k=0
e
2ikr/2
n
|y
We now see that the probability of nding the input Qbits in the state |y is
p (y) =
1
2
n
m

m1

k=0
e
2ikr/2
n

2
8
Figure 1.2: Quantum gate model for UFT operator - consisting of only 1-gate
and 2-gates
9
Figure 1.3: Initial state and Uf operator
10
Note that we dont have any longer dependency on x
0
(this is the second crucial
step in the algorithm. It corresponds to the Heisenberg uncertainty principle,
since we dont know for which x we are investigating period r. I.e. we have lost
the absolute information, but we are getting the relative information of r for
some - unknown x
0
) Lets assume a special value for y ( with absolute
j
less
than 1/2 )
y = y
j
= j
2
n
r
+
j
we get
p (y
j
) =
1
2
n
m
sin
2
(
j
mr/2
n
)
sin
2
(
j
r/2
n
)
Since m is implicitly chosen according to the size of the register and period r
with mr/2
n
close as possible to 1, one gets
p (y
j
) =
1
2
n
m
sin
2
(
j
)
(
j
r/2
n
)
2
=
1
r
sin
2
(
j
)
(
j
)
2
From where for absolute
j
< 1/2 follows
p (y
j
)
4

2
1
r
Since there are at least r-1 dierent y
j
values, and r a big number, we see that
we shall end up with one of the special values y
j
very often (
4

2
approx. 0.4).
This analysis can be rened further, so to obtain almost certain value of the
period r in the rst go of the quantum computer.
We shall stop here. Many aspects of the quantum computing are not men-
tioned in this short exposition. Nevertheless, the RSA breaking mechanism has
been shown step-by-step. There are many questions arises: what are the ap-
propriate problems for quantum computers? and although theoretically sound,
how feasible quantum computers are? The rst question cannot be answered
today, but more information in the next section. The second question is then
addressed after the next section.
1.3 Classes of problems
The issue is complexity of the problem (time and space resources required to
nd the solution of the problem). How eciently one can solve the problem?
Whether classical computer is worse/ equal/ or even better than quantum com-
puter. Are there problems for which classical computer is better, and some
problems for which quantum computer is better?
The number of complexity classes in which one can classify problems (and
algorithms) is too big (and growing every day) to be described here, in any
detail. So, we shall mention P and NP problems, as we shall be dealing with
NP problems later.
Regarding the Schors period nding algorithm from the previous section,
obviously it is very powerful. And, at the moment, it seems regarding period
nding, that the quantum computer is much more powerful then a classical
computer, we dont yet have the proof of that. It is entirely possible, that
someone nds an equally ecient classical algorithm.
11
Roughly speaking P class of problems have algorithms that can nd solution
quickly. NP class has algorithms where the solution can only be checked quickly,
but not solved quickly.
Obviously P is a subset of NP. What is not clear is whether NP is a proper
superset, i.e. if there are problems that cannot be solved quickly. E.g. in fac-
torisation, it is clear that if we have two big prime factors, it is easy to check
they are prime factors of the given number. What is not clear, is whether our
problem when factorising big numbers is due to our inability to nd quick (clas-
sical) algorithm to solve the factorisation problem, or such algorithm doesnt
exist. If the ecient factorisation algorithm wouldnt exist, we would be having
P NP. But, at the moment:
P?NP
There is an interesting subclass of NP problems, called NP-complete. NP-
complete are in a sense at least as hard as any other NP problem (NP prob-
lem including NP-complete problems). It is an interesting fact that knowing
an ecient NP-complete problem solving algorithm, could solve (with a small
overhead) any other NP problem. Funny, Sudoku games are NP-complete, and
nding an ecient Sudoku solving algorithm would conrm P NP
To include quantum computers in this discussion, we dene a new class
BQP - Bounded quantum P class. We included the word bounded, since many
quantum algorithms will give a result with some probability of an error (due to
quantum probability considerations). We can dene and demand this error to
be as small as we wish (that might change a space or time requirement on the
BQP algorithm, but is not crucial).
We shall now try to tentatively relate BAP to P and NP, but we need another
class of the problems. This is a PSPACE which represents algorithms that dont
require a huge space, but might require any amount of time to solve the problem
(in NP problems we usually have very bad time resource required, i.e. a lot of
time required, but we know the upper limit of this resource. In PSPACE we
dont care about this time resource limit at all - we have all the time of the
Universe.) What is known is that BQP is obviously bigger then P. What is
known is that BQP is less than PSPACE. But the relation between BQP and
NP is completely unknown.
Lets just mention that the nding of Hamiltons cycle or path is NP-
complete and the nding of Maximum independent set is also NP-complete
problem. We shall encounter these problems in later sections.
1.4 SQUID and quantum neural networks
When trying to physically realise the quantum computer, one of the natural
choices is to use superconductors. In superconductors electron wave functions
are highly coherent, i.e. the phase between dierent superconducting wave
vectors is very well dened. Another important fact for us is that above some
critical current I
c
superconductivity seizes.
In 1962 Josephson noticed that when letting current through a constriction
in the circuit, the supercurrent I
s
through the constriction is given by:
I
s
= I
c
sin
12
Figure 1.4: Where does BQP ts?
13
where is a phase dierence between supercurrent wave vectors on the op-
posing ends of the constriction. Furthermore, Josephson noticed that
d/dt = (2eV ) /h
where V is the voltage over the junction, and h Plancks constant.
If one forms a superconducting ring with two Josephson junctions in it, and
places such ring in the superconducting circuit, further connecting one arc of
the ring to one polarity of the circuit and the other arc to the other polarity
of the circuit, then it can be shown that a magnetic ux through this ring is
quantised. The smallest amount of the ux through the ring is given by

0
=
eh
2c
where e is an electron charge, and c is the speed of light. Furthermore, it can be
shown that the maximum current I
m
through the ring depends on the magnetic
ux through the ring (so the strength of the current can be used to measure the
magnetic ux.)
I
m
= 2I
c
|cos (/
0
)|
This superconducting ring is the bases of the SQUID or superconducting
quantum interference device. This is the most precise measuring device known,
as it can directly observe quantum quantities.
Since the magnetic ux through the ring is quantised, we can use it as a Qbit.
To form quantum processor, we then interconnect (through a magnetically sus-
ceptible material - here the easiest thing is to place another wire between two
rings). Such quantum processor has been realised by the company D-wave sys-
tems and at the moment contains 128 Qbits. The classical front-end computer
oering web services to the customers is called Orion. MIT has also produced
such quantum processors. These processors are manufactured on the silicon
using e.g. Nb for superconducting wires. Of course, the quantum processor
has to be cooled. There are dierent avors of these chips, e.g. supercharge
dc-SQUID. D-wave system uses ux rf-SQUID.
The dynamics of this array of SQUIDs on the chip is given by:
H =
1
2

ij
J
ij

j
+

i
h
i

i
where H is the Hamiltonian of the system and represents the energy stored in
the system. J
ij
is magnetic coupling between the quantised magnetic uxes
i
and
j
through two SQUIDS i and j respectively. h
i
is an external magnetic
eld.
This is also known as an Ising Hamiltonian with a huge literature on the
applications in many elds.
These quantum processors work dierently then the theory presented in the
rst section. The quantum information theory used in the section 1 is based on
quantum gates. The theory used here is Adiabatic quantum computin (AQC).
The equivalency of the both approaches has been proven, but it is practically
impossible to easily translate from one formulation of the problem, to the other
formulation. E.g. period nding algorithm for AQC is not known (although we
know it exists). The Adiabatic quantum computing would work in the following
14
Figure 1.5: dc-SQUID
15
way: one would x initially some J
ij
and/ or
i
. This choice of xing would
depend on the problem to be solved. Then one would slowly let some or all
of this xed values lose, and let the system relax to a new energy level, but
making sure that the system remains in the ground state. I.e. ground state
changes the energy but the superconducting processor remains in this ground
state. One can also turn on slowly some other J
ij
and/ or
i
towards the end
of the calculation. At the end of the calculation the read-outs of J
ij
and
i
give
the solution to the problem.
Regarding Ising Hamiltonian, it is also connected with Neural network the-
ory. E.g. the function that describes stability of neural networks, Lyapunov
function (Lyapunov function generally describes stability of the systems) is given
for some neural networks as:
L = H
In such neural networks it holds:

i
(t + 1) = sgn
_
_

j
J
ij

j
(t) +
i
_
_
where if
i
1 neutron is ring. J
ij
is synaptic weight. And
i
is renamed h
i
and represents external input = negative threshold.
1.5 Some basic notions of graph theory
Graph G consists of vertices V
i
and edges connecting these vertices E
ij
. Vertices
connected by an edge are co-incident.
Path connects two vertices through other vertices and edges, not going
across the same edge or vertex.
Cycle is the path where initial and nal vertices are the same.
Graph is connected if any two vertices are connected by some path.
Connected acyclic graph is tree.
Spanning tree (or spine) of graph G is a spanning sub-graph of G, i.e. it
contains all the vertices.
Hamiltons path of graph G is a spanning path, i.e. path that contains all
vertices of the graph. Hamiltons cycle is a spanning cycle of the graph.
Graph is called Hamiltons graph if it has Hamiltons cycle.
The graph is -connected if there dierent paths between any two vertices
in the graph, such that that none of the paths shares any vertices (except of
course, the initial and nal vertex).
The set of vertices S of graph G is stable or independent if none of two ver-
tices of S are co-incident. The maximum cardinal number of some independent
set in G is called stability or independance of the graph G and is denoted
by (G). Determination of (G) is NP-complete.
16
Figure 1.6: Some basic notions of the graph theory - part 1
17
Figure 1.7: Some basic notions of the graph theory - part 2
18
Figure 1.8: Some basic notions of the graph theory - part 3
19
Chapter 2
Methods
2.1 Maximum independent set portfolio
We closely follow D-wave systems Inc. ideas on how to use Maximum indepen-
dent set approach to create portfolio. (This approach has been known to the
author half year before published by D-wave systems).
We start with representing our stocks (or other nancial instruments by the
graph G. Each nancial instrument represented by the vertex V
j
in the graph,
and the relationship between dierent nancial instrument i and j represented
by the edge E
ij
.
If we restrict the nancial instruments to be the tickers included in the Dow
Jones Wilshire 5000 Composite index, we can associate each ticker symbol with
a graph vertex. If the value of the ticker is P
i
, then we can approximate the
return on stock (similar but not the same as dividend) by:
R
i
(t) = ln [P
i
(t) /P
i
(t 1)]
Now we can identify edges in the graph by measuring correlation between dif-
ferent returns on the stock. I.e. E
ij
is identied with
Q
ij
=
R
i
R
j
R
i
R
j

_
_
R
2
i
R
i

2
__
R
2
j
R
j

2
_
But, lets further assume that below certain threshold Q
ij
we assume the cor-
relation to be purely noise (we do allow negative correlation above the noise,
nevertheless). Since we are not interested in the correlations of the small abso-
lute value, we shall connect vertices V
j
and V
j
with edges E
ij
only if the absolute
value Q
ij
is above some threshold K.
Since we can have a huge number of vertices, and the number of all possible
edges
_
n
2
_
can easily be in the range of the millions. To make the prob-
lem tractable, the threshold K on Q
ij
to reduce the number of edges seems
reasonable.
What we are achieving with having a threshold and constructing the graph,
is that highly correlated ( Q
ij
1 ) and anti-correlated ( Q
ij
1 ) nan-
cial instruments are always connected while weekly correlated (anti-correlate)
20
nancial instrument are not connected. By nding the maximum number of
the vertices - nancial instruments, where none of the vertices are directly con-
nected we have identied the most diversied portfolio. This portfolio is the
maximum independent set of the graph G, and nancial instruments in it have
the smallest correlations between themselves.
The example below shall be given for some stocks and other types of the
nancial instruments.
Vertex Ticker Name Comment
1 GOOG Google
2 CRA Celera Genomics company. First to se-
quence the human genome
3 GE General Electric Similar to Siemens in Europe,
but more diversied
4 GLD SPDR gold trust Exchange traded fund of gold
5 HSBA HSBC bank holding company The biggest UK bank
6 MON Monsanto Agriculture giant
7 PFE Pzer Pharmacology
8 RTP Rio Tinto Gold miner
9 XOM Exxon Oil producer
10 BA BAE Systems Defence contractor
Using Google nance e.g. we obtained the following data:
Date close
P
1
(10) 8 Sep 2009 458.62
P
1
(9) 4 Sep 2009 461.30
P
1
(8) 3 Sep 2009 457.52
P
1
(7) 1 Sep 2009 455.76
P
1
(6) 28 Aug 2009 464.75
P
1
(5) 27 Aug 2009 466.06
P
1
(4) 26 Aug 2009 468.00
P
1
(3) 25 Aug 2009 471.37
P
1
(2) 24 Aug 2009 468.73
P
1
(1) 21 Aug 2009 465.24
P
1
(0) 20 Aug 2009 460.41
Date close
P
2
(10) 8 Sep 2009 6.50
P
2
(9) 4 Sep 2009 6.50
P
2
(8) 3 Sep 2009 6.35
P
2
(7) 1 Sep 2009 6.34
P
2
(6) 28 Aug 2009 6.55
P
2
(5) 27 Aug 2009 6.61
P
2
(4) 26 Aug 2009 6.68
P
2
(3) 25 Aug 2009 6.74
P
2
(2) 24 Aug 2009 6.58
P
2
(1) 21 Aug 2009 6.70
P
2
(0) 20 Aug 2009 6.51
21
Date close
P
3
(10) 8 Sep 2009 14.50
P
3
(9) 4 Sep 2009 13.87
P
3
(8) 3 Sep 2009 13.45
P
3
(7) 1 Sep 2009 13.34
P
3
(6) 28 Aug 2009 14.08
P
3
(5) 27 Aug 2009 14.19
P
3
(4) 26 Aug 2009 14.11
P
3
(3) 25 Aug 2009 14.30
P
3
(2) 24 Aug 2009 14.20
P
3
(1) 21 Aug 2009 14.21
P
3
(0) 20 Aug 2009 13.81
Date close
P
4
(10) 8 Sep 2009 97.43
P
4
(9) 4 Sep 2009 97.53
P
4
(8) 3 Sep 2009 97.46
P
4
(7) 1 Sep 2009 93.90
P
4
(6) 28 Aug 2009 93.40
P
4
(5) 27 Aug 2009 93.19
P
4
(4) 26 Aug 2009 92.79
P
4
(3) 25 Aug 2009 92.76
P
4
(2) 24 Aug 2009 92.34
P
4
(1) 21 Aug 2009 93.65
P
4
(0) 20 Aug 2009 92.27
Date close
P
5
(10) 8 Sep 2009 654.30
P
5
(9) 4 Sep 2009 658.30
P
5
(8) 3 Sep 2009 644.00
P
5
(7) 1 Sep 2009 643.90
P
5
(6) 28 Aug 2009 672.10
P
5
(5) 27 Aug 2009 663.60
P
5
(4) 26 Aug 2009 668.60
P
5
(3) 25 Aug 2009 671.00
P
5
(2) 24 Aug 2009 664.10
P
5
(1) 21 Aug 2009 659.10
P
5
(0) 20 Aug 2009 645.80
22
Date close
P
6
(10) 8 Sep 2009 83.40
P
6
(9) 4 Sep 2009 82.24
P
6
(8) 3 Sep 2009 81.57
P
6
(7) 1 Sep 2009 81.94
P
6
(6) 28 Aug 2009 83.00
P
6
(5) 27 Aug 2009 84.62
P
6
(4) 26 Aug 2009 83.98
P
6
(3) 25 Aug 2009 83.63
P
6
(2) 24 Aug 2009 83.71
P
6
(1) 21 Aug 2009 83.78
P
6
(0) 20 Aug 2009 82.48
Date close
P
7
(10) 8 Sep 2009 16.21
P
7
(9) 4 Sep 2009 16.39
P
7
(8) 3 Sep 2009 16.08
P
7
(7) 1 Sep 2009 16.38
P
7
(6) 28 Aug 2009 16.81
P
7
(5) 27 Aug 2009 16.86
P
7
(4) 26 Aug 2009 16.77
P
7
(3) 25 Aug 2009 16.80
P
7
(2) 24 Aug 2009 16.73
P
7
(1) 21 Aug 2009 16.64
P
7
(0) 20 Aug 2009 16.23
Date close
P
8
(10) 8 Sep 2009 167.54
P
8
(9) 4 Sep 2009 159.85
P
8
(8) 3 Sep 2009 156.33
P
8
(7) 1 Sep 2009 152.37
P
8
(6) 28 Aug 2009 158.16
P
8
(5) 27 Aug 2009 157.36
P
8
(4) 26 Aug 2009 157.04
P
8
(3) 25 Aug 2009 161.56
P
8
(2) 24 Aug 2009 162.51
P
8
(1) 21 Aug 2009 159.25
P
8
(0) 20 Aug 2009 153.86
23
Date close
P
9
(10) 8 Sep 2009 70.65
P
9
(9) 4 Sep 2009 69.18
P
9
(8) 3 Sep 2009 68.26
P
9
(7) 1 Sep 2009 68.41
P
9
(6) 28 Aug 2009 70.12
P
9
(5) 27 Aug 2009 70.86
P
9
(4) 26 Aug 2009 71.37
P
9
(3) 25 Aug 2009 70.68
P
9
(2) 24 Aug 2009 71.30
P
9
(1) 21 Aug 2009 69.92
P
9
(0) 20 Aug 2009 68.59
Date close
P
1
0(10) 8 Sep 2009 322.60
P
1
0(9) 4 Sep 2009 320.70
P
1
0(8) 3 Sep 2009 317.70
P
1
0(7) 1 Sep 2009 312.70
P
1
0(6) 28 Aug 2009 312.20
P
1
0(5) 27 Aug 2009 306.00
P
1
0(4) 26 Aug 2009 324.00
P
1
0(3) 25 Aug 2009 332.10
P
1
0(2) 24 Aug 2009 332.00
P
1
0(1) 21 Aug 2009 333.70
P
1
0(0) 20 Aug 2009 328.90
Now it is easy to calculate stock returns R
i
Date close
R
1
(10) 8 Sep 2009 -0.0058
R
1
(9) 4 Sep 2009 0.0082
R
1
(8) 3 Sep 2009 0.0039
R
1
(7) 1 Sep 2009 -0.0195
R
1
(6) 28 Aug 2009 -0.0028
R
1
(5) 27 Aug 2009 -0.0042
R
1
(4) 26 Aug 2009 -0.0072
R
1
(3) 25 Aug 2009 0.0056
R
1
(2) 24 Aug 2009 0.0075
R
1
(1) 21 Aug 2009 0.0104
24
Date close
R
2
(10) 8 Sep 2009 0.0000
R
2
(9) 4 Sep 2009 0.0233
R
2
(8) 3 Sep 2009 0.0016
R
2
(7) 1 Sep 2009 -0.0326
R
2
(6) 28 Aug 2009 -0.0091
R
2
(5) 27 Aug 2009 -0.0105
R
2
(4) 26 Aug 2009 -0.0089
R
2
(3) 25 Aug 2009 0.0240
R
2
(2) 24 Aug 2009 -0.0181
R
2
(1) 21 Aug 2009 0.0288
Date close
R
3
(10) 8 Sep 2009 0.0444
R
3
(9) 4 Sep 2009 0.0307
R
3
(8) 3 Sep 2009 0.0082
R
3
(7) 1 Sep 2009 -0.0540
R
3
(6) 28 Aug 2009 -0.0078
R
3
(5) 27 Aug 2009 0.0057
R
3
(4) 26 Aug 2009 -0.0134
R
3
(3) 25 Aug 2009 0.0070
R
3
(2) 24 Aug 2009 -0.0007
R
3
(1) 21 Aug 2009 0.0286
Date close
R
4
(10) 8 Sep 2009 -0.0010
R
4
(9) 4 Sep 2009 0.0007
R
4
(8) 3 Sep 2009 0.0372
R
4
(7) 1 Sep 2009 0.0053
R
4
(6) 28 Aug 2009 0.0023
R
4
(5) 27 Aug 2009 0.0043
R
4
(4) 26 Aug 2009 0.0003
R
4
(3) 25 Aug 2009 0.0045
R
4
(2) 24 Aug 2009 -0.0141
R
4
(1) 21 Aug 2009 0.0148
Date close
R
5
(10) 8 Sep 2009 -0.0061
R
5
(9) 4 Sep 2009 0.0220
R
5
(8) 3 Sep 2009 0.0002
R
5
(7) 1 Sep 2009 -0.0429
R
5
(6) 28 Aug 2009 0.0127
R
5
(5) 27 Aug 2009 -0.0075
R
5
(4) 26 Aug 2009 -0.0036
R
5
(3) 25 Aug 2009 0.0103
R
5
(2) 24 Aug 2009 0.0076
R
5
(1) 21 Aug 2009 0.0204
25
Date close
R
6
(10) 8 Sep 2009 0.0140
R
6
(9) 4 Sep 2009 0.0082
R
6
(8) 3 Sep 2009 -0.0045
R
6
(7) 1 Sep 2009 -0.0129
R
6
(6) 28 Aug 2009 -0.0193
R
6
(5) 27 Aug 2009 0.0076
R
6
(4) 26 Aug 2009 0.0042
R
6
(3) 25 Aug 2009 -0.0010
R
6
(2) 24 Aug 2009 -0.0008
R
6
(1) 21 Aug 2009 0.0156
Date close
R
7
(10) 8 Sep 2009 -0.0110
R
7
(9) 4 Sep 2009 0.0191
R
7
(8) 3 Sep 2009 -0.0185
R
7
(7) 1 Sep 2009 -0.0259
R
7
(6) 28 Aug 2009 -0.0030
R
7
(5) 27 Aug 2009 0.0054
R
7
(4) 26 Aug 2009 -0.0018
R
7
(3) 25 Aug 2009 0.0042
R
7
(2) 24 Aug 2009 0.0054
R
7
(1) 21 Aug 2009 0.0249
Date close
R
8
(10) 8 Sep 2009 0.0470
R
8
(9) 4 Sep 2009 0.0223
R
8
(8) 3 Sep 2009 0.0257
R
8
(7) 1 Sep 2009 -0.0373
R
8
(6) 28 Aug 2009 0.0051
R
8
(5) 27 Aug 2009 0.0020
R
8
(4) 26 Aug 2009 -0.0284
R
8
(3) 25 Aug 2009 -0.0059
R
8
(2) 24 Aug 2009 0.0203
R
8
(1) 21 Aug 2009 0.0344
Date close
R
9
(10) 8 Sep 2009 0.0210
R
9
(9) 4 Sep 2009 0.0134
R
9
(8) 3 Sep 2009 -0.0022
R
9
(7) 1 Sep 2009 -0.0247
R
9
(6) 28 Aug 2009 -0.0105
R
9
(5) 27 Aug 2009 -0.0072
R
9
(4) 26 Aug 2009 0.0097
R
9
(3) 25 Aug 2009 -0.0087
R
9
(2) 24 Aug 2009 0.0195
R
9
(1) 21 Aug 2009 0.0192
26
Date close
R
1
0(10) 8 Sep 2009 0.0059
R
1
0(9) 4 Sep 2009 0.0094
R
1
0(8) 3 Sep 2009 0.0159
R
1
0(7) 1 Sep 2009 0.0016
R
1
0(6) 28 Aug 2009 0.0201
R
1
0(5) 27 Aug 2009 -0.0572
R
1
0(4) 26 Aug 2009 -0.0247
R
1
0(3) 25 Aug 2009 0.0003
R
1
0(2) 24 Aug 2009 -0.0051
R
1
0(1) 21 Aug 2009 0.0145
Now it is easy to calculate Q
ij
Q
ij
1 2 3 4 5 6 7 8 9
1
2 0.76
3 0.67 0.73
4 0.11 0.26 0.06
5 0.9 0.77 0.69 -0.02
6 0.39 0.55 0.74 -0.06 0.33
7 0.75 0.7 0.56 -0.25 0.8 0.56
8 0.64 0.51 0.88 0.15 0.58 0.53 0.37
9 0.58 0.42 0.74 -0.25 0.57 0.74 0.55 0.7
10 0.28 0.32 0.17 0.28 0.3 -0.26 -0.06 0.37 0.11
Lets set an arbitrary threshold K. The value that is reasonable in some sense
shall be given in the later section. If we set the absolute value of threshold equal
0.5, then we obtain the existence of the edges E
ij
for the following edges:
E
ij
1 2 3 4 5 6 7 8 9
1 X X X X X X
2 X X X X X X
3 X X X X X X X
4
5 X X X X X X X
6 X X X X X
7 X X X X X X X
8 X X X X X
9 X X X X X X
10
Lets proceed according to the D-wave systems API development guide. D-
wave systems oers a service of quantum processor solvers through an Orion
web services. So the Orion web service is a front end towards the customer
that can use quantum computing by using appropriate client software which
27
Figure 2.1: Graph for which we are looking Maximum independent set - maxi-
mally diversied portfolio
28
Figure 2.2: Orion authentication C program
implements client side of Orion web services.
Here we present only the C client for interfacing towards Orion web services.
Three libraries are necessary (the last one only for testing) libcurl, libxml2
and libcheck. From here it is visible that client is running on Unix like operating
system (possibly Linux).
After downloading the installation follows the usual procedure for congur-
ing, making and installing the client.
The code below describes how to submit the problem as a job. (Note: this
listing contains as the problem SAT, while we are looking for MIS - maximum
independent set problem)
The SAT Problem Data describes a SAT problem with 2 variables and 2
clauses: (x1 or x2) and !x2 The Problem Data is a String, so it has a mime
type of text/plain. In our case of MIS problem we would have a string saying
something like: p edge 10 24 e 1 2 e 1 3 ... starting with the number of
vertices, then edges, and then identifying edges themselves... We continue as
for the SAT problem.
When we use Orion web services and through these web services access
quantum processor, we need to take care of four things: Problem data, problem
specication, job and answer.
29
Figure 2.3: Orion problem submission C program - part 1
Problem data for Maximum independent set contains string with the number
of vertices, edges, and denition of edges themselves.
Problem specication details which algorithm are we running. In our case it
is Maximum independent set.
Job considerations are mainly with the known issues that the jobs can be
in queues with dierent priorities. Also, job might detail some of the operating
parameters for the quantum processor, or in the case of algorithm testing, might
contain some data for classical simulator of the quantum processor (as it is
expected that the processing time of quantum processor will be expensive). Each
will have state COMPLETED, FAILED, CANCELLED or IN-PROGRESS.
The answer depends on the problem specication. In the case of the Max-
imum independent set, the answer will be the binary string with 0s indicating
vertices that are not part of the Maximum independent set.
Lets just mention without further explanation the possible problem types
that can be solved:
Binary Quadratic Program (BQP) problem/bqp
Maximum Satisability (MAX-SAT) problem/maxsat
Cardinality SAT problem/cardsat
Weighted Maximum Satisability (Weighted MAX-SAT) problem/maxweightedsat
Model Expansion (MX) problem/mx
Maximum Independent Set (MIS) problem/mis
30
Figure 2.4: Orion problem submission C program - part 2
31
Figure 2.5: Orion problem submission C program - part 3
32
Clique (CLQ)
33
Chapter 3
Results
3.1 Orion returned results
Although C program works, it was easier (and might be easier for any other
interested person, as a rst try) to manually submit the problem to Orion web
services. That has been done, as shown in the gure below.
The submitted problem data was:
p edge 10 24
e 1 2
e 1 3
e 1 5
e 1 7
e 1 8
e 1 9
e 2 3
e 2 5
e 2 6
e 2 7
e 2 8
e 3 5
e 3 6
e 3 7
e 3 8
e 3 9
e 5 7
e 5 8
e 5 9
e 6 7
e 6 8
e 6 9
e 7 9
e 8 9
for which the answer is: 0001001101 4, indicating 4 vertices in the Maximum in-
dependent set, and vertices in the Maximum independent set are: V
4
, V
7
, V
8
andV
1
0.
34
Figure 3.1: Web services for Orion returned the Maximum independent set
35
Which are GLD, PFE, RTP and BA ( gold ETF fund, pharma giant, gold miner
and defence contractor ) and together they represent the most diversied port-
folio.
3.2 Further pruning of diversied portfolio - graph
theory
Lets give without the proof the following
THEOREM (Chvatal-Erdos, 1972). If G is a graph with at least 3 vertices, so
that its stability (independence) is not bigger then its connectedness , i.e.
. Then G is a Hamiltons graph.
So in the case if is very big, which would indicate very strongly coupled
nancial instruments, if we would get the result of less than , then we would
be able to connected all the nancial instrument in one path. I.e. we would be
able to conclude what is the logical connection between dierent nancial in-
struments and which one inuences the other one. In other words, the seeming
complexity of correlations - or someone might say volatility - would disappear
and each nancial instrument would be connected with only two other nancial
instruments.
It doesnt seem strange that theorem in that case implies that such connec-
tion between instruments must be cyclic (since the graph is Hamiltons graph).
So the causation in this Hamiltons cycle runs in both directions, and also -
nancial instrument through the cycle impacts itself.
3.3 Is learning rate in classical neural network
related to Adiabatic quantum computing?
Here, one likes to suggest the way forward when analysing performance of Adi-
abatic quantum computer built on the bases of SQUIDs. As the system of
SQUIDs corresponds to the neural networks, one would expect, since SQUIDs
should interact in a quantum coherent manner that the corresponding theory
should be of quantum neural networks. Because no consistent quantum theory
of neural networks exists, one could try to use Adiabatic quantum computing
as an inspiration. In the other direction, since there are lot of unknown perfor-
mance issues related to the Adiabatic quantum computing, one could use - as
the worst case - the conclusions of classical neural networks performance.
E.g. to determine the time required for Adiabatic computing algorithm to
nish computing, one could start by using the rate of learning algorithm for
classical neural network.
36
Figure 3.2: Maximum independent set
37
Figure 3.3: In the case of a small portfolio, an interesting relationship between
nancial instruments
38
Chapter 4
Discussion and conclusion
4.1 Discussion
In the section Public key cryptography standards, we started with the motiva-
tion of a considerable military and economic interest. The possibility of breaking
one of the most secure encryption algorithms today. The description of the ba-
sic security mechanisms is widely available. For those wanting to know more,
author would suggest some introductory in IPsec protocol.
In the section Breaking RSA with quantum computer we constructed theo-
retically quantum computer that can break RSA ciphering. We used so called
quantum gate approach. Although theoretically very elegant approach, it doesnt
seem feasible technically. The exposition in this section closely follows [ND].
In the section Classes of problems we introduced some notions from com-
plexity theory. The exposition closely follows [NC].
In the section SQUIDs and quantum neural networks we shortly introduced
SQUIDs as the basis of the quantum processors, and also shown a tentative
connection to the neural networks. One can read more in e.g. [MT] for SQUIDs
and [CKS] for neural networks. The idea of quantum neural networks is still
not very developed, lacking the aim, consistency in the theoretical approach and
understanding how to include quantum eects.
In the section Some basic notions of graph theory we only introduced some
basic graph theory notions. The reader can check any book on graph theory for
further reading.
In the section Maximum independent set portfolio we used the ideas from
[GR] to create a very well diversied portfolio. The interface to the D-wave
systems Orion web services for quantum processing is explained. Maximum
independent set and portfolio are determined.
In the section Further pruning of diversied portfolio - graph theory, we
are giving a somewhat unexpected result hinting that in moderately volatile
conditions one can always nd an order, and that each nancial instrument
depends exactly on two other nancial instruments.
In the section Is learning rate in classical neural network related to Adiabatic
quantum computing?, we are trying to argue that it makes sense for researchers
in both elds to be acquainted with the both theories as they should inter-
change many results. Again for Adiabatic quantum computing there is not a
39
lot of information so the reader is instructed to check the currently submitted
papers. Again for neural networks, for start, [CKS] is good.
4.2 Conclusion
The main attractiveness of the existing superconducting quantum processors is
theoretical. After Sir Roger Penroses claim that the consciousness is an quan-
tum eect originating in the cell organelle microtubule, Max Tegmark refuted
it, showing that the coherence time for the quantum eects is too short for any
quantum eect to arise. Then it is interesting that we know that the eciency
of the photosynthesis is due to quantum eects, and we also know that the Adi-
abatic quantum computing doesnt need long coherence time to be successful.
In that respect, it is interesting to see further development of superconducting
quantum processors.
From the practical point of view, while it is possible that some important
algorithms can be found, which would be very eciently solved by Adiabatic
quantum processors, that doesnt seem to be of great interest, at the moment.
40
Bibliography
[DM] N. David Mermin, Quantum computer science: An introduc-
tion, Cambridge University Press 2007
[NC] Michael A. Nielsen, Isaac L. Chuang, Quantum computation
and quantum information, Cambridge University Press 2007
[MT] Michael Tinkham, Introduction to superconductivity 2nd ed.,
Dover publications 2006
[CKS] A. C. C. Coolen, R. Kuhn, P. Sollich, Theory of neural infor-
mation processing systems, Oxford University Press 2005
[DV] Darko Veljan, Kombinatorna i diskretna matematika (Combi-
natorial and discrete mathematics), Algoritam 2001
[GR] Geordie Rose, dwave.wordpress.com, September 2008
41

Você também pode gostar