Understanding mathematics of Grover’s algorithm

We analyze the mathematical structure of the classical Grover’s algorithm and put it within the framework of linear algebra over the complex numbers. We also generalize it in the sense, that we are seeking not the one ‘chosen’ element (sometimes called a ‘solution’) of the dataset, but a set of m such ‘chosen’ elements (out of n>m)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n>m)$$\end{document}. Besides, we do not assume that the so-called initial superposition is uniform. We assume also that we have at our disposal an oracle that ‘marks,’ by a suitable phase change φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document}, all these ‘chosen’ elements. In the first part of the paper, we construct a unique unitary operator that selects all ‘chosen’ elements in one step. The constructed operator is uniquely defined by the numbers φ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi $$\end{document} and α\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha $$\end{document} which is a certain function of the coefficients of the initial superposition. Moreover, it is in the form of a composition of two so-called reflections. The result is purely theoretical since the phase change required to reach this heavily depends on α\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\alpha $$\end{document}. In the second part, we construct unitary operators having a form of composition of two or more reflections (generalizing the constructed operator) given the set of orthogonal versors. We find properties of these operations, in particular, their compositions. Further, by considering a fixed, ‘convenient’ phase change φ,\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\varphi ,$$\end{document} and by sequentially applying the so-constructed operator, we find the number of steps to find these ‘chosen’ elements with great probability. We apply this knowledge to study the generalizations of Grover’s algorithm (m=1,ϕ=π\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$m=1,\phi =\pi $$\end{document}), which are of the form, the found previously, unitary operators.


