# A Quantum Image Watermarking Scheme Based on Quantum Hilbert Scrambling and Steganography about the Moiré Fringe

Authors: Jian-Wei Jiang; Tian Zhang; Wei Li; Shu-Mei Wang
Journal: Quantum Engineering
 (2023)

---

## Abstract

In order to boost the security and confidentiality of information in quantum images, on the foundation of the NEQR model, a novel quantum watermarking scheme combining quantum Hilbert scrambling with steganography based on the Moiré fringe is designed in this paper. First of all, for carrier image, and watermark image, the color information and position information are denoted, respectively, by the NEQR model. Next, the watermark image is converted to a disordered image by quantum Hilbert scrambling, and the message of the original watermark image cannot be gained from the disordered image. At last, the watermark image after scrambling is embedded into the carrier image through the steganography of the Moiré fringe, obtaining the watermarked image. Due to the unitary image of the quantum gate, quantum Hilbert inverse scrambling is the opposite process of quantum Hilbert scrambling. In addition, the watermark image can be completely extracted from the watermarked image. What’s more, the experimental simulation and performance analysis of the scheme are done. The experimental simulation proves the feasibility of this algorithm. Visually, there is no difference between the carrier image and the watermarked image. The PSNR between the watermarked image and the carrier image is measured, which quantitatively shows the high similarity. In addition, the time complexity of the quantum circuit is lower than some other quantum image watermarking schemes, which proves the simplicity of this scheme.


---

## Body

## 1. Introduction

As one of the main carriers of information transmission in modern society, images play a very important role in education, finance, and other fields. At present, protecting the security of image information is one of the research hotspots at home and abroad. The methods of protecting the secret image of an image are roughly divided into two categories: image watermarking [1–5] and image encryption [6–9]. Image watermarking is to embed the pixel data of the watermark image into the carrier image in a certain way, and there is no visual difference between the carrier image and the watermarked image, thus achieving the effect of hiding the watermark image. The essence of the image encryption is to change the value and position of the pixels in a certain method, and the message of the original image cannot be obtained in the encrypted image.Quantum computing and quantum information have grown rapidly in recent years, guiding new directions for the development of many fields [10–13]. Of course, quantum computing has laid a solid foundation for the rise of quantum imaging. The principle of quantum imaging is to express the image with quantum state, thus bringing a new development direction for the field of image processing. As a result of some inherent characteristics of quantum computing, such as parallelism and entanglement, quantum image processing and performance will be incomparable with classical images. The main advantages of quantum images compared with classical images lie in fast computing speed, high security, and small storage space. After the quantum computer is produced in the future, quantum images can greatly improve people’s production and life. Furthermore, the classical algorithm of image steganography has developed to a mature stage, while the related content of quantum image steganography is very little. In the future, so as to protect greatly the security and confidentiality of information in quantum images, it will be necessary to develop quantum image steganography. First and foremost, we must understand how to store and express images in quantum computer. For the representation of quantum images, domestic and foreign scholars have proposed several methods: Real Ket [14], Qubit Lattice [15], FRQI [16], NEQR [17], MCQI [18, 19], and so on. Among them, the first four are applicable to grayscale images. In the MCQI model, the gray information of the RGB three channels of color image is represented by three entangled quantum states, respectively, extending the expression of grey images to color images. Among the above representation methods of the quantum image, the NEQR is the only one model in which the ground state of qubits is used to express the pixel value, while the probability amplitude of ground state is used to represent the pixel value in other models. Compared with other representation models, the NEQR has the advantage that it will not have the negative effect stem from the collapse of the quantum state during the measurement procedure. It is the most widely used representation model of quantum image now.Nowadays, the steganography of quantum image is primarily based on frequency domain and spatial domain. The principle of the steganography based on frequency domain is to superimpose the watermark image’s information on the frequency domain of carrier image, including quantum Fourier transform (QFT) [20, 21], and quantum wavelet transform (QWT) [22–25]. In 2013, Zhang et al. presented a steganography of quantum images on the foundation of the quantum Fourier transform. Firstly, the carrier image was processed by the quantum Fourier transform, and the watermark image’s message was superimposed on the Fourier coefficients of the carrier image to achieve embedding process. There is no visual distinction between the watermarked image with the carrier image [26]. In 2019, on the basis of the FRQI model, Hu et al. put forward a quantum image steganography on the foundation of the Haar wavelet transform. The image is decomposed by the Haar wavelet transform. And the carrier image is decomposed to obtain its diagonal coefficient, and the diagonal coefficient changes in the light of the information of watermark image, thus realizing the embedding process in the watermark image [27]. The representative algorithms of quantum image steganography based on the spatial domain include the least significant bit algorithm (LSB) [28–31] and the steganography on the basis of the Moiré fringe [32], which embed the message of the watermark image into the carrier image by changing the pixel value of the carrier image. In 2015, on the basis of NEQR, Jiang et al. designed a steganography of quantum images on the foundation of the Moiré fringes and quantum circuits. The processes of embedding and extraction in moiré gratings are achieved by quantum circuits [33]. In 2017, Heidari combined LSB with Gray code and hid two information qubits into the three lowest qubits in the color image by using Gray code, thus completing the embedding process of the watermark image [34].On the foundation of the NEQR, a novel quantum image steganography combining quantum Hilbert scrambling [35] with information hiding about Moiré fringe is designed in this paper. The context of the article is as follows. The second part introduces the principle of NEQR, quantum Hilbert scrambling, and information hiding about the Moiré fringe. The third part introduces the specific operation process of the algorithm. The simulation experiment and performance analysis of the scheme are introduced in the fourth part. The conclusion is put at the end.


## 2. Related Work

### 2.1. NEQR

