• Tidak ada hasil yang ditemukan

Strategies of information encoding

U =eiHt |ψi= α0|00i+ α1|01i+ α2|10i+ α3|11i

amplitude encoding of unit-length complex vector (a0, a1, a2, a3)T basis encoding of binary string (10),e.g. to represent integer 2 Dynamic encoding of a Hermitian matrix

Figure 3.3: Illustration of the different encoding strategies for a quantum state of a 2-qubit system.

quantum annealer3, has been tested since a number of years by large research collaborations and gives insights into the practical challenges of quantum computing (which still seem comfortably dis- tant in the case of universal quantum computers). Current devices are limited to solving quadratic unconstrained binary optimisation (QUBO) problems,

(x1min,...,xN)

X

ij

wijxixj with xi, xj∈[0,1], wij∈R, (3.4)

where the ij couplings have to follow the connectivity of qubits in the hardware. Measuring the performance of quantum annealing compared to classical annealing schemes is a non-trivial problem, and although advantages of the quantum schemes have been demonstrated in the literature mentioned above, general statements about speed-ups are still controversial [77, 78].

Another famous quantum computational model isone-way or measurement-based quantum com- putation. The idea [79] is to prepare a highly entangled state called acluster stateand to perform a series of single-qubit measurements which conditionally depend on the output of former mea- surements. This computation is of course not unitary. The result can be either the state of the unmeasured qubits, or the outcome of a final measurement [80]. Many important quantum al- gorithms have been implemented using one-way computation [81, 82, 83, 84]. However, I do not know of any quantum machine learning approach based on this model, and it is an open question whether it offers a particularly suitable framework to approach supervised pattern recognition.

Classical object Properties quantum state Basis encoding

(b1, ..., bd), bi∈ {0,1} bencodesx∈RN in binary |xi=|b1, ..., bdi Amplitude encoding

x∈R2

n 2n1

P

i=0 |xi|2= 1 |ψxi=

2n1

P

i=0

xi|ii A∈R2

n×2m 2n−1

P

i=0 2m−1

P

j=0 |aij|2= 1 |ψAi=2

n−1

P

i=0 2m−1

P

j=0

aij|ii|ji

A∈R2

n×2n 2n1

P

i=0

aii= 1, aij=aji,Apos. ρAwithρij =aij

Dynamic encoding A∈R2

n×2n U unitary UA withUij =aij

A∈R2

n×2n aij =aji HA withHij=aij

A∈R2

n×2m - HA˜ with ˜A= 0 A

A 0

Table 3.2: A summary of the different types of information encoding presented in the text. This table also summarises the notation of basis, amplitude and dynamic encoded information into the description of a quantum system used in this thesis.

There are different ways to encode information into an n-qubit system. To my knowledge, no terminology to distinguish between such strategies has been proposed yet, and I will therefore refer to them as basis encoding, amplitude encoding, and dynamic encoding. Questions of information encoding become especially important for machine learning and data mining, where information or patterns are extracted from large datasets. The following chapters as well as the conclusion of this thesis will heavily rely on the language developed in this section. Ways of actually encoding datasets in the different representations will be discussed in Chapter 4 and are a crucial part of quantum machine learning algorithms. An illustration of the different encoding methods can be found in Figure 3.3 and a summary of the notation used here can be found in Table 3.2.

3.3.1 Basis encoding

Basis encoding associates a computational basis state of ann-qubit system (such as|ψi=|0011i) with a classicaln-bit-string (0011). In a way, this is the most straight forward way of computation, since a bit literally gets replaced by a qubit, and a ‘computation’ acts on all bit sequences in a superposition in parallel.

The value of the amplitudes of each basis state does not carry any other information than to ‘mark’ the result of the computation with a high enough probability of being measured.

For example, if the basis state |0011i has a probability |a0011|2 > 0.5, repeated execution of the algorithm and measurement of the final state in the computational basis will reveal it as the most likely measurement result, and hence the overall result of the algorithm. For

the basis encoding method, the goal of a quantum algorithm is therefore to increase the proba- bility or absolute square of the amplitude that corresponds to the basis state encoding the solution.

Like in classical computers, basis encoding uses a binary representation of numbers. A quantum state|xiwithx∈Rwill therefore refer to a binary representation ofxwith the numbernof bits that the qubit register encoding|xiprovides. There are different ways to represent a real number in binary form, for example by fixed or floating point representations. In the following it is always assumed that such a strategy is given. The most simple strategy is to define that ifxis an integer and