Introduction
Let us note at the beginning that we will avail a notation very commonly used in quantum physics, i.e., the Dirac notation. We will deal with finite-or infinite-dimensional Hilbert spaces H over the complex numbers. |x will denote an element of this space (column vector in the case of the finite-dimensional linear space over the complex numbers), x| will denote the dual conjugate of |x , i.e., row vector in the finitedimensional case, with entries that are conjugates of the entries of the vector |x . a|b will denote the inner (scalar) product in the space H, while |a b| will denote the so-called outer product that is explained below.
Namely, the outer product of vectors two |x , |y denoted by |x y| means a projection on the one-dimensional space span(|x ). More precisely |x y| : H |z → |x y |z ∈ H.
Let A : H → H be a unitary operator (matrix in the case of finite-dimensional H) of the form A = I − 2 |1 1| , with I denoting identity operator matrix and |1 being the vector of unit length and in the case of H being n-dimensional, having all identical entries equal to 1/ √ n. By b j let us denote, here, versors having all but j-th entries equal to 0 and the j-th one equal to 1. In terms of quantum mechanics the versors b j are the so-called pure states and the vector |1 is, in fact, certain superposition of the pure states b j n j=1 . The basis of the famous Grover's algorithm (see, e.g., [1], [4] or [6]) is the following remarkable property of the operator A for n = 4. Namely, if we consider versors | j , j = 1 . . . , 4 having all entries except for the j-th equal to 1/2 and the j-th equal to −1/2, then A | j = − b j for all j = 1, . . . , 4. To appreciate this property more, let us imagine that one has a database consisting of 4 elements. We are looking for a particular, 'chosen' element of this base. Suppose that a certain function (an oracle) can be evaluated at every element of this base. In the considered situation, the oracle assigns the value 1 (in fact multiplies by 1, since the action of the oracle must be a unitary operation) to all except for the 'chosen' element of the base and the value −1 to the 'chosen' one. Then, using operator A it is possible to regain this 'chosen' element just in one step.
We will generalize the problem discussed above and construct an algorithm that finds m 'chosen' (or 'special') elements of the database of the size n > m. The generalization is also in the sense that the marking of 'selected' elements by an oracle is done by the so-called phase change ϕ. In the discussed above example, ϕ was equal to π .
It has to be clearly stated that the problem of finding all m chosen elements of n-element database in one step by suitable choice of phase changing oracle is by no means not new. One has to mention a sequence of papers of Long and his associates such as [7], [8], [9], [12], [13], [14], or [10], [11] or the summarizing and putting in the linear algebraic context, the paper [15].
In the sequel, we are repeating most of the results of these papers, but from the broader and general purely linear algebraic perspective. Moreover, we show that the structure of Grover's algorithm that has a form of the composition of two the so-called reflection operators (for the definition and properties of such operators see Sect. 3) is uniquely defined. We also slightly generalize the original statement of the algorithm, assuming that the initial superposition is not uniform. In the sequel, we develop a small theory of analysis of generalized reflection operators.
We will construct a unitary operator that finds all chosen m elements of the database of size n in just one step by properly choosing the phase ϕ = 2 arcsin n 4m , with which the oracle marks chosen elements, provided n/m ≤ 4. We will also show that so-constructed unitary operator must be of the form: with |1 as described above. Hence, the form of the operator is unique. More precise development of this thought will be presented in Sect. 2.1, however, now we can state, that one cannot find any other finite-dimensional unitary operator in n-dimensional Hilbert space over complex numbers that would find all 'marked elements in the database' in one step. Thus, Grover's algorithm is unique and the 'only one' that does it. The result is purely theoretical (see also Remark 2), however, in the author's belief, it adds to a better understanding of Grover's algorithm.
In particular, it will turn out that if n/m = 4 then in just one step, one can find all 'chosen' elements when the phase change is ϕ = π like in the classical Grover's algorithm. To complete the list of simple cases, we find also unitary operators that 'find the "chosen" element in one step' when n/m = 3, then ϕ = 2π/3 and when n/m = 2 then ϕ = π/2.
In fact, we generalize Grover's algorithm even further. Namely, we assume that a 'database' is given in the form of the vector | y = n k=1 σ k |b k , with n k=1 |σ k | 2 = 1, ∀k = 1, . . . , n σ k = 0, and we are interested in getting all elements of this database, i.e., say all the elements of the set {|b k } k∈S for some subset S of the set {1, . . . , n} that are 'marked' by an oracle. In quantum mechanical terms, the state | y is a superposition of states {|b k } n k=1 with weights {σ k } n k=1 . The results similar to the ones described above are presented in Theorem 1.
One has to remark that, obviously, if one makes a measurement (the so-called collapse of the superposition) after applying our unitary operator A, one would get only one of those 'selected' elements. A similar situation would happen if we would have made a measurement on the database itself.
Generally, we can use the outcome of operator A in at least two ways. Firstly, if the phase change ϕ is exactly equal to 2 arcsin n 4m , we can treat it as the smaller new database, of the size m. That is the outcome is now the superposition of m chosen elements.
Secondly, if the phase change ϕ is not exactly equal to 2 arcsin n 4m , then one can apply the composition of the operator A. That is to consider A k and find k such, that the probability of observing elements from the set of 'marked' elements, be equal say greater than, say, .99999. How to find such k is given, below, e.g., by Formula (3.15). Notice that estimating the probability of the outcome is particularly important in the case of quantum systems because of their random nature. Let us remark that the classical Grover's algorithm works the same way with m = 1 and ϕ = π.
To find such k and generally how to analyze and deal with the composition of reflection operators (the operator A itself and A k are examples of such composition) is shown in Sect. 3, where the mathematical foundations of our mathematical analysis of the generalized Grover's algorithm are presented in the general setting. More specifically, we will define a certain class of unitary operators, so to say generated by a system of orthonormal versors. Then, to prove certain properties of this class of operators, in particular, to show that the operators of this class constitute a non-commutative, multiplicative ring over complex numbers. As stated above, the operator considered in the literature and known under the name of the Grover's algorithm belongs to this class. Finally, we will make use of the properties of this class of unitary operators and we will analyze the Grover's algorithm and will prove known properties of this algorithm in a different way, in particular, we will estimate the number of its iterations to get the probability of getting the 'chosen' element very close to one. See Subsection 3.1.
Returning to the exact choice of the phase change mentioned above, the outcome of operator A, as the new, smaller database can be used in various ways. The simplest way seems to be speeding up Grover's algorithm at least in some special cases.
To see what we mean and how this idea of speeding up Grover's algorithm would work, let us imagine that we have a database of the size 64 and that we are interested in finding a chosen element. Imagine that the elements of this base are assigned labels i 1 i 2 i 3 where i j ∈ {1, 2, 3, 4}, j = 1, 2, 3. Suppose that the 'chosen' element has label 111 . So now, first we apply oracle that marks all elements with i 1 = 1. Hence, by applying operator A (with ϕ = π as in the Grover's algorithm case) we will get the 'new' database (of the size 16) with elements labeled 1i 2 i 3 . We apply new oracle that marks all elements with i 2 = 1, and then the operator A (again with ϕ = π) getting the new database of size 4 with elements labeled 11i 3 . And finally we apply oracle and the operator A (again with ϕ = π) likewise, for the last time getting our element with label 111 . Notice, that we obtained our 'chosen element' in 3 steps not in 8π/4 + 1 = 7 as it would be in the case of the classical Grover's algorithm! This idea can be easily generalized, and we could see that in the case of n = 4 k we could get chosen element in k steps not in π 2 k−2 + 1 as the results of Grover's algorithm would suggest.
Another possible way of 'speeding up' Grover's algorithm using the results of the paper, although less spectacular than the example above, could be reducing the number of iterations in order to get the 'chosen' element of the base with very high probability. Namely, if, say, the size of the base is n = n 1 n 2 . Then, direct application of the Grover's algorithm would require π √ n 1 n 1 /4 + 1 iterates, while the two-stage application of Grover's algorithm firstly with m = n 1 and then with m = 1 and the vector |1 in the original Grover's algorithm substituted by the outcome of the Grover's algorithm applied in the first stage as the second stage. One can notice that then with such twostage algorithm would require only π √ n 2 /4 + 1 + π √ n 1 /4 + 1 iterations. That is why we needed generalization of the Grover's algorithm presented in Theorem 1. Of course, such reduction was possible under the assumption that we have some partial knowledge about the 'chosen' item, i.e., that this item is an element of the dataset of size n 1 .
The reduction of the number of iterates was possible, since, according to Remark 8, the necessary number of iterates to find the set of chosen elements with probability close to 1 is π 4 n m + 1 . Another purpose of this note is to show that this feature is specific (for the classical Grover's algorithm) only when the ratio n/m ≤ 4 and ϕ ∈ [0, π]. The Grover's algorithm apart from being a source of other important algorithms (to mention only one [3]) was one of the algorithms pointing out the great difference between classical (so to say sequential) computers and quantum ones (at least partially parallel).
The paper consists of three sections. The next one (number 2, below) solves the problem of finding a unitary operator that finds all m 'chosen' elements of the data of size n in one step.
The second Sect. 3 presents, as mentioned above, a generalization of the operator A, mentioned above, in the sense that we consider k ≥ 1, mutually orthogonal versors x j , j = 1, . . . , k that are used in the construction. We do not confine here ourselves to the fact that we deal with a finite-dimensional situation. The selected versors x j can be 'chosen' from any Hilbert space. We show how to briefly describe an operator of this kind and what is more we show how to compose such operators. The detailed analysis of the generalization of Grover's algorithm is performed, as stated above, in Subsection 3.1.
The last Sect. 4 contains less important properties of the unitary operator, analyzed in the first section, as well as some less interesting or longer proofs.

The choice of all marked elements
In all formulae in the sequel by i, we will denote imaginary unit, i.e., i = √ −1. Let us consider a state space H of dimension n. Let {|b k } n k=1 constitute the n elements of its orthonormal basis. That is b j |b k = 1 if k = j and 0 otherwise.
We start with the following auxiliary problem. Let us imagine that a system is in the state | y = n k=1 σ k |b k , where n k=1 |σ k | 2 = 1. Let us also assume that ∀k = 1, . . . , n : σ k = 0 in order to avoid unnecessary confusion. Let us assume that some of the (pure) states of {|b k } n k=1 for example {|b k } k∈S , where S is a subset of {1, . . . n}, are 'chosen,' meaning that there exists a unitary operation J S (an oracle) that maps say all b j , j = {1, . . . n}\S into themselves but |b k into e iϕ |b k , for k ∈ S, for some ϕ ∈ (0, 2π). Assume that the cardinality of S is m. Let us further denote Hence, |x S and |z S are mutually orthogonal and we have Let us also define the following versor: Now, notice that the action of the oracle can be described in terms of unitary operations as an operation defined by an operator that has the property that J S | y = |v S . We want to find a unitary operator A that maps every vector |v S into vector y S for every S ⊂ {1, . . . , n} of cardinality m. Or, in other words, using operator J S , that for every subset S ⊂ {1, . . . , n} of cardinality m Now let us denote by ϕ = 2 arcsin 1 2α . By construction, we have α ∈ (0, 1). Theorem 1 The only unitary operator A satisfying relationship (2.2) for every S ⊂ {1, . . . , n} is when 1 2 ≤ α < 1 or equivalently π/3 < ϕ ≤ π , and A has the following form: In particular, we have: if α = 1/2, then ϕ = π and Proof Is shifted to Sect. 4.

The miracle can happen only for n/m ≤ 4
Now, let us apply the above-mentioned result to the following setting that is, in fact, a generalization of situation met in a famous Grover's algorithm. Let |1 denote the vector having all entries equal to 1/ √ n. Hence, formally, |1 = 1 √ n n j=1 b j . |1 is a state vector (versor) of some quantum system. Let us define vectors |V S , by the formula: Let us denote, as before, √ m j∈S b j . Thus, utilizing notation from above we have σ k = 1/ √ n, k = 1, . . . , n, α = √ m/n and so on.
Hence, we have We have the following result.

Remark 1
Let us note, that the assertion of the theorem states that any proportion m n of chosen elements of the database of the size n can be found in just one step provided m/n ≥ 1/4. Moreover, that operator A must have a form of generalized reflection 'in the direction |1 ' and then oracle applied. Since the action of the oracle can also be described as a generalized reflection (compare Formula (2.1)), we see that any algorithm for finding a set of 'chosen' elements has to have a form of the composition of two reflections. Hence, we need a new definition.

Definition 1
Let |x be any versor in H and ϕ any real number from the segment [0, 2π). Then, the operator will be called a generalized reflection (in brief reflection).

Remark 2
Notice also that, if we could subtract (in the sense of the theory of sets but of course with the help of some unitary operator) from the whole database the set of 'chosen' elements, then theoretically by the proper choice of the phase ϕ we could identify just one chosen element in two steps regardless of the size of the base. Namely, first finding the number 1/α 2 = n n−1 and then applying an oracle with the phase change ϕ = 2 arcsin( 1 2α ). Now following the argument proceeding the theorem we can find just in one step all elements that are not 'chosen.' Then, subtracting from the whole base the whole set of 'unchosen' elements we can find the 'chosen' one. Of course, this is only theory since function 2 arcsin( 1 2α ) is highly nonlinear, so one cannot precisely find the phase ϕ and another problem is with is the oracle marking all not chosen elements by the precise phase change ϕ.

General unitary operator generated by the 'chosen' elements of the base
Keeping in mind that the versor |1 is a linear combination of two orthogonal versors |U S and |E S and that, in fact, we deal with the composition of operators which, after some algebra, leads to the conclusion that the product is of the general form (3.2) considered below. So first let us analyze the unitary operators of the form (3.2).
Let k be such a natural number that is less or equal than the dimension of H. Finally, let x j k j=1 be a collection of orthonormal, unit vectors (versors) of H. Let us define operator A k : H → H in the following way: where β j , α jl ∈ C, j, l = 1, . . . , k and I denotes an identity operator on H.
We will develop, now, tools to deal with the operators given by (3.2). Let us denote by H k the subspace of H that is spanned by the elements x j k j=1 . Further, let U k denote the orthogonal complement of H k in H. Now we have H = H k ⊕ U k . Notice that the operator k j=1 x j x j is the projection on H k . Hence, I − k j=1 x j x j is the projection on U k . Now, let consider also a finite-dimensional, involutive algebra over the complex numbers generated by the column vectors y j with an element x j being its j-th entry and 0 being all others. Let the involution * be defined by the rule that y * j is a row vector having all entries equal to zero and the j−being equal to x j . Let K k denote a space spanned by elements y j , j = 1, . . . , k. Obviously and naturally K k is isomorphic with the subspace H k of the space H. Let us denote Y = k j=1 y j . Notice that Y * Y = k j=1 x j x j , and Y Y * = I k -the identity matrix in K k .

Remark 3 Further, let's define matrix G k such that its ( j, l)-th entry is given by
Notice that in our notation Y * = |x 1 . . . x j . . . |x k . Notice that using our notation we have the following equality: Hence, operator A k can be decomposed as follows: As noticed above, the operator I − k j=1 x j x j is the projection on the space U k . Notice also that the operator A k is completely defined by the set x j k j=1 and the matrix G k . Matrix G k will be called an associated matrix of an operator A k . We will use simplified notation O( x j k j=1 , G k ) to denote the operator of the form (3.2) defined by the set x j k j=1 and the matrix G k . We have the following result. (2) k ), then their composition, i.e., of the operator O 1 ( x j k j=1 , G (1) k ) and of the operator O 2 ( x j k j=1 , G (2) k ), is of the same class and is equal to O 3 ( x j k j=1 , G (1) k G (2) k ). That is the composition operator has its associated matrix being equal to the product of the matrices G (1) k and G (2) k . Proof Is shifted to Sect. 4.