The NEQR model divides the representation of a quantum image into two sections, including the color information and the position information, and they are expressed by a quantum state, respectively. Therefore, the representation of the whole quantum image is the superposition of two quantum states. With regard to a quantum image of size2n×2n and pixel value range 0,2q−1, the color information needs to be represented by q qubits, while the representation of position information requires 2n qubits. Thus, the expression of the entire quantum image is as follows:(1)P=12n∑Y=02n−1∑X=02n−1CX,YXY=12n∑Y=02n−1∑X=02n−1⊗i=0q−1⊗j=0n−1φXYiXjYj,CX,Y=φXY0φXY1⋯φXYq−1φXYi∈0,1i=0,1,2,⋯,q−1,X=Xn−1Xn−2⋯X1Y=Yn−1Yn−2⋯Y1Xj,Yj∈0,1,where, CX,Y represent the color information and XY represent the position information.


### 2.2. Quantum Hilbert Scrambling

In 1870, the Hilbert curve was proposed by G. Peano, which was a special curve that could traverse all points in a set. Using the Hilbert curve for image pixel scrambling can achieve a good scrambling effect, and Hilbert scrambling comes from this. Applying Hilbert scrambling to a matrixMn with size of 2n×2n can get scrambled matrix Fn. If the elements in Fn are connected in the order before scrambling, the Hilbert curve can be found. Figure 1 is the corresponding Hilbert curve when n takes value from 3 to 5.Figure 1
The Hilbert curve.The generation of the Hilbert matrix could be completed through step-by-step iteration. The generation iteration formula of the Hilbert matrix is as follows:(2)Fn+1=FnFn+4nInTFn+3×4nInppFn+2×4nInT,nisodd,FnFn+3×4nInppFn+4nInTFn+2×4nInT,niseven,where F1=1243, In=11⋯11⋱1⋮⋱⋮11⋯1. If Mn is a matrix of size n×n, then MnT is the transposed matrix of Mn, and Mnpp is obtained by rotating 180o around the center of Mn.It can be known from the iterative formula generated by the Hilbert matrix that the Hilbert matrix starts from the initial matrixF1 and alternately iterates according to whether n is odd or even. Therefore, the generation algorithm of the Hilbert matrix is divided into three parts: initialization, iterative process when n is odd, and iterative process when n is even. The generation iterative formula of the Hilbert matrix as the basis is used to rearrange all pixels of the watermark image in the algorithm of quantum Hilbert scrambling. When rearranging, the watermark image is split into subimages with a size of 2t×2t,t∈1,n, and all image subblocks are rearranged according to the iterative principle of the Hilbert generating matrix. In the whole quantum image scrambling process, t gradually increases from 1 to n; that is, the size of the image block increases with the raising of t, so the arrangement process of pixel points is divided into n times.


### 2.3. The Steganography of Quantum Image Based on Moiré Fringe

The steganography based on Moiré fringe comes from the Moiré effect. The Moiré effect is a special optical phenomenon that emerges when two dots or fringes with periodic characteristics are superimposed on each other. It is found that a new pattern will be generated when the two patterns are superimposed on each other under certain conditions. Based on the principle of the above phenomenon, a scheme for the steganography of images based on Moiré fringe is proposed.The algorithm of the steganography of the quantum image based on Moiré fringe can be split into three parts, including the embedding process, the denoising process, and the extraction process [31]. The embedding process is to embed the watermark image into the carrier image; the obtained carrier image after the embedding process can be called a prewatermarked image. If the watermark image is directly extracted from the prewatermarked image, the extracted watermark image contains much noise. The function of the denoising process is to remove the noise from the prewatermarked image in order to make sure that the extracted watermark image has no noise. The denoising process can be said to be the optimization process of a watermark image’s embedding process. The final step is the extraction process.


## 2.1. NEQR

The NEQR model divides the representation of a quantum image into two sections, including the color information and the position information, and they are expressed by a quantum state, respectively. Therefore, the representation of the whole quantum image is the superposition of two quantum states. With regard to a quantum image of size2n×2n and pixel value range 0,2q−1, the color information needs to be represented by q qubits, while the representation of position information requires 2n qubits. Thus, the expression of the entire quantum image is as follows:(1)P=12n∑Y=02n−1∑X=02n−1CX,YXY=12n∑Y=02n−1∑X=02n−1⊗i=0q−1⊗j=0n−1φXYiXjYj,CX,Y=φXY0φXY1⋯φXYq−1φXYi∈0,1i=0,1,2,⋯,q−1,X=Xn−1Xn−2⋯X1Y=Yn−1Yn−2⋯Y1Xj,Yj∈0,1,where, CX,Y represent the color information and XY represent the position information.


## 2.2. Quantum Hilbert Scrambling

In 1870, the Hilbert curve was proposed by G. Peano, which was a special curve that could traverse all points in a set. Using the Hilbert curve for image pixel scrambling can achieve a good scrambling effect, and Hilbert scrambling comes from this. Applying Hilbert scrambling to a matrixMn with size of 2n×2n can get scrambled matrix Fn. If the elements in Fn are connected in the order before scrambling, the Hilbert curve can be found. Figure 1 is the corresponding Hilbert curve when n takes value from 3 to 5.Figure 1
The Hilbert curve.The generation of the Hilbert matrix could be completed through step-by-step iteration. The generation iteration formula of the Hilbert matrix is as follows:(2)Fn+1=FnFn+4nInTFn+3×4nInppFn+2×4nInT,nisodd,FnFn+3×4nInppFn+4nInTFn+2×4nInT,niseven,where F1=1243, In=11⋯11⋱1⋮⋱⋮11⋯1. If Mn is a matrix of size n×n, then MnT is the transposed matrix of Mn, and Mnpp is obtained by rotating 180o around the center of Mn.It can be known from the iterative formula generated by the Hilbert matrix that the Hilbert matrix starts from the initial matrixF1 and alternately iterates according to whether n is odd or even. Therefore, the generation algorithm of the Hilbert matrix is divided into three parts: initialization, iterative process when n is odd, and iterative process when n is even. The generation iterative formula of the Hilbert matrix as the basis is used to rearrange all pixels of the watermark image in the algorithm of quantum Hilbert scrambling. When rearranging, the watermark image is split into subimages with a size of 2t×2t,t∈1,n, and all image subblocks are rearranged according to the iterative principle of the Hilbert generating matrix. In the whole quantum image scrambling process, t gradually increases from 1 to n; that is, the size of the image block increases with the raising of t, so the arrangement process of pixel points is divided into n times.


