The multi-level and multi-dimensional quantum wavelet packet transforms

The classical wavelet packet transform has been widely applied in the information processing field. It implies that the quantum wavelet packet transform (QWPT) can play an important role in quantum information processing. In this paper, we design quantum circuits of a generalized tensor product (GTP) and a perfect shuffle permutation (PSP). Next, we propose multi-level and multi-dimensional (1D, 2D and 3D) QWPTs, including a Haar QWPT (HQWPT), a D4 QWPT (DQWPT) based on the periodization extension and their inverse transforms for the first time, and prove the correctness based on the GTP and PSP. Furthermore, we analyze the quantum costs and the time complexities of our proposed QWPTs and obtain precise results. The time complexities of HQWPTs is at most 6 on 2n elements, which illustrates high-efficiency of the proposed QWPTs. Simulation experiments demonstrate that the proposed QWPTs are correct and effective.

With the rapid development in the fields of optical imaging, Internet technology, high performance calculation etc., the amount of data is increasing explosively, so that it is necessary to find new ways to store and process information. Quantum information processing (QIP) 1 as new technology of information processing, offers a potential solution to store and process massive visual data efficiently. QIP has two outstanding merits: (1) the unique computing performance of quantum coherence, entanglement and superposition [1], and (2) quantum storage capacity increasing exponentially. Models of quantum image representation [2][3][4][5][6][7][8] have displayed the enormous storage capacity of QIP. Other popular quantum algorithms, such as the Shor's discrete logarithms and integer-factoring algorithms 9 , the Deutsch's parallel computing algorithm 10 and the Grover's quadratic speed up algorithm 11 , have further shown that QIP is more efficient than its classical counterparts. In addition, many algorithms of QIP emerge continually, and these algorithms include quantum geometric transformation [12][13][14] , quantum image encryption and decryption algorithms 15,16 , quantum watermarking 17 , quantum image compression 6 , quantum edge detection 18 , and quantum image filtering 19 .
The classical wavelet packet transform (WPT) has been widely spread to the information processing field for image coding 20 , pattern matching 21 and fractional brownian motion decorrelation 22 . It indicates that the quantum wavelet packet transform (QWPT) plays an important role in QIP. Unfortunately, the research on QWPT is rare and still preliminary. For example, two important QWPTs, namely the Haar QWPT (HQWPT) and the D4 QWPT (DQWPT) proposed in [23][24][25][26] , are still single level quantum wavelet transforms. Up to now, we have not yet found any implementation of a multi-level and multi-dimensional QWPT. Therefore, we believe that QWPTs deserve further research.
In this paper, we introduce the generalized tensor product (GTP) and the perfect shuffle permutation (PSP), and design quantum circuits for them. Then, we propose the iterations and implementation circuits of the multi-level and multi-dimensional QWPT and inverse QWPT (IQWPT). QWPTs and the inverse QWPTs being considered include HQWPT, DQWPT based on a periodization extension, the inverse HQWPT (IHQWPT), the inverse DQWPT (IDQWPT). In addition, we analyze the quantum costs and time complexities of the proposed circuits and prove that the multi-level and multi-dimensional HQWPT can be implemented with a complexity of O (1). Simulation experiments demonstrate that the proposed QWPTs are correct and effective.
The contributions of this paper are listed as follows.
• We analyze precisely the complexities of the simulated networks of controlled NOT gates with multi-control qubits. Comparing with the methods proposed in the reference 27 , our proposed simulated networks are reduced by 50% approximately. • We design the simplified circuits of the PSP and reduce time complexity to 6 for 2 n elements.
• We present the multi-level and multi-dimensional QWPTs, including HQWPT, IHQWPT, DQWPT and IDQPT for the first time, and prove the correctness by theoretical derivations and simulation experiments. • We design the circuits of the multi-level and multi-dimensional HQWPT with the complexity O (1), which has the overwhelming advantage over the classic Haar WPT.