Theorem 4
Let us consider an operator O( x j k j=1 , G k ). The following statements are equivalent: a) The constants β j , α jl ∈ C, l, j = 1, . . . , k are selected in such a way that

associated with O (defined by Formula (3.3)) is unitary. If one of these conditions is satisfied, then the operator A k is unitary.
Proof Is shifted to Sect. 4.  ( γ 1 , . . . , γ k ) is the eigenvector of the matrix G k related to the eigenvalue λ. Then, Y * γ = k j=1 γ j x j is the eigenvector of the operator A k related to the eigenvalue λ.

Proof We have
In particular, for any n ≥ 1 and sets of orthonormal vectors { x j } n j=1 and n reals α j n j=1 such that α j ∈ (−π, π] the operator is unitary. Moreover, its first n eigenvectors are vectors x j , j = 1, . . . , n and eigenvalues are numbers e iα j .

Corollary 1 Let A k be the unitary operator defined by vectors x j
k j=1 given by Formula (3.2) with associated matrix G k according to (3.3). For any natural m, we have where the matrix G (m) k defined in the following way is the m-th power of the matrix G k defined by (3.3) or equivalently Proof Follows directly from Theorem 3 and Formula (3.4).

Corollary 2 Let
, G k ) be given by Formula (3.2) with the associated matrix G k according to (3.3

)and let us consider vector
In particular, where B k is a k × k matrix composed of eigenvectors of the matrix G k (i.e., for which we have B −1 k G k B k = k ) and k is a diagonal matrix with eigenvalues of G k on its diagonal.