## 2.3. The Steganography of Quantum Image Based on Moiré Fringe

The steganography based on Moiré fringe comes from the Moiré effect. The Moiré effect is a special optical phenomenon that emerges when two dots or fringes with periodic characteristics are superimposed on each other. It is found that a new pattern will be generated when the two patterns are superimposed on each other under certain conditions. Based on the principle of the above phenomenon, a scheme for the steganography of images based on Moiré fringe is proposed.The algorithm of the steganography of the quantum image based on Moiré fringe can be split into three parts, including the embedding process, the denoising process, and the extraction process [31]. The embedding process is to embed the watermark image into the carrier image; the obtained carrier image after the embedding process can be called a prewatermarked image. If the watermark image is directly extracted from the prewatermarked image, the extracted watermark image contains much noise. The function of the denoising process is to remove the noise from the prewatermarked image in order to make sure that the extracted watermark image has no noise. The denoising process can be said to be the optimization process of a watermark image’s embedding process. The final step is the extraction process.


## 3. The Specific Design of the Scheme

Based on the NEQR, a novel quantum image steganography combining quantum Hilbert scrambling with steganography based on the Moiré fringe is designed in this paper. The algorithm can be separated into two parts. One is the scrambling and restoration process of the quantum image based on the quantum Hilbert transformation. Another is the embedding and extraction process of the watermark image on the foundation of steganography which involves the Moiré fringe. Accordingly, quantum circuits are designed for each of the two sections. The principles and quantum circuit diagrams of the two parts are introduced below. The Figure2 is flow chart of the whole scheme.Figure 2
Flow chart of the algorithm.


### 3.1. Quantum Circuit Module

According to the quantum Hilbert scrambling principle in Section2.2, the scrambling process is divided into three parts including initialization, the iterative process when the time of iteration is odd and when the time of iteration is even. When designing quantum circuits for Hilbert scrambling of quantum images, three basic quantum circuit modules including module P, module O, and module E need to be used. The quantum circuit of the initialization is layout based on the module P; the quantum circuit corresponding to the scrambling process when the time of iterations is odd is generated by the combination of the module P and the module O; when the time of iterations is an even, the corresponding quantum circuit is generated by module P and module E. The functions and quantum circuit diagrams of the module P, module O, and module E are introduced in .(1)
The moduleP can segment the quantum image and realize the generation iteration of the Hilbert matrix. The module P can divide a quantum image with the size of 2n×2n into 2n−t−1×2n−t−1 (t is an integer, and t∈0,n−1) image subblocks with the size of 2t+1×2t+1. The Figure 3 is the quantum circuit diagram corresponding to this part. The module P firstly swaps xn−t−2 and xn−t−3, xn−t−3 and xn−t−4,…, x1 and x0 and finally swaps x0 and yn−t−1.(2)
The moduleO is for the case when the number of iterations is odd in the iterative process of the quantum Hilbert matrix. Assuming that W, X, Y and Z are all matrices of size 2t−1×2t−1, the function of the module O is to convert WXYZ into WZppXTYT. The quantum circuit corresponding to this section is clearly demonstrated in Figure 4. Below are the specific quantum circuit process of the module O.(1)
Swapxn−t−1 and yn−t−1 with SWAP gate, then add a CNOT gate, where xn−t−1 controls yn−t−1.(2)
The controlled SWAP gate are used to swapxn−1 and yn−1,xn−2 and yn−2,⋯,xn−t and yn−t, where the control qubit is yn−t−1.(3)
The 2-qubit CNOT gate are used to flipxn−1, yn−1, xn−2, yn−2,⋯,xn−t, and yn−t, where the control qubit is xn−t−1 and yn−t−1.(3)
The moduleE is for the case when the number of iterations is even in the iterative process of the quantum Hilbert matrix. Assuming that W, X, Y, and Z are all matrices of size 2t−1×2t−1, the function of the module O is to convert WXYZ into WXTZppYT. The Figure 5 is the quantum circuit diagram corresponding to this part. Below are the specific quantum circuit process of the module E.Figure 3
The quantum circuit diagram of moduleP.Figure 4
The quantum circuit diagram of moduleO.Figure 5
The quantum circuit diagram of moduleE.(1)
Add a CNOT gate, whereyn−t−1 controls xn−t−1.(2)
The controlled SWAP gate are used to swapxn−1 and yn−1,xn−2 and yn−2,⋯,xn−t and yn−t, where the control qubit is xn−t−1.(3)
The 2-qubit CNOT gate are used to flipxn−1, yn−1, xn−2, yn−2,⋯,xn−t, and yn−t, where the control qubit is xn−t−1 and yn−t−1.


### 3.2. The Quantum Circuit Design of Quantum Hilbert Scrambling

In Section3.1, we get the three basic modules of quantum circuits. Next, the three modules are used to design quantum circuits for the three parts of quantum Hilbert scrambling.


#### 3.2.1. The Mole of Initialization

The function of initialization is to generate the initial Hilbert matrixF1=1243. In this paper, the initialization module on the basis of the module P is designed corresponding to t=0, and just add a CNOT gate between the two lines xn−1 and yn−1 of module P, where yn−1 is the control qubit and xn−1 is the controlled qubit. The Figure 6 is the quantum circuit corresponding to the initialization module.Figure 6
The quantum circuit diagram of module initialization.


#### 3.2.2. The Process of Iteration