The Quantum Implementation of GTP
Let A be an n × n matrix and B be an m × m matrix, then the tensor product ⊗ A B is an mn × mn block matrix in the following equation, Thus, the tensor product of quantum states are defined as the tensor product of matrices: , which is also written simply as u v or uv . Then, n fold tensor product ⊗ ⊗ ⊗  U U U is abbreviated as ⊗ U n . Similarly, the abbreviation of ⊗ ⊗ ⊗  u u u is ⊗ u n . A larger vector space can be formed by putting vector spaces together. For instance, suppose that i is a basic state in a 2 n dimensional Hilbert space for i = 0, 1, …, 2 n − 1, the state i consists of the tensor products of the n computation basis states: n n n n n n 1 There are some base gates and their corresponding symbols shown in Fig. 1. In the figure, the identity (I 2 ), Hadamard (H), Pauli-X (X) and Swap gates are well-known and can be found in the reference 28 . The 2 n × 2 n identity matrix = ⊗ I I ( ) n 2 2 n denotes the circuit of n qubits. V and V + are two specific examples of U gates where U corresponds to a unitary matrix and A controlled gate is one of the most useful gates in quantum computing, and we define two controlled gates of (n + m)-qubits.   gates shown in Fig. 3 are called controlled-NOT gates. A Swap gate can be simulated by three N 2 1 gates, that is, Next, we introduce a perfect shuffle permutation. Let P n,m be the mn × mn matrix of a perfect shuffle permutation, then P n,m satisfies that (P n,m ) k,l = δ v,z′ δ z,v′ where k = vn + z, l = v′m + z′, 0 ≤ v, z′ < m, 0 ≤ v′, z < n, δ x,y is the Kronecker delta function, that is, δ x,y = 0 if x ≠ y, otherwise δ x,y = 1. Therefore, P n,m shuffles n packs of m cards into m packs of n cards.
As a useful tool for wavelet transforms, the GTP is defined as follows 29 .
are two sets of matrices, where A i is an n × n matrix, 0 ≤ i < m, and B j is an m × m matrix, 0 ≤ j < n. Then, the generalized tensor product = ⊗ C A B is an mn × mn matrix and can be calculated by m n n m , , Let  and  be two sets of matrices containing m matrices with size n × n,  and  be two sets of matrices containing n matrices with size m × m, and I m and I n be m × m and n × n identity matrices, respectively. Then, the following equation holds 24 : Furthermore, calculating by the definition of a GTP, we can implement the following four GTPs using controlled gates:

The Complexity Analysis of Quantum Circuits
The complexity analysis of quantsssum circuits. Since a quantum circuit can be simulated by basic operations referring to single-qubit gates, controlled-NOT gates, controlled-V and controlled-V + gates 12,27,28,30 , we introduce some definitions and lemmas. Furthermore, ⌊⌋ and ⌈⌉ are the symbols of round down and round up respectively, which are used in the following definitions and lemmas.

Definition 5.
The quantum cost of a quantum circuit can be regarded as the total number of basic operations which simulate the circuit, marked by C().  More details of Lemmas 2, 3 and 4 are described in the reference 27 . Next, we derive the following corollaries. Proof. Applying Lemma 2, an N n m gate can be simulated by two N n r gates and two

Definition 6. The time complexity of a quantum circuit is defined by the total number of time steps. In a time step, only one basic operation is executed serially, but multiple ones can be performed in parallel. It is marked by
, we apply lemma 1 so that the corollary holds.  Corollary 2. For any n ≥ 6 and = ⌊ ⌋ r n/2 , an + N n r 1 gate can be simulated by (4r − 2) Toffoli gates and two basic operations when n is even, and 4(r − 1) Toffoli gates when n is odd.
Proof. When n is odd, + = ⌈ ⌉ r n 1 /2 . Then, applying Lemma 3, we have that an + N n r 1 gate can be simulated by a network consisting of 4(r − 1) Toffoli gates.
When n is even, by applying Lemma 2, it is derived that an + N n r 1 gate can be simulated by two N n r gates and two Toffoli gates. Then, by applying Lemma 1, it is proved that one can use (4r − 2) Toffoli gates and two basic operations to simulate the + N n r 1 gate.  From lemma 4, the following corollary holds.
can be simulated by networks of the form shown in Fig. 7.
Then, we have that Similarly, can be simulated by networks of the form shown in Fig. 8.
can be simulated by five basic operations shown in Fig. 9, i.e., . Therefore, the complexity of Toffoli gates is 5. Thus, we obtain the complexity of − C X ( )  By lemma 5 and lemma 6,  where = ⌊ ⌋ r n/2 and N 3 2 is a Toffoli gate. Applying lemma 1, corollary 1 and corollary 2, we obtain Similarly, we obtain that =