Analysis of the generalization of the Grover's algorithm
Let us return to the generalization of the Grover's algorithm presented by Formula (3.1). As remarked above, it is a composition of two reflections. So to analyze it, we will make use of Theorem 3 in order to find the associated matrix of an operator AJ S . Let us select vector Y * to be (|U S , |E S )). So operator has associated matrix equal to (after some elementary algebra) while the operator has associated matrix given by (also after some elementary algebra) Theorem 5 Operator G = AJ S has the following associated matrix: (a) det(G S ) = −e iϕ , tr(G S ) = −2ie iϕ/2 (1 − 2α 2 sin 2 (ϕ/2)) and the characteristic polynomial of G S is given by (b) Consequently, we get two eigenvalues of the matrix G S λ 1 = −ie iϕ/2 e iθ , λ 2 = −ie iϕ/2 e −iθ . (3.8) where we denoted by θ(α, ϕ) ∈ [−π/2, 0] (or θ if it will be not confusing) the positive angle such that e iθ = (1 − 2α 2 sin 2 (ϕ/2)) + 2iα sin(ϕ/2) 1 − α 2 sin 2 (ϕ/2). (3.9) (c) Eigenversors of G S are the columns of the following matrix B = e iϕ/2 sin γ −e iϕ/2 cos γ cos γ sin γ . (3.10) where angle γ is defined by Proof Is shifted to Sect. 4.
As a corollary, we get the following expression for the result of k-iterations of the operator G acting on the overseer |1 .
One can simplify this expression further by noticing that and recalling definitions of the Chebyshev polynomials of the first and second kind, namely that: Thus, we could express Pr((G) k |1 = E S ) as a function of ϕ, α and k only, to study what is the smallest number of iterates k, to ensure, for a given α and ϕ, that this probability is, say, greater than .999. We could also construct tables of Pr((G) k |1 = E S ) for given ϕ, α and k. Since intention of this paper is to give a theoretical outlook for the Grover's algorithm, we will skip those calculations. We will make use of Chebyshev polynomials in the following subsection when we will apply the obtained formulae to the classical Grover's algorithm.