When the time of iteration is odd/even, the effect of the corresponding quantum circuit could convert the image blockFt=WXYZ into WZppXTYT/WXTZppYT. In this paper, the module P and the module O are combined to form the odd module, and the module P and the module E are combined to form the even module. The quantum circuit of odd module and even module are displayed in Figures 7 and 8, respectively.Figure 7
The quantum circuit of the odd module (when the time of iterations is odd).Figure 8
The quantum circuit of the even module (when the time of iterations is even).According to the analysis of the iterative process of the generation about the Hilbert matrix, the corresponding quantum circuits are designed for each step in the generation process. Combining each unit circuit, the integral quantum circuit about the quantum Hilbert scrambling is displayed in Figure9. As a result of the unitarity of quantum gate, the inverse circuit of the quantum Hilbert scrambling would be obtained by placing the quantum gates in the entire quantum circuit in reverse order.Figure 9
The quantum circuit of the quantum Hilbert scrambling.


### 3.3. The Quantum Circuit of the Steganography Based on Moiré Fringe

The quantum circuit of the steganography based on Moiré fringe is divided into three parts, including the embedding process, the denoising processing, and the extraction process. Firstly, the watermark image is embedded into the carrier image, thus getting the pre-watermarked image. Next, the prewatermarked image is subjected to denoising processing. If there is no the denoise processing, the extracted watermark image will be mixed with noise. At last, the watermark image is extracted from the watermarked image. The quantum circuit and design principles of each part are described, respectively, in detail below.


#### 3.3.1. The Embedding Process

The embedding process can achieve embedding the watermark imageM into the carrier image Q in a certain way, thus getting the prewatermarked image Q1. The principle formula about the embedding process is as follows:(3)Q1j,i=Qj,i,Mj,i=0,Qj−1mod2m,i,Mj,i=1.We can draw a conclusion from the above formula that the quantum circuit corresponding to the embedding process is able to be completed by the quantum-controlled exchange gate. If the quantity of qubits controlling the color of the quantum watermark image ism, the message about color of a pixel is expressed as CMj,i0CMj,i1⋯CMj,im−1. That is, the embedding process of watermark images can be achieved through using m quantum-controlled exchange gates. Taking Mj,i as the control bit, if Mj,i=0, the corresponding carrier image Qj,i remains unchanged; if Mj,i=1, the carrier image Qj,i is replaced by Qj−1mod2m,i. The new matrix Qj,i obtained is the matrix Q1j,i. The specific quantum circuit is demonstrated in Figure 10, where CQj−1mod2m,iβ, β∈0,1,⋯,m−1 is the color information of pixel Qj−1mod2m,i.Figure 10
The quantum circuit diagrams of the embedding process.


#### 3.3.2. The Denoising Process

The function of denoising process is to ensure that the extracted watermark image will not be mixed with noise after extraction. Because in the extraction process, the value of the qubit of the color message about the watermark image depends on whetherQj,i and Q1j,i are equal. If they are not equal, M1j,i=1, otherwise, M1j,i=0. If the value of Qj,i was originally equal to Qj−1mod2n,i, this would make M1j,i=0, but in fact, M1j,i=1, so that some qubits of the watermark image take the opposite value. The denoising process can prevent this situation. When M1j,i=1, flipping the least significant qubit of the prewatermarked image, that is, CQ1j,im−1⟶CQ1j,im−1¯. Figure 11 is the quantum circuit corresponding to the denoising process. The embedding process and denoising process can be collectively referred to as the complete embedding process. The quantum circuit corresponding to the complete embedding process is displayed in the Figure 12.Figure 11
The quantum circuit diagram of denoising process.Figure 12
The complete quantum circuit of the embedding process.


#### 3.3.3. The Extraction Process

The last step is the extraction process. That is, the watermark imageM1 is obtained through the watermarked image Q1 and the carrier image Q. If Qj,i and Q1j,i are equal, then M1j,i=0; otherwise, M1j,i=1, which is given in the following equation:(4)M1j,i=0,Q2j,i=Q1j,i,1,Q2j,i≠Q1j,i.The design of quantum circuit corresponding to the extraction process is demonstrated in Figure13.Figure 13
The quantum circuit of the extraction process.


## 3.1. Quantum Circuit Module

According to the quantum Hilbert scrambling principle in Section2.2, the scrambling process is divided into three parts including initialization, the iterative process when the time of iteration is odd and when the time of iteration is even. When designing quantum circuits for Hilbert scrambling of quantum images, three basic quantum circuit modules including module P, module O, and module E need to be used. The quantum circuit of the initialization is layout based on the module P; the quantum circuit corresponding to the scrambling process when the time of iterations is odd is generated by the combination of the module P and the module O; when the time of iterations is an even, the corresponding quantum circuit is generated by module P and module E. The functions and quantum circuit diagrams of the module P, module O, and module E are introduced in .(1)
The moduleP can segment the quantum image and realize the generation iteration of the Hilbert matrix. The module P can divide a quantum image with the size of 2n×2n into 2n−t−1×2n−t−1 (t is an integer, and t∈0,n−1) image subblocks with the size of 2t+1×2t+1. The Figure 3 is the quantum circuit diagram corresponding to this part. The module P firstly swaps xn−t−2 and xn−t−3, xn−t−3 and xn−t−4,…, x1 and x0 and finally swaps x0 and yn−t−1.(2)
The moduleO is for the case when the number of iterations is odd in the iterative process of the quantum Hilbert matrix. Assuming that W, X, Y and Z are all matrices of size 2t−1×2t−1, the function of the module O is to convert WXYZ into WZppXTYT. The quantum circuit corresponding to this section is clearly demonstrated in Figure 4. Below are the specific quantum circuit process of the module O.(1)
Swapxn−t−1 and yn−t−1 with SWAP gate, then add a CNOT gate, where xn−t−1 controls yn−t−1.(2)
The controlled SWAP gate are used to swapxn−1 and yn−1,xn−2 and yn−2,⋯,xn−t and yn−t, where the control qubit is yn−t−1.(3)
The 2-qubit CNOT gate are used to flipxn−1, yn−1, xn−2, yn−2,⋯,xn−t, and yn−t, where the control qubit is xn−t−1 and yn−t−1.(3)
The moduleE is for the case when the number of iterations is even in the iterative process of the quantum Hilbert matrix. Assuming that W, X, Y, and Z are all matrices of size 2t−1×2t−1, the function of the module O is to convert WXYZ into WXTZppYT. The Figure 5 is the quantum circuit diagram corresponding to this part. Below are the specific quantum circuit process of the module E.Figure 3
The quantum circuit diagram of moduleP.Figure 4
The quantum circuit diagram of moduleO.Figure 5
The quantum circuit diagram of moduleE.(1)
Add a CNOT gate, whereyn−t−1 controls xn−t−1.(2)
The controlled SWAP gate are used to swapxn−1 and yn−1,xn−2 and yn−2,⋯,xn−t and yn−t, where the control qubit is xn−t−1.(3)
The 2-qubit CNOT gate are used to flipxn−1, yn−1, xn−2, yn−2,⋯,xn−t, and yn−t, where the control qubit is xn−t−1 and yn−t−1.