The Quantum Circuits of PSP
The perfect shuffle permutation − P 2 ,2 n 1 and − P 2,2 n 1 can be expressed as where P 2,2 is a Swap gate, and their implementation circuits are shown in Fig. 10. Applying − P 2 ,2 n 1 and − P 2,2 n 1 to the state −  j j j j n n 1  and design quantum circuits shown in Fig. 11. The costs of the circuits of Γ 2 n and Γ − ( ) By parallel computing, we redesign the circuits of Γ 2 n and Γ − ( ) 2 1 n shown in Fig. 12 and calculate time complexities by Therefore, we design the simplified circuits of − P 2 ,2 n 1 and − P 2,2 n 1 as shown in Fig. 13. The complexities of − P 2 ,2 n 1 and − P 2,2 n 1 are The reason that the abbreviation notations in Fig. 13 are the same except for the positions of black boxes is due to the fact that the circuit in Fig. 13(b) consists of the gates in Fig. 13(a) but rearranged in reverse order. We also adopt similar abbreviation notations to denote the circuits that are composed of the same quantum gates with reverse order in the following sections.
The iterations of − P 2 ,2 n m 1 and − P 2 ,2 m n 1 are given by According to (30), we design the implementation circuits of The Implementation of QWPT n n be a wavelet kernel matrix. Then, the (k + 1)-th iteration of a discrete wavelet packet transform is defined by n j n j n j is a matrix with 2 j blocks of − W 2 n j on the main diagonal and zeros elsewhere.
The following equations can be derived by (32). Since   The quantum circuits of − R n 2 1 n and R k 2 n (1 ≤ k < n − 1) are designed in Fig. 16. can be designed as shown in Fig. 18. The costs of HQWPT are  The implementation of DQWPT. The kernel matrix of the D4 wavelet transform is defined by the  and the implementation circuits shown in Fig. 19.
In order to implement a multi-level DQWPT based on the periodization extension, a single-level DQWPT and its inverse are given by: The implement circuits of the above DQWPT are shown in Fig. 20. Substituting the kernel matrix W 2 n with T 2 n in (35) and (36), we obtain that the (k + 1)-th iterations of the DQWPT and its inverse based on the periodization extension are , 1 ≤ k < n − 1 and their implementation circuits shown in Fig. 21.
Using Γ 2 n, the quantum circuit of A k 2 n and − A ( ) k 2 1 n can be simplified and shown in Fig. 22. We analyze the complexity of the above DQWPT and suppose = ⌊ ⌋ r n/2 . From Figs 19 and 20, we calculate the complexity of T 2 n by

The 2D and 3D QWPTs
Firstly, we briefly describe NASS to represent 2D images and 3D videos. The NASS state ψ | 〉 2 of an image can be represented by x y x y m k 2 0  Meanwhile, the priori knowledge 'x 3 , y 2 ' or 'x 2 , y 1 , t 2 ' is equivalent to a data type, implying an image or a video stored in the state ψ | 〉. A natural image with size of 2 n × 2 m can be expressed as an angle matrix where θ x,y is the color information of the pixel on the coordinate (x, y) and an example is shown in Fig. 23. Thus, the 2D wavelet transform on Λ 2 ,2 n m is defined as where W 2 n and W 2 m are 2 n × 2 n and 2 m × 2 m wavelet transforms, respectively An image can be stored in the state NASS ψ | 〉 2 in (50) by using a quantum circuit in the literature 6 . Suppose that the function ⋅ f ( ) is equivalent to the quantum circuit implementing the storage of the image Λ 2 ,2 n m, that is,  Using the perfect shuffle permutation P 2 ,2 m n, we obtain   Then, the 2D QWPT of Λ 2 ,2 n m is given by A video of 2 p frames of size 2 n × 2 m corresponds to the following angle matrix. n m is the k-th frame. We firstly define the following DWPTs:

Simulation Experiments
In the absence of a quantum computer to implement our proposed QWPTs, experiments of quantum signals are simulated on a classical computer. The quantum signals are stored in quantum states (i.e., column vectors) and the QWPTs are implemented using unitary matrices in Matlab (the R2010bversion). . For simply, we can take a vector  can be regarded as a column vector, where the function ⋅ f ( ) is defined in equation (67). Applying the k + 1 level 3D HQWPT and DQWPT on the video V t , respectively, the results are  where ⋅ − f ( ) 1 converts a column vector into a 3-dimension matrix. The simulation results are shown in Fig. 28 and Table 3. Since there are no functions of the 3D WPT, we realize wt3 in (66) using the functions wpdec2() and wpdec() and note V k 5 and V k 6 as results of 3D HWPT and DWPT, respectively. The rest symbols in Table 2 are  Table 3. The simulation results of the 3D HQWT, IHQWT and HWT.