Constructive quantum scaling of unitary matrices

In this work, we present a method of decomposition of arbitrary unitary matrix U∈U(2k)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$U\in \mathbf {U}(2^k)$$\end{document} into a product of single-qubit negator and controlled-NOT\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\sqrt{\text{ NOT }}$$\end{document} gates. Since the product results with negator matrix, which can be treated as complex analogue of bistochastic matrix, our method can be seen as complex analogue of Sinkhorn–Knopp algorithm, where diagonal matrices are replaced by adding and removing an one-qubit ancilla. The decomposition can be found constructively, and resulting circuit consists of O(4k)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$O(4^k)$$\end{document} entangling gates, which is proved to be optimal. An example of such transformation is presented.


Introduction
Scaling a real matrix O with non-negative entries means finding diagonal matrices D 1 , D 2 such that B = D 1 O D 2 is bistochastic. Sinkhorn theorem presents a necessary and sufficient condition for existence of the decomposition of a matrix. Moreover, the iterative Sinkhorn-Knopp algorithm finds the bistochastic matrix B [1]. Such decomposition can be used for ranking web pages [2], preconditioning sparse matrices [3] and understanding traffic circulation [4].
Since unitary matrices are complex analogue of orthogonal matrices, it is natural to ask whether there exist a counterpart of Sinkhorn theorem for them. De Vos and De Baerdemacker considered whether it is possible, that for arbitrary unitary matrix U ∈ U(n), there exist two unitary diagonal matrices U 1 , U 2 such, that matrix U 1 UU 2 has all lines sums equal to 1. Such decomposition exists for arbitrary unitary matrix, and an algorithm for finding it approximately was presented [5]. Matrices called negators were treated as quantum counterpart of bistochastic matrices and form a group XU(n) under multiplication. Idel and Wolf propose an application of the quantum scaling in quantum optics [6].
Algorithm converges for arbitrary unitary matrix U [7]. Similar decomposition of unitary matrices U ∈ U(2m) called bZbXbZ decomposition was presented [8]. They show that there always exist matrices A, B, C, D ∈ U(m) such that where I is identity matrix. Matrix in the middle is a block-negator matrix (which is also a negator matrix), while left and right matrices are block diagonal matrices. In [9], an algorithm of finding such decomposition was presented.
Group XU(2 n ) is isomorphic to U(2 n − 1) and can be generated by single-qubit negator and controlled-√ NOT gates [10]. However, the proof is non-constructive since a decomposition designed for generating random matrices was used [11]. Although it is proved that it exists for any unitary matrix, obtaining such a decomposition is a very complex task. Therefore, another approach is needed for efficient decomposition procedure.
In this article, using similar method presented by de Vos and de Baerdemacker [10], we demonstrate an implementation of arbitrary k-qubit unitary operation using onequbit ancilla with controlled-√ NOT and single-qubit negator gates. Since product of these basic negator gates is still a negator matrix, our result can be seen as quantum analogue of scaling matrix. More precisely, we prove that for arbitrary matrix U ∈ U(2 k ), which is performed on system H, there exist a negator N ∈ XU(2 k+1 ) such that for arbitrary state |ψ ∈ H, we have U |ψ = (N (|ψ )). ( Here, denotes the operation of extending the system with an ancilla register in |− state and denotes partial trace over the ancilla system. Since after performing operations and N the state is of the form |− ⊗ U |ψ , the partial trace is simply removing the ancilla system giving a pure state U |ψ . We describe an efficient algorithm that for given U returns explicit and exact form of N with decomposition into a sequence of single-qubit negator and controlled-√ NOT gates only in contrast to results of de Vos and de Baerdemacker [9,10].
In Sect. 2, we recall basic facts. In Sect. 3, we show how to perform such transformation efficiently and demonstrate the cost in terms of controlled-√ NOT gates. To illustrate the transformation method, a transformation of Grover's search algorithm is presented step by step in Sect. 4.

Basic facts
Negator gates of dimension 2 were introduced by de Vos and de Baerdemacker [10] as unitary matrices N ∈ U(2) which are also a convex combination of identity matrix and NOT gate. Simple calculation shows that they are of the form where θ ∈ [0, 2π). Negators form a subgroup of single-qubit unitary operations, i.e., for any values of φ and ψ. In the following, we will also use a 2-qubit negator operation controlled- As these gates are used as basic operators, we will use a simplified notation in circuit, respectively θ and • √ .
These two kinds of unitary matrices will be called NCN gates (Negators-Controlled-Negator). In Sect. 3, decomposition of single-qubit unitary gates will be needed. Every unitary matrix U ∈ U(2) can be presented as a product of global phase, two z-rotators and one y-rotator [12] Since global phase is not measurable, we can simplify this representation without loss of information where ' ∼ =' means equality up to a global phase. The same applies in the case of global phase change on one of the registers of a bigger system Using these two facts, we can say that in any situation, we can ignore global phase change on any register. While it may lead to a conclusion that our transformation is mainly applied to group SU(n), we decided to stay with the unitary matrices formalism, since negator gates are not special unitary matrices. The result may be written using the special matrices; however, then the negators gates column and row sums will equal e iθ in general.

Circuit transformation method
In this section, we provide complete description of the transformation method. We recall a sketch of a proof of universality theorem between quantum gates and negator gates from the work of de Vos and de Baerdemacker [10]. Next, we present transformation method of arbitrary single-qubit gate into NCN product. Then, we provide a method of decomposition for arbitrary k-qubit circuit, based on the single-qubit case. Finally, we analyze the cost of presented transformation.

Universality theorem
De Vos and de Baerdemacker proved a universality theorem: Group XU(2 k ) generated by negators and controlled-√ NOT is isomorphic to U(2 k − 1) [10]. The proof consists of several steps: 1. Every matrix U ∈ U(2 k − 1) can be decomposed into a product of m gates U 1 U 2 · · · U m , where matrices U i ∈ U(2 k − 1) are of some special forms [11]. 2. Group U(2 k − 1) is isomorphic to group because of the isomorphism h : 3. Function f : Decomposition of every f (h(U i )) into a product of NCN gates is possible, where U i comes from point 1.
The proof used the decomposition presented in the work of Poźniak et al. [11], because it is proven that the decomposition exists for any unitary matrix. However, obtaining such decomposition is a very complex task. Therefore, we need to choose a different decomposition in order to find an efficient decomposition procedure. Obviously, group U(2 k ) is isomorphic to some subgroup of XU(2 k+1 ). In other words, with ancilla (one additional qubit), every unitary matrix can be replaced with a sequence of NCN gates. For our purpose, we choose function g : U(2 k ) → XU(2 k+1 ) (8) Using the function g, every gate U changes into controlled-U . Using circuit notation, we can present this fact as Note that if we assume that the first qubit is set to |− , the control qubit does not influence the result (the condition is always 'true').

Single-qubit gate transformation
Now, we aim at decomposition of arbitrary single-qubit gate into NCN gates. With Eq. (4) for any (U ∈ U(2)), there exist real parameters α, β, γ such that Therefore, after applying function g, we have We change the rotators with neighboring Hadamard gates into NCN gates as shown in Fig. 1 H Let us note that the symbols of controlled-NOT, controlled-√ NOT † and controllednegator used in the decomposed circuit do not mean that these gates cannot be transformed. We use these symbols as a simplified notation for its decomposition with use of controlled-√ NOT gates as shown in Fig. 2.

General transformation method
Now, we consider transformation of arbitrary k-qubit circuit. Let us assume that we have a circuit which consists of unitary operation (U ∈ U(2 k )), generalized measurement M = {M a ∈ L(C 2 k ) : a ∈ }, where is a set of classical outputs of measurement, and starting state |φ 0  Fig. 2 Decomposition of controlled-NOT, controlled-√ NOT † gates and controlled-negator [10] In order to construct a decomposition of unitary U into a sequence of negator gates, we begin with obtaining a decomposition of U into controlled-NOT and single-qubit gates here denoted by a sequence of gates U = V m · · · V 1 . Contrary to the decomposition presented in the work of Poźniak,Życzkowski and Kuś, there exist efficient methods for constructing such circuit [13]. Next, we need to add an additional qubit, transform V i gates into controlled-V i gates and add Hadamard gates as below (since H H = I ) Let us note that product H ·controlled-V j · H is an image of homomorphism presented in Eq. (8) on V j . Next, we replace the product with the sequence of NCN gates (here denoted by N j ) as in previous subsection (if V j is controlled-NOT, then we choose Toffoli gate transformation from Fig. 1) For the sake of simplicity, we may change the starting state and resulting state on the first wire Now, we have an equivalent circuit which consists of negators and controlled-√ NOT gates only.

Transformation cost
Now, we consider upper bound of cost of decomposition into negator circuit. Two kinds will be discussed: memory complexity and number of single-and two-qubit gates. In the first case for arbitrary k-qubit circuit transformation requires one additional qubit. Let c CNOT (k) and c s (k) denote upper bound of the number of, respectively, controlled-NOT and single-qubit gates needed for the implementation of an arbitrary k-qubit circuit. Using the operation presented above, we need 17c CNOT (k) + 64c s (k) controlled-√ NOT gates and 11c CNOT (k) + 34c s (k) negators to implement an equivalent circuit (up to global phase).
Any circuit which consists of controlled-NOT and single-qubit gates can be simplified in such a way that c s (k) ≤ 2c CNOT (k) + k. This estimation is based on the worst case, when there are two single-qubit gates between every controlled-NOT gate. Taking this into account, we can express the previous result in terms of c CNOT only, because only 17c CNOT (k) + 64c s (k) ≤ 145c CNOT (k) + 64k controlled-√ NOT gates are needed. In fact, if c CNOT = O(4 k ), then so is the number of controlled-√ NOT gates.

Step-by-step transformation example
To illustrate the introduced decomposition, we will present Grover's algorithm for k = 2 qubits as NCN circuit. The original circuit for this algorithm is presented in Fig. 3, where ω denotes the searched state.
As in the previous section, we will add one qubit, change every H and G gate into controlled-H and controlled-G, respectively, and add Hadamard gates on the ancilla register. Former steps of the decomposition are explicitly presented in Fig. 4. The following facts were used G is Grover diffusion operator, U ω is quantum black box and we perform measurement M. Algorithm comes from [14] • • the decomposition of Hadamard gate is H ∼ = R z (π )R y ( π 2 )R z (0) = R z (π )R y ( π 2 ), • the decomposition of NOT gate is NOT ∼ = R z (π )R y (π )R z (0) = R z (π )R y (π ), • for any (U, V ∈ U(2)), we have • Grover's diffusion operator can be decomposed in the following way Decomposition of U ω depends strictly on the value of ω; therefore, it is not presented in the example. The full decomposition is presented in Fig. 4.

Concluding remarks
In the presented work, we provide a constructive method of scaling arbitrary unitary matrices U ∈ U(2 k ). More precisely, we proved that for arbitrary unitary matrix U ∈ U(2 k ), there exists unitary negator matrix N ∈ XU(2 k+1 ) such that for arbitrary state |ψ , we have U |ψ = (N (|ψ )).
Here, denotes the operation of extending the system with an ancilla register in |− state and denotes partial trace over the ancilla system. We described efficient algorithm of decomposing N into product of single-qubit negator and controlled-√ NOT gates. Our decomposition consists of O(4 k ) entangling gates which is proved to be optimal and needs one-qubit ancilla.
Our result can be seen as complex analogue of Sinkhorn-Knopp algorithm, which is known to have wide applications. The result is in contrast to the previous results [10], which could be only used to prove the existence of such decomposition. Moreover, our transformation is exact and can be found constructively. In contrast to [9], our transformation consists only of negator gates. The main difference is that transformation needs one-qubit ancilla.