## 3.2. The Quantum Circuit Design of Quantum Hilbert Scrambling

In Section3.1, we get the three basic modules of quantum circuits. Next, the three modules are used to design quantum circuits for the three parts of quantum Hilbert scrambling.


### 3.2.1. The Mole of Initialization

The function of initialization is to generate the initial Hilbert matrixF1=1243. In this paper, the initialization module on the basis of the module P is designed corresponding to t=0, and just add a CNOT gate between the two lines xn−1 and yn−1 of module P, where yn−1 is the control qubit and xn−1 is the controlled qubit. The Figure 6 is the quantum circuit corresponding to the initialization module.Figure 6
The quantum circuit diagram of module initialization.


### 3.2.2. The Process of Iteration

When the time of iteration is odd/even, the effect of the corresponding quantum circuit could convert the image blockFt=WXYZ into WZppXTYT/WXTZppYT. In this paper, the module P and the module O are combined to form the odd module, and the module P and the module E are combined to form the even module. The quantum circuit of odd module and even module are displayed in Figures 7 and 8, respectively.Figure 7
The quantum circuit of the odd module (when the time of iterations is odd).Figure 8
The quantum circuit of the even module (when the time of iterations is even).According to the analysis of the iterative process of the generation about the Hilbert matrix, the corresponding quantum circuits are designed for each step in the generation process. Combining each unit circuit, the integral quantum circuit about the quantum Hilbert scrambling is displayed in Figure9. As a result of the unitarity of quantum gate, the inverse circuit of the quantum Hilbert scrambling would be obtained by placing the quantum gates in the entire quantum circuit in reverse order.Figure 9
The quantum circuit of the quantum Hilbert scrambling.


## 3.2.1. The Mole of Initialization

The function of initialization is to generate the initial Hilbert matrixF1=1243. In this paper, the initialization module on the basis of the module P is designed corresponding to t=0, and just add a CNOT gate between the two lines xn−1 and yn−1 of module P, where yn−1 is the control qubit and xn−1 is the controlled qubit. The Figure 6 is the quantum circuit corresponding to the initialization module.Figure 6
The quantum circuit diagram of module initialization.


## 3.2.2. The Process of Iteration

When the time of iteration is odd/even, the effect of the corresponding quantum circuit could convert the image blockFt=WXYZ into WZppXTYT/WXTZppYT. In this paper, the module P and the module O are combined to form the odd module, and the module P and the module E are combined to form the even module. The quantum circuit of odd module and even module are displayed in Figures 7 and 8, respectively.Figure 7
The quantum circuit of the odd module (when the time of iterations is odd).Figure 8
The quantum circuit of the even module (when the time of iterations is even).According to the analysis of the iterative process of the generation about the Hilbert matrix, the corresponding quantum circuits are designed for each step in the generation process. Combining each unit circuit, the integral quantum circuit about the quantum Hilbert scrambling is displayed in Figure9. As a result of the unitarity of quantum gate, the inverse circuit of the quantum Hilbert scrambling would be obtained by placing the quantum gates in the entire quantum circuit in reverse order.Figure 9
The quantum circuit of the quantum Hilbert scrambling.


## 3.3. The Quantum Circuit of the Steganography Based on Moiré Fringe

The quantum circuit of the steganography based on Moiré fringe is divided into three parts, including the embedding process, the denoising processing, and the extraction process. Firstly, the watermark image is embedded into the carrier image, thus getting the pre-watermarked image. Next, the prewatermarked image is subjected to denoising processing. If there is no the denoise processing, the extracted watermark image will be mixed with noise. At last, the watermark image is extracted from the watermarked image. The quantum circuit and design principles of each part are described, respectively, in detail below.


### 3.3.1. The Embedding Process

The embedding process can achieve embedding the watermark imageM into the carrier image Q in a certain way, thus getting the prewatermarked image Q1. The principle formula about the embedding process is as follows:(3)Q1j,i=Qj,i,Mj,i=0,Qj−1mod2m,i,Mj,i=1.We can draw a conclusion from the above formula that the quantum circuit corresponding to the embedding process is able to be completed by the quantum-controlled exchange gate. If the quantity of qubits controlling the color of the quantum watermark image ism, the message about color of a pixel is expressed as CMj,i0CMj,i1⋯CMj,im−1. That is, the embedding process of watermark images can be achieved through using m quantum-controlled exchange gates. Taking Mj,i as the control bit, if Mj,i=0, the corresponding carrier image Qj,i remains unchanged; if Mj,i=1, the carrier image Qj,i is replaced by Qj−1mod2m,i. The new matrix Qj,i obtained is the matrix Q1j,i. The specific quantum circuit is demonstrated in Figure 10, where CQj−1mod2m,iβ, β∈0,1,⋯,m−1 is the color information of pixel Qj−1mod2m,i.Figure 10
The quantum circuit diagrams of the embedding process.


### 3.3.2. The Denoising Process