Remark 6
Notice that the properties of the matrix G S , essential in finding the desired properties of the output versor, depend only on parameters α and ϕ. Hence, we can treat the output of, say, k iterates of the operator A n as the input of the similar operation with the other oracle to refine the search. Just as described in the introductory section.

Analysis of the classical Grover's algorithm
Returning to the first section and the definition of the Grover's algorithm (see, e.g., [4] or [6]) we see that we deal with the classical case when ϕ = π. Then, notice that parameter b (defined by (3.11)) is equal to 1 which means that angle γ = π/4. More precisely in classical Grover's algorithm α was equal to 1/ √ n, where n is size of the database. We will extend the definition of the Grover's algorithm by assuming that α ∈ (0, 1 2 ]. In this subsection, we are going to derive known properties of the Grover's algorithm from the general considerations and formulae presented above.
Following considerations above, we see that the associated matrix G S of the operator where matrix G has a form: The eigenvalues of the matrix G S are (following (3.8)) and the related eigenvectors compose the following matrix B is equal to (by (3.10)) Although almost all the results of the following assertion can be derived directly from the results of the previous section, for the sake of clarity and importance we will present them in the form of the theorem.

16)
where T n and U n denote Chebyshev polynomials of the first and second type, respectively. Besides for small values of x for l ≥ 0 and k ∼ = π(2l+1) 4α − 1, we get Pr( k S |Y S = E S ) ∼ = 1. In the simplification of Formula (3.16), we have used the following well-known properties of Chebyshev polynomials: for n ≥ 0 and x ∈ R : Corollary 4 Now notice that to have the element of the set S to be 'chosen' for sure we have to have sin(kθ m,n + δ) = 1, that is kθ m,n + δ = lπ, (3.17) for some integers m, n, k and l. The simplest case is when k = 1 and l = 0. Then, this equation reduces to θ m,n = δ which leads to the equation The only positive solution of this equation is α = 1/2, which refers to the well-known property of the Grover's algorithm that if n/m = 4 then all 'chosen' elements can be chosen in one step. Thus, quantum computers can find all elements of the set consisting of the quarter of the population in one step! Of course the state collapse will produce only one state of the set S. However, the system is in E S after just one iteration.

