suai.ru/our-contacts |
quantum machine learning |
Quantum-Based Modelling of Database States |
119 |
Fig. 2 Value mapping into a real one-qubit system
|V1 = 0.9 · |0 + 0.435· |1 |V2 = 0.7 · |0 + 0.714· |1 |V3 = 0.3 · |0 + 0.954· |1
Between values of a non-orthogonal data type dt a gradual similarity is required. Therefore we choose non-orthogonal ket vectors for modelling. As target of the mapping we take a real inner product space with dimension n ≤ k. As extreme case we can map all values to the two-dimensional inner product space of a real one-qubit-system, see, for example, the mapping of three values in Fig. 2.
An intuitive question arises from where we get the right ket vectors. Starting point is a k ×k similarity matrix S = {sij } expressing the required gradual similarity values between all value pairs. For the construction of the ket vectors, the similarity matrix must meet the following properties:
Ð Unit interval: All values of the matrix are elements from [0, 1].
Ð Diagonal values: All diagonal values refer to the similarity of values to themselves and are therefore 1.
Ð Symmetry: The matrix is symmetric since similarity is usually required to be symmetric.
Ð Square-rooted positive semi-definiteness: For reasons explained in the sequel, we
require the matrix of square roots S 1 := {√s } to be positive semi-deÞnite. That
2 ij
is, the eigenvalues must be non-negative.
Table 3 left shows an example of a similarity matrix.
Based on a similarity matrix S we can construct the ket vectors. First, we replace
1
all matrix elements by their square roots yielding S 2 . The motivation for this is that the projection probability given by quantum measurement corresponds to a squared
1
inner product. Second, we perform a spectral decomposition of S 2 and obtain the matrix V containing orthonormal eigenvectors as rows and a diagonal matrix L with the corresponding non-negative eigenvalues:
1 |
= V |
· L · V . |
S 2 |
suai.ru/our-contacts |
quantum machine learning |
120 |
I. Schmitt et al. |
Table 3 Similarity values (left) and their element-wise square roots (right)
S |
V1 |
V2 |
V3 |
V1 |
1 |
0.5 |
0 |
V2 |
0.5 |
1 |
0.5 |
V3 |
0 |
0.5 |
1 |
1 |
V1 |
V2 |
V3 |
||||||
S 2 |
|||||||||
V1 |
1 |
|
|
1/√ |
|
|
0 |
|
|
|
|
2 |
|
|
|||||
V2 |
1/√ |
|
|
1 |
|
|
1/√ |
|
|
2 |
|
|
2 |
||||||
V3 |
0 |
|
|
1/√ |
|
|
1 |
|
|
|
|
2 |
|
|
|||||
Since L is a diagonal matrix with non-negative values we can write it as a product
1 |
1 |
and obtain: |
|
|
||
of its square roots L = L 2 |
· L 2 |
|
|
|||
|
1 |
= |
|
1 |
1 |
· V |
|
S 2 |
V · L 2 |
· L 2 |
|||
|
|
= |
|
1 |
1 |
· V |
|
|
V |
· L 2 |
· L 2 |
||
|
|
= |
|
1 |
|
1 |
|
|
L 2 · V |
· L 2 · V |
|||
|
|
= |
K |
· K, |
|
|
1
with K = {kij } = L 2 · V . The columns of matrix K correspond to the required ket vectors. However, they are vectors of k dimensions. The number of dimensions is usually higher than necessary. Let us inspect the diagonal matrix L containing the eigenvalues. Very often, some of the eigenvalues are zero. The corresponding dimensions can therefore be removed and we end up with ket vectors of an inner product space of a dimension n less than k.1 The mapping is given by:
QDom( dt ) = {|V1 , . . . , |Vk }
Dom( dt ) → QDom( dt )
|
n |
j [1, k] : Vj → |Vj = |
. |
kij |i span{|1 , . . . , |n } = Rn |
|
|
i=1 |
where |i denotes the i-th canonical unit vector of Rn.
We will demonstrate the derivation of ket vectors from a similarity matrix using the example given in Table 3. The similarity matrix is given left and its square root is given right. The Cholesky-decomposition yields the square matrix given in Table 4. The matrix can be reduced by the last row since the corresponding eigenvalue is zero. Thus, we obtain three two-dimensional ket vectors from the resulting columns. They are illustrated in Fig. 3.
1A more efÞcient method to derive the ket vectors is to apply the Cholesky-decomposition from
1
S 2 [5].
suai.ru/our-contacts |
quantum machine learning |
Quantum-Based Modelling of Database States
Table 4 Ket vectors as columns
Fig. 3 Ket vectors as one-qubit-vectors
121
|V1 |
|V2 |
|V3 |
||
1 |
1/√ |
|
|
0 |
2 |
||||
0 |
1/√ |
|
|
1 |
2 |
||||
0 |
0 |
|
|
0 |
|
|
|
|
|
|Vi ˙ R2
. 1
|V1 =
0
. 1 1
|V2 = √
2 1
. |
0 |
|V3 = |
1 . |
Take a ket vector |Vi expressing a non-orthogonal property value. We use a projector for a similarity measurement Ô≈Õ of |Vi against |Vx . The projector is deÞned as P = |Vi Vi |. The measurement result corresponds to the squared cosine of the enclosed angle:
Vx |P |Vx = Vx |Vi Vi |Vx .
In our example in Tables 1 and 2, the properties fuel tank and kilometre are non-orthogonal. Condition FT1 can be evaluated by applying the projector P = |V35 V35| against a ket vector encoding the fuel tank of a certain car.
Elementary data types are often not powerful enough to model complex data structures for many practical applications. Instead, there is a need to construct complex data structures on top of elementary data types.
suai.ru/our-contacts |
quantum machine learning |
122 |
I. Schmitt et al. |
In our example in Table 1 we have a complex data structure: the car dealership involves a set of cars, a service booklet contains a list of service entries, and properties of the engine are grouped together.
The type theory of object-oriented databases [6] and also most imperative programming languages exploit data type constructors for construction of complex data types based on existing data types given as constructor arguments. The two most important data type constructors are:
Ðtuple: The tuple data type constructor groups a Þxed number of properties which we will call components. Every component is composed of a data type and an identifying label:
tuple-dt := tuple (name1 : Dt1 , . . . , nameN : DtN ) .
The domain of the constructed data type is the result from multiplying (Cartesian) the domains of the given data types:
Dom ( tuple-dt ) := Dom ( Dt1 ) × . . . × Dom ( DtN ) .
A tuple value needs to be constructed analogously to the data type construction. If value1 to valueN are values of the properties, then the tuple value is deÞned by:
tuple-value := tuple (value1, . . . , valueN ) .
For a given tuple value we can access a certain property namei using the dotoperator: tuple-value.namei .
Ðset: The set data type constructor creates a data type for a set of values from the given data type:
set-dt := set ( dt ) .
The domain of the constructed data type is given by the power set:
Dom ( set-dt ) := P(Dom ( dt )).
The initial set value is constructed by:
set-value := set () .
This operation creates an empty set. Further operation for inserting and removing of elements and general set operations are available but not detailed here.
suai.ru/our-contacts |
quantum machine learning |
Quantum-Based Modelling of Database States |
123 |
Using our example we demonstrate data type construction. Assume that the following elementary data types lt-dt ,2 yoc-dt ,3 kilometre-dt , anddate-dt are given. The data types for a car and for an entry of the service booklet are constructed as follows:
car-dt := tuple (lt : lt-dt , yoc : yoc-dt )
entry-dt := tuple (kilometre : kilometre-dt , date : date-dt ) .
Data type construction is recursive. Starting points are elementary data types:
Ð An elementary data type is a data type.
Ð Let dt1 to dtN be data types and name1 to nameN labels. Then tuple (name1 : dt1 , . . . , nameN : dtN ) is a data type.
Ð If dt is a data type, then set ( dt ) is a data type.
In our example we deÞne the data type service-booklet-dt and the data type car-dealership-dt by applying the set data type constructor on top of the tuple data type constructor:
service-booklet-dt := set ( entry-dt )
car-dealership-dt := set ( car-dt ) .
Analogously we can deÞne all data types required for our example.
After introducing data type constructors we will map them onto concepts of quantum mechanics. The idea is to deÞne a bijection that relates values of constructed data types to vectors of an inner product space.
The tuple data type constructor groups a Þxed number of components. Every component consists of a label and a data type. Let us be given the labels namej and
the values Vjj Dom( dtj ) of the components j as well as the corresponding
i
ket vectors |Vjji . Following the mathematics of quantum mechanics, several inner
2lt-dt stands for license tag .
3yoc-dt stands for year of construction .