The function of denoising process is to ensure that the extracted watermark image will not be mixed with noise after extraction. Because in the extraction process, the value of the qubit of the color message about the watermark image depends on whetherQj,i and Q1j,i are equal. If they are not equal, M1j,i=1, otherwise, M1j,i=0. If the value of Qj,i was originally equal to Qj−1mod2n,i, this would make M1j,i=0, but in fact, M1j,i=1, so that some qubits of the watermark image take the opposite value. The denoising process can prevent this situation. When M1j,i=1, flipping the least significant qubit of the prewatermarked image, that is, CQ1j,im−1⟶CQ1j,im−1¯. Figure 11 is the quantum circuit corresponding to the denoising process. The embedding process and denoising process can be collectively referred to as the complete embedding process. The quantum circuit corresponding to the complete embedding process is displayed in the Figure 12.Figure 11
The quantum circuit diagram of denoising process.Figure 12
The complete quantum circuit of the embedding process.


### 3.3.3. The Extraction Process

The last step is the extraction process. That is, the watermark imageM1 is obtained through the watermarked image Q1 and the carrier image Q. If Qj,i and Q1j,i are equal, then M1j,i=0; otherwise, M1j,i=1, which is given in the following equation:(4)M1j,i=0,Q2j,i=Q1j,i,1,Q2j,i≠Q1j,i.The design of quantum circuit corresponding to the extraction process is demonstrated in Figure13.Figure 13
The quantum circuit of the extraction process.


## 3.3.1. The Embedding Process

The embedding process can achieve embedding the watermark imageM into the carrier image Q in a certain way, thus getting the prewatermarked image Q1. The principle formula about the embedding process is as follows:(3)Q1j,i=Qj,i,Mj,i=0,Qj−1mod2m,i,Mj,i=1.We can draw a conclusion from the above formula that the quantum circuit corresponding to the embedding process is able to be completed by the quantum-controlled exchange gate. If the quantity of qubits controlling the color of the quantum watermark image ism, the message about color of a pixel is expressed as CMj,i0CMj,i1⋯CMj,im−1. That is, the embedding process of watermark images can be achieved through using m quantum-controlled exchange gates. Taking Mj,i as the control bit, if Mj,i=0, the corresponding carrier image Qj,i remains unchanged; if Mj,i=1, the carrier image Qj,i is replaced by Qj−1mod2m,i. The new matrix Qj,i obtained is the matrix Q1j,i. The specific quantum circuit is demonstrated in Figure 10, where CQj−1mod2m,iβ, β∈0,1,⋯,m−1 is the color information of pixel Qj−1mod2m,i.Figure 10
The quantum circuit diagrams of the embedding process.


## 3.3.2. The Denoising Process

The function of denoising process is to ensure that the extracted watermark image will not be mixed with noise after extraction. Because in the extraction process, the value of the qubit of the color message about the watermark image depends on whetherQj,i and Q1j,i are equal. If they are not equal, M1j,i=1, otherwise, M1j,i=0. If the value of Qj,i was originally equal to Qj−1mod2n,i, this would make M1j,i=0, but in fact, M1j,i=1, so that some qubits of the watermark image take the opposite value. The denoising process can prevent this situation. When M1j,i=1, flipping the least significant qubit of the prewatermarked image, that is, CQ1j,im−1⟶CQ1j,im−1¯. Figure 11 is the quantum circuit corresponding to the denoising process. The embedding process and denoising process can be collectively referred to as the complete embedding process. The quantum circuit corresponding to the complete embedding process is displayed in the Figure 12.Figure 11
The quantum circuit diagram of denoising process.Figure 12
The complete quantum circuit of the embedding process.


## 3.3.3. The Extraction Process

The last step is the extraction process. That is, the watermark imageM1 is obtained through the watermarked image Q1 and the carrier image Q. If Qj,i and Q1j,i are equal, then M1j,i=0; otherwise, M1j,i=1, which is given in the following equation:(4)M1j,i=0,Q2j,i=Q1j,i,1,Q2j,i≠Q1j,i.The design of quantum circuit corresponding to the extraction process is demonstrated in Figure13.Figure 13
The quantum circuit of the extraction process.


## 4. Experimental Simulation and Analysis

Since the quantum computer has not yet come out, we use the classical computer and Matlab to carry out the experimental simulation of the proposed scheme. In addition to the advantage of not having the parallelism of quantum computers, classical computers can follow the processes of the algorithm to achieve the corresponding effect. Eight grayscale images with a size of512×512 are used in this experimental simulation, of which four images are watermark images and the others are carrier images. The eight images are shown in Figure 14, where (a)–(d) are watermark images and (e)–(h) are carrier images.Figure 14
The watermark image and the carrier image.
(a)(b)(c)(d)(e)(f)(g)(h)


### 4.1. Experimental Results

First of all, perform Hilbert scrambling on the four watermark images in (a)–(d) of Figure14, and the obtained scrambled watermark images are shown respectively in (a)–(d) of Figure 15. After that, the four scrambled watermark images are embedded into the four carrier images in (e)–(h) of Figure 14 by using the steganography of quantum image based on Moiré fringe. The obtained watermarked image is demonstrated in (a)–(d) of Figure 16. At last, the scrambled watermark image is extracted, and the function of the inverse Hilbert scrambling is to get the original watermark image. The obtained original watermark image is displayed in (a)–(d) of Figure 17.Figure 15
The watermark image after quantum Hilbert scrambling.
(a)(b)(c)(d)Figure 16
The watermarked images. (a) Boat. (b) Goldhill. (c) Peppers. (d) Baboon.
(a)(b)(c)(d)Figure 17
The watermark image after extraction and inverse quantum Hilbert scrambling.
(a)(b)(c)(d)It can be seen from Figures14 and 16 that there is no visual difference between the carrier image and the watermarked image, indicating that the watermark image visually does not make a difference to the carrier image. Therefore, from a watermarked image, it is not easy for a third party to detect the existence of the watermark image. The function of quantum Hilbert scrambling is to scramble the pixel positions of the watermark image. In Figure 15, it is shown that the message of the watermark image cannot be obtained from the scrambled image. Even if a third party finds the existence of a watermarked image in the watermarked image, after extracting from the watermarked image, the watermark image’s message cannot be obtained, thereby further ensuring the security of the watermarked image. In Figure 17, it is obvious that the watermark image extracted and subjected to the inverse quantum Hilbert scrambling is identical with the original watermark image. It shows that the entire algorithm process will not change the message of the watermark image, so the entire scheme is feasible.