Remark 7
We have ∀k ≥ 1 : F k ( √ 2 2 x) 2 = 1/2. In other words, the set of the size of half of the population can be identified by algorithm S only with probability 1/2. However, as it follows from the first part of the paper, we can obtain all 'chosen' elements in just one step, provided that the oracle marked chosen elements by the phase change π/2 not π as in the case of the classical Grover's algorithm.
Further, using Mathematica, we get F 1 ( for some vectors |x 1 and |x 2 . To get to know vectors |x 1 and |x 2 better, let us write and multiply these equations side by side getting: Hence, we see that Thus, we deduce that |x 1 and |x 2 are parallel. Consequently, let |x 1 x 2 | = γ |x 1 x 1 |. Besides, let us select |x 1 to be normalized, i.e., x 1 |x 1 = 1. Relationship (4.1) implies that |x 1 must be parallel to | y so since it is assumed to be a versor we must have |x 1 = | y . Now notice that y y S = α. Consequently, parameter γ must satisfy 1 = γ α, (4.2) or γ = 1/α. Further, we have Consequently, the following system of two equations must be satisfied: From the first one, we get from which it follows that the smallest α 2 , for which we can get equality (4.1) is 1/4 and that it can happen only when ϕ = π. Notice also that if ϕ = 2 arcsin 1 2α , then not only the first (i.e., (4.3)) but also the second equation (i.e., (4.4)) is satisfied. So the operator in question is given by the following formula: Secondly, notice that This formula can be nicely transformed to if α = 1/ √ 2, then ϕ = π/2 and we have:

Proof of Theorem 3
We will use the form (3.4). We have x j x j + Y * G (1) k G (2) k Y .

Proof of Theorem 4 By Theorem 3, we know that given two operators
k ), whose associated matrices satisfy G (1) k G (2) we deduce that the composition of these two operators is equal to x j x j | + k j=1 x j x j | = I.

Proof of Theorem
for the eigenvectors. Now, it is a matter of little algebra to normalize them and to form matrix B out of coefficients of the so obtained versors.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.