x=

n−1

X

k=0

bk

1

2k, (3.6)

then the binary sequence is (b0. . . bn1). Ifxis in the interval [0,1], it can be approximated as

x=

n1

X

k=0

bk

1

2−k, (3.7)

and the binary representation is likewise given by thebk as (b0. . . bn−1).

Since every classical algorithm can be translated into a reversible routine [85] it can be implemented on a quantum computer.4 Formally this means that if there is a classical routine that maps x→g(x) we can find a quantum algorithm or unitary evolution that implements

|xi|0i → |xi|g(x)i.

The central problem is to identify quantum algorithms that can bring structural advantages over classical machine learning algorithms, which is of course much more demanding.

3.3.2 Amplitude encoding

Amplitude encoding associates classical numbers with quantum amplitudes, and there are different options to do so. A normalised classical vectorx∈C2

n,P

k|xk|2 = 1 can be represented by the amplitudes of a quantum state|ψi ∈ Has

x=

 x1

... x2n

↔ |ψxi=

2n−1

X

j=0

xj|ji.

In the same fashion a classical matrixA∈C2

n×2m with entriesP

ij|aij|2= 1,can be encoded into

Ai = P2m1 i=0

P2n1

j=0 aij|ii|ji by enlarging the Hilbert space accordingly. The index registers

|ii,|ji refer to the i’th and j’th element respectively. For Hermitian positive trace-1 matrices A ∈ C2

n×2n, another option arises: One can associate its entries with the entries of a density matrixρA, so thataij↔ρij. I will use all three possibilities in Part III.

4More precisely, the reversible Toffoli gate is universal for classical Turing machines, and a Toffoli gate can be constructed from elementary quantum gates.

x1

-1 1 x1

x2

-1 1

Figure 3.4: Data points in the one-dimensional interval [−1,1] (left) can be projected onto nor- malised vectors by adding a constant value in a second dimensionx2and renormalising.

Encoding information into the probabilistic description of a quantum system necessarily poses severe limitations on which operations can be executed. This becomes particularly important when we want to perform a nonlinear map on the amplitudes, which is impossible to implement in a unitary fashion. This has been extensively debated under the keyword of nonlinear quantum theories [86, 87] and it has been demonstrated that assumptions of nonlinear operators would immediately negate fundamental principles of nature that are believed to be true [88, 89].

Another obvious restriction of this method is that only normalised classical vectors can be pro- cessed. Effectively this means that quantum states represent the data in one less dimension or with one less degree of freedom: A classical two dimensional vector (x0, x1) is mapped to amplitudes of a qubit (a0, a1) which due to |a0|2+|a1|2= 1 lie on a unit circle, a one-dimensional shape in two dimensional space. Three dimensional vectors encoded in three amplitudes of a 2-qubit quantum system (where the last of the four amplitudes is redundant and set to zero) will reduce the space to the surface of a sphere, and so on. A remedy can be to increase the space of the classical vector by one dimensionxN+1= 1 and normalise the resulting vector. TheN dimensional space will then be embedded in aN+1 dimensional space in which the data is normalised without loss of information.

A special type of amplitude encoding looks at a discrete probability distributionp={p0, ..., pN1} that is represented by a quantum state

pi=

N1

X

i=0

√pi|ii.

Such a state is called aqsamplesince measuring the qsample in the computational basis is equivalent to classical sampling fromp.

3.3.3 Dynamic encoding

For some applications it can be useful to encode matrices into the dynamic evolution, for example into unitary operators. While unitary operators obviously restrict the class of matrices that they can represent, a useful option from Ref. [90] is to associate a HamiltonianH with a square matrix A. In caseAis not Hermitian, one can sometimes use the trick of instead encoding

A˜ =

0 A

A 0

. (3.8)

and only considering part of the output. This way, the eigenvalues of A can be processed in a quantum routine, for example to multiplyAorA−1 with an amplitude encoded vector. Another option arises when we look at the dynamics of a subsystem taken out of a larger system with a unitary evolution,P

lKlρKl. The matricesKlonly have the constraint thatP

lKlKl= 1. Table 3.2 summarises the different strategies of information encoding mentioned here.

It is interesting to note that many quantum algorithms - such as the matrix inversion routine introduced below - can be understood as strategies of transforming information from one kind of encoding to the other.