### 4.2. Visual Quality Analysis of the Watermarked Image

PSNR is usually adopted to assess the similarity of two similar images. The similarity between the two images is positively related to the value of PSNR. In order to measure the impact of embedding watermark image on the visual quality of the carrier image, a quantitative analysis by calculating the PSNR value between the watermarked image and the carrier image is done in this paper. For two images of size2n×2n, the calculation equation of PSNR is as follows, where Q is the carrier image, Q1 is the watermarked image.(5)PSNR=20log10V×2n∑i=02n−1∑j=02n−1Qi,j−Q1i,j2,where V is the maximum gray value of the pixel, which is 255. In this paper, PSNR tests are performed on the four groups of watermarks and carrier images used in the experimental simulation. The experimental results obtained are presented in Table 1. The results show that the PSNR values of the measured images are about 51. The PSNR is about 30 in the reference [33], the comparison of PSNR which proves the superiority of this scheme.Table 1
PSNR value of the watermarked image.
ImageBoatGoldhillPeppersBaboonPSNR51.298451.148551.156551.1413


### 4.3. The Time Complexity of Quantum Circuits

The time complexity of a quantum circuit is decided by the number of elementary quantum gates. Basic quantum gates are quantum gates containing one or two qubits, including NOT gates and CNOT gates. The time complexity of a basic quantum gate is 1.First of all, the time complexity of the quantum circuit corresponding to the quantum Hilbert scrambling is calculated. The quantum Hilbert scrambling is displayed in Figure9, which is composed of initialization module, odd module, and even module. The quantum circuits corresponding to the three modules are shown in Figures 6–8 respectively. The initialization module is composed of a Module P and a CNOT gate. The quantum circuit of Module P is presented in Figure 2, it consists of n−t−1 SWAP gates, where the value of t is 0. The time complexity of a SWAP gate is equivalent to three CNOT gates, so the time complexity of the initialization is 3n−2. The odd module consists of module P and module O. The module O is demonstrated in Figure 3. The module O consists of a SWAP gate, a CNOT gate, t controlled SWAP gates, and 2t2-qubit CNOT gates. Because a controlled SWAP gate can be made up of 18 CNOT gates, the time complexity of the SWAP gate is 18. The time complexity of a 2-qubit CNOT gate is 8. As a consequence, the time complexity of the whole odd module is 34t+4+3n−t−1. Similarly, the time complexity of even module is 34t+1+3n−t−1. So the time complexity of the whole Hilbert scrambling is ∑tisodd3n+31t+1+∑tiseven3n+31t−2+3n−2≈18n2+n. Because of the unitarity of the quantum gate, the time complexity of the quantum circuit about Hilbert inverse scrambling is also 18n2+n. So the time complexity of the quantum Hilbert scrambling circuit is On2. However, the complexity of classical Hilbert scrambling is O22n, so compared with classical scrambling methods, the quantum Hilbert scrambling has certain advantages [35].Then calculating the time complexity of quantum circuit about the steganography of quantum image based on Moiré fringe. The quantum circuit of this section is divided into three parts, including the embedding process, the denoising process, and the extraction process. For a single pixel, the quantum circuit of the embedding process is demonstrated in Figure10. It is made up with m controlled SWAP gates, so the time complexity of this part is 18m. The quantum circuit about denoising processing is shown in Figure 11. It consists of m 2-qubit CNOT gates, m NOT gates, a m+1-qubit CNOT gate, and a CNOT gate. The time complexity of the CNOT gate controlled by x qubits is 12x−9, so the time complexity of the denoising quantum circuit is 21m+4. The quantum circuit about the extraction process is shown in Figure 13, and this part consists of m CNOT gates, m NOT gates and a CNOT gate controlled by m qubits, so the time complexity of the quantum circuit about this part is 14m−9. Hence, the time complexity of the quantum circuit for the steganography of the quantum image’s single pixel based on Moiré fringe is 53m−5. The maximum gray value of the image used in the experimental simulation is 256, so the value of m is 8. For a quantum image of size 2n×2n, the time complexity of the quantum circuit is On⋅22n. To sum up, the complexity of the whole scheme is On⋅22n. Compared with some other quantum image watermarking algorithms (Table 2) [36–38], the proposed scheme has lower complexity.Table 2
Comparison of the circuit complexity.
MethodReference [36]Reference [37]Reference [38]Our proposed schemeComplexityOn⋅22n+nOn⋅22n+2+n2On⋅22nOn⋅22n


## 4.1. Experimental Results

First of all, perform Hilbert scrambling on the four watermark images in (a)–(d) of Figure14, and the obtained scrambled watermark images are shown respectively in (a)–(d) of Figure 15. After that, the four scrambled watermark images are embedded into the four carrier images in (e)–(h) of Figure 14 by using the steganography of quantum image based on Moiré fringe. The obtained watermarked image is demonstrated in (a)–(d) of Figure 16. At last, the scrambled watermark image is extracted, and the function of the inverse Hilbert scrambling is to get the original watermark image. The obtained original watermark image is displayed in (a)–(d) of Figure 17.Figure 15
The watermark image after quantum Hilbert scrambling.
(a)(b)(c)(d)Figure 16
The watermarked images. (a) Boat. (b) Goldhill. (c) Peppers. (d) Baboon.
(a)(b)(c)(d)Figure 17
The watermark image after extraction and inverse quantum Hilbert scrambling.
(a)(b)(c)(d)It can be seen from Figures14 and 16 that there is no visual difference between the carrier image and the watermarked image, indicating that the watermark image visually does not make a difference to the carrier image. Therefore, from a watermarked image, it is not easy for a third party to detect the existence of the watermark image. The function of quantum Hilbert scrambling is to scramble the pixel positions of the watermark image. In Figure 15, it is shown that the message of the watermark image cannot be obtained from the scrambled image. Even if a third party finds the existence of a watermarked image in the watermarked image, after extracting from the watermarked image, the watermark image’s message cannot be obtained, thereby further ensuring the security of the watermarked image. In Figure 17, it is obvious that the watermark image extracted and subjected to the inverse quantum Hilbert scrambling is identical with the original watermark image. It shows that the entire algorithm process will not change the message of the watermark image, so the entire scheme is feasible.


## 4.2. Visual Quality Analysis of the Watermarked Image

PSNR is usually adopted to assess the similarity of two similar images. The similarity between the two images is positively related to the value of PSNR. In order to measure the impact of embedding watermark image on the visual quality of the carrier image, a quantitative analysis by calculating the PSNR value between the watermarked image and the carrier image is done in this paper. For two images of size2n×2n, the calculation equation of PSNR is as follows, where Q is the carrier image, Q1 is the watermarked image.(5)PSNR=20log10V×2n∑i=02n−1∑j=02n−1Qi,j−Q1i,j2,where V is the maximum gray value of the pixel, which is 255. In this paper, PSNR tests are performed on the four groups of watermarks and carrier images used in the experimental simulation. The experimental results obtained are presented in Table 1. The results show that the PSNR values of the measured images are about 51. The PSNR is about 30 in the reference [33], the comparison of PSNR which proves the superiority of this scheme.Table 1
PSNR value of the watermarked image.
ImageBoatGoldhillPeppersBaboonPSNR51.298451.148551.156551.1413


## 4.3. The Time Complexity of Quantum Circuits

The time complexity of a quantum circuit is decided by the number of elementary quantum gates. Basic quantum gates are quantum gates containing one or two qubits, including NOT gates and CNOT gates. The time complexity of a basic quantum gate is 1.First of all, the time complexity of the quantum circuit corresponding to the quantum Hilbert scrambling is calculated. The quantum Hilbert scrambling is displayed in Figure9, which is composed of initialization module, odd module, and even module. The quantum circuits corresponding to the three modules are shown in Figures 6–8 respectively. The initialization module is composed of a Module P and a CNOT gate. The quantum circuit of Module P is presented in Figure 2, it consists of n−t−1 SWAP gates, where the value of t is 0. The time complexity of a SWAP gate is equivalent to three CNOT gates, so the time complexity of the initialization is 3n−2. The odd module consists of module P and module O. The module O is demonstrated in Figure 3. The module O consists of a SWAP gate, a CNOT gate, t controlled SWAP gates, and 2t2-qubit CNOT gates. Because a controlled SWAP gate can be made up of 18 CNOT gates, the time complexity of the SWAP gate is 18. The time complexity of a 2-qubit CNOT gate is 8. As a consequence, the time complexity of the whole odd module is 34t+4+3n−t−1. Similarly, the time complexity of even module is 34t+1+3n−t−1. So the time complexity of the whole Hilbert scrambling is ∑tisodd3n+31t+1+∑tiseven3n+31t−2+3n−2≈18n2+n. Because of the unitarity of the quantum gate, the time complexity of the quantum circuit about Hilbert inverse scrambling is also 18n2+n. So the time complexity of the quantum Hilbert scrambling circuit is On2. However, the complexity of classical Hilbert scrambling is O22n, so compared with classical scrambling methods, the quantum Hilbert scrambling has certain advantages [35].Then calculating the time complexity of quantum circuit about the steganography of quantum image based on Moiré fringe. The quantum circuit of this section is divided into three parts, including the embedding process, the denoising process, and the extraction process. For a single pixel, the quantum circuit of the embedding process is demonstrated in Figure10. It is made up with m controlled SWAP gates, so the time complexity of this part is 18m. The quantum circuit about denoising processing is shown in Figure 11. It consists of m 2-qubit CNOT gates, m NOT gates, a m+1-qubit CNOT gate, and a CNOT gate. The time complexity of the CNOT gate controlled by x qubits is 12x−9, so the time complexity of the denoising quantum circuit is 21m+4. The quantum circuit about the extraction process is shown in Figure 13, and this part consists of m CNOT gates, m NOT gates and a CNOT gate controlled by m qubits, so the time complexity of the quantum circuit about this part is 14m−9. Hence, the time complexity of the quantum circuit for the steganography of the quantum image’s single pixel based on Moiré fringe is 53m−5. The maximum gray value of the image used in the experimental simulation is 256, so the value of m is 8. For a quantum image of size 2n×2n, the time complexity of the quantum circuit is On⋅22n. To sum up, the complexity of the whole scheme is On⋅22n. Compared with some other quantum image watermarking algorithms (Table 2) [36–38], the proposed scheme has lower complexity.Table 2
Comparison of the circuit complexity.
MethodReference [36]Reference [37]Reference [38]Our proposed schemeComplexityOn⋅22n+nOn⋅22n+2+n2On⋅22nOn⋅22n


## 5. Conclusion

On the foundation of the NEQR, a quantum watermarking scheme combining quantum Hilbert scrambling with steganography about the Moiré fringe is designed in this paper. First of all, the quantum watermarked image is transformed by quantum Hilbert scrambling, obtaining an encrypted image. The message of the original watermark image cannot be obtained from the scrambled image. Next, the watermarked image after scrambling is embedded into the carrier image using the steganography of the Moiré fringe. At the same time, the quantum Hilbert inverse scrambling and the extraction processes can be completed. Last but not least, we have done a simulation experiment on the algorithm. The watermarked image is visually identical with the carrier image. We also tested the PSNR value of the watermarked image. And compared the results with other references, it is obvious that our scheme has greater performance. In addition, even if the third party found the existence of the watermark image and extracted it from the watermarked image. Because the watermark image is scrambled by quantum Hilbert scrambling, the third party still cannot obtain the message of the watermarked image. Therefore, the proposed algorithm has higher security. Besides, the complexity of the quantum circuit used in this scheme is calculated, which shows that the time complexity of this scheme is lower than some other related schemes.



---

*Source: 3746357-2023-03-07.xml*