QRCI: A new quantum representation model of color digital images

QRCI: A new quantum representation model of color digital images

Optics Communications 438 (2019) 147–158 Contents lists available at ScienceDirect Optics Communications journal homepage: www.elsevier.com/locate/o...

3MB Sizes 0 Downloads 57 Views

Optics Communications 438 (2019) 147–158

Contents lists available at ScienceDirect

Optics Communications journal homepage: www.elsevier.com/locate/optcom

QRCI: A new quantum representation model of color digital images Ling Wang ∗, Qiwen Ran, Jing Ma, Siyuan Yu, Liying Tan National Key Laboratory of Tunable Laser Technology, Harbin Institute of Technology, Harbin 150001, China

ARTICLE

INFO

Keywords: Quantum image representation model Quantum color image processing Storage capacity Qubit Quantum cost Quantum computation

ABSTRACT In this paper, a new quantum representation model of color digital images (QRCI) is investigated, in which the color information is encoded by the basis states of qubit sequences. QRCI model utilizes 2𝑛 + 6 qubits to store a color digital image with size 2𝑛 × 2𝑛 . Compared with the existing NCQI representation model, the storage capacity of QRCI improves 218 times. Moreover, some quantum color image processing operations concerning channels and bit-planes based on QRCI are discussed and their quantum circuits are designed. Comparison results of the quantum circuits indicate that these operations based on QRCI have lower quantum cost than NCQI. Therefore, the new proposed QRCI representation model can save more storage space and it is more convenient to conduct quantum color image processing operations concerning channels and bit-planes. This work will help the researchers to further investigate more complex quantum color image processing operations based on QRCI.

1. Introduction Quantum image processing (QImP) is an interdisciplinary subject between quantum computation and image processing. In recent years, along with the bright future of quantum computers [1,2], QImP has become a hot research field [3]. Combining quantum mechanics with image processing is an effective approach to improve the processing speed of classical image. QImP has two excellent properties: (1) the exponential increase of quantum storage capacity; (2) the unique quantum mechanics principles, such as entanglement and parallelism [4]. QImP mainly consists of two branches: quantum image representation and quantum image processing algorithm. Quantum image representation (QIR) is the foundation of QImP. QIRs provide the ways to represent digital images in quantum computers. So far, a great deal of QIRs have been presented such as Qubit Lattice [5], Real Ket [6], Entangled Image [7], FRQI [8], MCQI [9], NASS [10], QUALPI [11], NEQR [12], NCQI [13] and so on. Among these existing QIRs, two representations relate to color images: MCQI [9] and NCQI [13]. Inspired by FRQI, in 2013, Sun et al. put forward MCQI model which was constructed by using quantum rotation gates. MCQI model captures information of 𝑅𝐺𝐵 channels and 𝛼 channel. However, MCQI utilizes amplitudes of quantum states to store the color information, so it is difficult to retrieve the classical color image from a MCQI quantum system accurately. To retrieve color image accurately, in 2016, inspired by NEQR, Sang et al. investigated NCQI model to store color digital image. The NCQI representation model, in which the color information of digital image is encoded by the basis states of qubit sequences, has become one of the most commonly accepted QIRs nowadays since the classical color image can be recovered accurately.

According to NCQI representation model, 2𝑛 + 24 qubits are needed to store a color digital image with size 2𝑛 × 2𝑛 . Meanwhile, a series of quantum image processing algorithms emerge continually such as quantum image geometric transformation [14,15], quantum image color transformation [16], quantum image scaling [17– 19], quantum image scrambling [20,21], quantum image filtering [22], quantum image segmentation [23], quantum image matching [24] and so on. Therein, quantum image geometric transformation, quantum image color transformation and quantum image scrambling are frequentlyused methods of quantum image encryption. In this paper, for the sake of improving the storage capacity of quantum image representation in which color information is encoded by basis states, a new quantum representation model of color digital images, i.e., QRCI, is proposed. Making the best of quantum superposition, the new model uses two entangled qubit sequences to store a color digital image, where the color information of three channels (R, G, B) is stored in the first qubit sequence, while the corresponding bit-plane information and position information are stored into the second qubit sequence. Furthermore, some quantum color image processing operations concerning channels and bit-planes based on QRCI are discussed, and the corresponding quantum circuits are designed. Through analyses and comparisons with NCQI, it has been proved that QRCI representation model has the following advantages: 1. QRCI only requires 2𝑛 + 6 qubits to store a color digital image with size 2𝑛 × 2𝑛 . The storage capacity of QRCI improves 218 times than NCQI. 2. Many quantum color image processing operations based on QRCI have lower quantum cost than NCQI, for example color complement operation, channel swapping operation, bit-plane reversing operation,

∗ Corresponding author. E-mail address: [email protected] (L. Wang).

https://doi.org/10.1016/j.optcom.2019.01.015 Received 20 November 2018; Received in revised form 4 January 2019; Accepted 5 January 2019 Available online 11 January 2019 0030-4018/© 2019 Elsevier B.V. All rights reserved.

L. Wang, Q. Ran, J. Ma et al.

Optics Communications 438 (2019) 147–158

Fig. 1. The channels and bit-planes of Lena: (a) color image Lena, (b) R channel of Lena, (c) G channel of Lena, (d) B channel of Lena, (e) bit-plane 7 of R channel, (f) bit-plane 6 of R channel, (g) bit-plane 5 of R channel, (h) bit-plane 4 of R channel, (i) bit-plane 3 of R channel, (j) bit-plane 2 of R channel, (k) bit-plane 1 of R channel, (l) bit-plane 0 of R channel. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

This paper is organized as follows. Section 2 introduces the preliminary knowledge. Section 3 describes the new proposed QRCI representation model, gives the procedures of quantum image preparation and retrieving. Some quantum color image processing operations concerning channels and bit-planes based on QRCI and the comparisons with NCQI are presented in Section 4. Finally, a brief conclusion and outline future research directions are drawn in Section 5. 2. Preliminary knowledge For clarity, this section introduces NCQI representation model, RGB color model and bit-plane. 2.1. NCQI representation model The novel quantum representation for color digital images, i.e., NCQI, was proposed by Sang et al. in 2016 [13]. For a color digital image with size 2𝑛 × 2𝑛 , its representation is described as follows: 𝑛

|𝐼⟩ =

𝑛

2 −1 2 −1 1 ∑ ∑ |𝐶 (𝑦, 𝑥)⟩ ⊗ |𝑦𝑥⟩ 2𝑛 𝑦=0 𝑥=0

(1)

where |𝑦⟩ and |𝑥⟩ denote the vertical position and horizontal position, respectively; |𝐶 (𝑦, 𝑥)⟩ denotes the color value of the corresponding pixel, and it can be encoded by the binary sequence as below:

Fig. 2. The quantum circuit of QRCI representation model.

| ⟩ | | | 7 0 7 0 ⋯ 𝐺𝑦𝑥 𝐵𝑦𝑥 ⋯ 𝐵𝑦𝑥 |𝐶 (𝑦, 𝑥)⟩ = |𝑅 (𝑦, 𝑥)⟩ |𝐺 (𝑦, 𝑥)⟩ |𝐵 (𝑦, 𝑥)⟩ = |𝑅7𝑦𝑥 ⋯ 𝑅0𝑦𝑥 𝐺𝑦𝑥 | |⏟⏞⏞⏞⏟⏞⏞⏞⏟ ⏟⏞⏞⏞⏟⏞⏞⏞⏟ ⏟⏞⏞⏞⏟⏞⏞⏞⏟ | 𝑅𝑒𝑑 𝐺𝑟𝑒𝑒𝑛 𝐵𝑙𝑢𝑒 |

(2) The gray-level value of every channel (R, G, B) ranges from 0 to 255. Eq. (1) indicates the whole NCQI is stored into a normalized quantum superposition state. According to Eq. (1), 2𝑛 + 24 qubits are employed to store a 2𝑛 × 2𝑛 color digital image into NCQI quantum state. 2.2. RGB color model and bit-plane

Fig. 3. A color digital image with size 2 × 2. (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

RGB color model is the most used multi-channel color model. In this model, three different color channels (red, green and blue) are exploited to produce a new color. In general, the value of each channel varies from 0 to 255. According to RGB model, any color image can be decomposed into three gray-scale images, and each one represents one channel (R, G, B) [25]. Bit-plane of a gray-scale image involves a range of two-value image planes. First of all, the gray values of all pixels are encoded by their corresponding binary values; then, every single bit can form a twovalue image which is called as bit-plane [26]. Specifically, assuming the

bit-plane translation operation, bit-plane exchanging operation and the color transformation designed by combining the above operations. Therefore, the new proposed QRCI representation model can save more storage space than the existing quantum color image representation model NCQI, and it is more convenient to carry out quantum color image processing operations concerning channels and bit-planes. 148

L. Wang, Q. Ran, J. Ma et al.

Optics Communications 438 (2019) 147–158

Fig. 4. The flowchart of preparing QRCI representation.

Fig. 5. Quantum circuit for QRCI described in Eq. (6).

Fig. 7. Notations of quantum gates: (a) 𝑠𝑤𝑎𝑝 gate, (b) 𝑠𝑤𝑎𝑝 (3) gate.

Fig. 6. Color complement operation 𝑈𝐶 : (a) the quantum circuit of 𝑈𝐶 , (b) a 256 × 256 color digital image ‘‘Peppers’’, (c) the result of operation 𝑈𝐶 . (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

pixel value range from 0 to 255, the gray-scale image can be separated into 8 bit-planes. A color image ‘‘Lena’’ with size 256 × 256 shown in Fig. 1(a) is taken as an example. Fig. 1 displays the results of three channels of ‘‘Lena’’ and the results of 8 bit-planes of R channel.

Fig. 8. The quantum circuits of channel swapping operations: (a) 𝑈𝑅𝐺 , (b) 𝑈𝑅𝐵 , (c) 𝑈𝐺𝐵 . (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

3.1. New quantum representation model of color digital images (QRCI)

3. New quantum representation model of color image (QRCI), preparation and retrieving

Inspired by NCQI, on the basis of RGB color model and bit-plane, QRCI representation model is proposed to store and process color digital images in quantum computers. Making the best of quantum superposition, QRCI stores a color digital image into two entangled qubit sequences, where the color information of three channels (R, G, B) is stored into the first qubit sequence, while the corresponding bit-plane information and position information are stored into the second qubit sequence.

Commonly, the image processing in quantum computers has three steps as below [27]: (1) Storing the classical image information into a quantum computer, i.e., quantum image preparation, (2) Processing the quantum image by using quantum image processing algorithms, (3) Retrieving the classical image from a quantum system, i.e., quantum measurement. This section proposes QRCI representation model. Besides, the details about how to store a color digital image into QRCI and the procedure to retrieve the classical image from a QRCI quantum system accurately will be given.

We assume a color digital image with size 2𝑛 × 2𝑛 is needed to be stored in QRCI and the gray value of every channel (R, G, B) ranges from 0 to 255. For the pixel (𝑌 , 𝑋) in the 𝐿th bit-plane, the color information 𝐶𝐿 (𝑌 , 𝑋) of three channels can be encoded by: 𝐶𝐿 (𝑌 , 𝑋) = 𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 149

(3)

L. Wang, Q. Ran, J. Ma et al.

Optics Communications 438 (2019) 147–158 Table 1 Comparisons of three quantum color image representation models. Model

Qubits

Color encoding

Retrieval result

MCQI [9] NCQI [13] QRCI

2𝑛 + 3 2𝑛 + 24 2𝑛 + 6

Amplitudes Basis states Basis states

Probability Accuracy Accuracy

Fig. 9. Simulation results of channel swapping operations: (a) a 256 × 256 color digital image ‘‘Peppers’’, (b) the result of operation 𝑈𝑅𝐺 , (c) the result of operation 𝑈𝑅𝐵 , (d) the result of operation 𝑈𝐺𝐵 .

Fig. 12. Notations of quantum gates: (a) 𝑉11 (𝑋) gate, (b) 𝑉23 (𝑋) gate.

|𝐿𝑌 𝑋⟩ = |𝐿⟩ |𝑌 ⟩ |𝑋⟩ = ||𝐿2 𝐿1 𝐿0 ⟩ ||𝑌𝑛−1 𝑌𝑛−2 … 𝑌0 ⟩ ||𝑋𝑛−1 𝑋𝑛−2 … 𝑋0 ⟩

(5)

where |𝐿⟩ and |𝑌 𝑋⟩ represent the bit-plane information and the position information, respectively; ||𝐶𝐿 (𝑌 , 𝑋)⟩ denotes the corresponding color information of pixel (𝑌 , 𝑋) in the 𝐿th bit-plane. Fig. 10. Bit-plane reversing operation 𝑈𝑅 : (a) the quantum circuit of 𝑈𝑅 , (b) a 256 × 256 color digital image ‘‘Peppers’’, (c) the result of operation 𝑈𝑅 . (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

Eq. (4) indicates that the whole QRCI is stored into a normalized quantum superposition state and quantum image color operations can be performed on all pixels simultaneously. For a color digital image with size 2𝑛 × 2𝑛 , the comparison results of three quantum color image representation models are compiled in Table 1. From Table 1, it can be seen that MCQI needs fewest qubits than others. However, MCQI is difficult to retrieve classical image accurately since it makes use of probability amplitudes of quantum states to store color information. Ensuring accurate retrieval of classical image, when the color information is stored by basis states of qubit sequences, the storage capacity of QRCI improves 218 times than NCQI. In other words, the new proposed QRCI representation model can save more storage space.

where 𝑅𝐿𝑌 𝑋 , 𝐺𝐿𝑌 𝑋 , 𝐵𝐿𝑌 𝑋 ∈ {0, 1}, 𝐿 = 0, 1, … , 7 and 𝑌 , 𝑋 = 0, 1, … , 2𝑛 − 1. The color digital image with size 2𝑛 × 2𝑛 can be represented by QRCI as the following equation: 3

𝑛

𝑛

−1 −1 2∑ 2∑ −1 2∑ 1 |𝐶𝐿 (𝑌 , 𝑋)⟩ ⊗ |𝐿𝑌 𝑋⟩ |𝐼⟩ = √ | 22𝑛+3 𝐿=0 𝑌 =0 𝑋=0

1

= √ 22𝑛+3

3 −1 2𝑛 −1 2𝑛 −1 2∑ ∑ ∑

𝐿=0 𝑌 =0 𝑋=0

(4)

The quantum circuit of QRCI representation model is designed in Fig. 2.

|𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩ |

Fig. 11. Bit-planes of the color image in Fig. 10(c): (a) bit-planes of R channel, (b) bit-planes of G channel, (c) bit-planes of B channel.

150

L. Wang, Q. Ran, J. Ma et al.

Optics Communications 438 (2019) 147–158

Step 1 Initialize quantum state. To begin with, the quantum state is initialized as follows: |𝐼⟩0 = |0⟩⊗2𝑛+6

(7)

Step 2 Store the bit-plane information and position information. Two common quantum gates, i.e., identity gate and Hadamard gate, are shown as: [ ] [ ] 1 0 1 1 1 𝐼= ,𝐻 = √ (8) 0 1 2 1 −1 Operation 𝑈1 which is composed of 3 identity gates and 2𝑛 + 3 Hadamard gates is constructed as below: 𝑈1 = 𝐼 ⊗3 ⊗ 𝐻 ⊗2𝑛+3

Fig. 13. Bit-plane translation operation 𝑈𝑇 : (a) the quantum circuit of 𝑈𝑇 , (b) a 256 × 256 color digital image ‘‘Peppers’’, (c) the result of operation 𝑈𝑇 . (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

(9)

By performing 𝑈1 on the initial state |𝐼⟩0 , the middle state |𝐼⟩1 is obtained: |𝐼⟩1 = 𝑈1 |𝐼⟩0 = (𝐼 |0⟩)⊗3 ⊗ (𝐻 |0⟩)⊗2𝑛+3

Fig. 3 shows a color digital image with size 2 × 2. On the basis of Eq. (4), the corresponding QRCI quantum state is as follows:

1

= √ 22𝑛+3

1 [ |𝐼⟩ = √ |100⟩ (|000⟩ + |001⟩ + |010⟩ + |011⟩ + |100⟩ + |101⟩ + |110⟩ 25

3 −1 2𝑛 −1 2𝑛 −1 2∑ ∑ ∑

⊗3

|0⟩

(10) ⊗ |𝐿𝑌 𝑋⟩

𝐿=0 𝑌 =0 𝑋=0

Step 3 Store the color information. 22𝑛+3 sub-operations are required to store the color information for all pixels in all 8 bit-planes. For pixel (𝑌 , 𝑋) in the 𝐿th bit-plane, the quantum sub-operation is expressed in the following equation:

+ |111⟩) |00⟩ + |010⟩ (|000⟩ + |001⟩ + |010⟩ + |011⟩ + |100⟩ + |101⟩ + |110⟩ + |111⟩) |01⟩ + |001⟩ (|000⟩ + |001⟩ + |010⟩ + |011⟩ + |100⟩ + |101⟩ + |110⟩ + |111⟩) |10⟩ + |111⟩ (|000⟩ + |001⟩ + |010⟩ + |011⟩ ] + |100⟩ + |101⟩ + |110⟩ + |111⟩) |11⟩

23 −1 2𝑛 −1

𝑈𝐿𝑌 𝑋 = 𝐼 ⊗3 ⊗

∑∑

2𝑛 −1



𝑅 𝛺𝐺 𝛺𝐵 ⊗ |𝐿𝑌 𝑋⟩ ⟨𝐿𝑌 𝑋| |𝑠𝑘𝑢⟩ ⟨𝑠𝑘𝑢| + 𝛺𝐿𝑌 𝑋 𝐿𝑌 𝑋 𝐿𝑌 𝑋

𝑠=0 𝑘=0 𝑢=0,𝑠𝑘𝑢≠𝐿𝑌 𝑋

(6)

(11) 𝐽 where 𝛺𝐿𝑌 represents the quantum oracle to store the binary informa𝑋 tion of 𝐽 channel of pixel (𝑌 , 𝑋) in the 𝐿th bit-plane, 𝐽 ∈ {𝑅, 𝐺, 𝐵}. The 𝐽 function of 𝛺𝐿𝑌 is described as below: 𝑋

3.2. Preparation of QRCI representation The preparation of QRCI transforms an initialized quantum state to the desired quantum state as shown in Eq. (4). Fig. 4 describes the flowchart of preparing QRCI representation. The whole preparation consists of three steps as follows.

𝐽 | 𝛺𝐿𝑌 𝑋 ∶ |0⟩ → |0 ⊕ 𝐽𝐿𝑌 𝑋 ⟩ 𝐽 𝛺𝐿𝑌 𝑋

(12)

where denotes a (2𝑛 + 3)-CNOT gate when 𝐽𝐿𝑌 𝑋 = 1; Otherwise, 𝐽 𝛺𝐿𝑌 denotes an identity gate. 𝑋

Fig. 14. Bit-planes of the color image in Fig. 13(c): (a) bit-planes of R channel, (b) bit-planes of G channel, (c) bit-planes of B channel.

151

L. Wang, Q. Ran, J. Ma et al.

Optics Communications 438 (2019) 147–158

Fig. 15. The quantum circuits of bit-plane exchanging operations in the QRCI model: (a) 𝑈𝐸1 , (b) 𝑈𝐸2 , (c) 𝑈𝐸3 .

The result of applying sub-operation 𝑈𝐿𝑌 𝑋 to the middle state |𝐼⟩1 is shown as follows: 𝑈𝐿𝑌 𝑋 |𝐼⟩1 23 −1 2𝑛 −1 2𝑛 −1 ⎛ ⎞ ∑∑ ∑ 𝑅 𝐺 𝐵 ⎟ = ⎜𝐼 ⊗3 ⊗ |𝑠𝑘𝑢⟩ ⟨𝑠𝑘𝑢| + 𝛺𝐿𝑌 𝑋 𝛺𝐿𝑌 𝑋 𝛺𝐿𝑌 𝑋 ⊗ |𝐿𝑌 𝑋⟩ ⟨𝐿𝑌 𝑋|⎟ ⎜ 𝑠=0 𝑘=0 𝑢=0,𝑠𝑘𝑢≠𝐿𝑌 𝑋 ⎝ ⎠ 23 −1 2𝑛 −1 2𝑛 −1 ⎛ ⎞ ∑ ∑ ∑ ⊗3 1 × ⎜√ |0⟩ ⊗ |𝑠𝑘𝑢⟩⎟ ⎜ 22𝑛+3 𝑠=0 𝑘=0 𝑢=0 ⎟ ⎝ ⎠

1 =√ 22𝑛+3

3 −1 2𝑛 −1 2𝑛 −1 ⎛2∑ ⎞ ∑ ∑ ⎜ |0⟩⊗3 ⊗ |𝑠𝑘𝑢⟩ + ||0 ⊕ 𝑅𝐿𝑌 𝑋 ⟩ ||0 ⊕ 𝐺𝐿𝑌 𝑋 ⟩ ||0 ⊕ 𝐵𝐿𝑌 𝑋 ⟩ |𝐿𝑌 𝑋⟩⎟ ⎟ ⎜ 𝑠=0 𝑘=0 𝑢=0,𝑠𝑘𝑢≠𝐿𝑌 𝑋 ⎠ ⎝

1 =√ 22𝑛+3

3 −1 2𝑛 −1 2𝑛 −1 ⎛2∑ ⎞ ∑ ∑ ⎜ |0⟩⊗3 ⊗ |𝑠𝑘𝑢⟩ + ||𝐶𝐿 (𝑌 , 𝑋)⟩ |𝐿𝑌 𝑋⟩⎟ ⎜ 𝑠=0 𝑘=0 𝑢=0,𝑠𝑘𝑢≠𝐿𝑌 𝑋 ⎟ ⎝ ⎠

Fig. 16. Bit-plane exchanging operation 𝑈𝐸4 : (a) the quantum circuit of 𝑈𝐸4 , (b) a 256 × 256 color digital image ‘‘Peppers’’, (c) the result of operation 𝑈𝐸4 . (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

(13) Eq. (13) illustrates that every sub-operation 𝑈𝐿𝑌 𝑋 only stores the color information of pixel (𝑌 , 𝑋) in the 𝐿th bit-plane. To store the color information for all positions and bit-planes, the operation 𝑈2 is designed as the following: 𝑈2 =

3 −1 2𝑛 −1 2𝑛 −1 2∏ ∏ ∏

By performing 𝛤 on QRCI quantum state |𝐼⟩ in Eq. (4), ||𝑃𝐿𝑌 𝑋 ⟩ which contains the information of pixel (𝑌 , 𝑋) in the 𝐿th bit-plane can be obtained as:

(14)

𝑈𝐿𝑌 𝑋

|𝑃 | | 𝐿𝑌 𝑋 ⟩ = |𝐶𝐿 (𝑌 , 𝑋)⟩ ⊗ |𝐿𝑌 𝑋⟩

𝐿=0 𝑌 =0 𝑋=0

Performing 𝑈2 on |𝐼⟩1 , the final state is obtained as: 1

𝑈2 |𝐼⟩1 = √ 22𝑛+3

3 −1 2𝑛 −1 2𝑛 −1 2∑ ∑ ∑

𝑅 𝛺𝐿𝑌 𝑋

𝐺 |0⟩ 𝛺𝐿𝑌 𝑋

𝐵 |0⟩ 𝛺𝐿𝑌 𝑋

The projective measurement 𝑀 is constructed as below: 𝑀=

|0⟩ ⊗ |𝐿𝑌 𝑋⟩

𝑛

(15)

=

3 −1 2∑

𝑔=0

𝑔⟨𝐶𝐿 (𝑌 , 𝑋)| (|𝑔⟩ ⟨𝑔|) ||𝐶𝐿 (𝑌 , 𝑋)⟩

(19)

= 𝐶𝐿 (𝑌 , 𝑋)

3.3. Image retrieving

From Eq. (19), it can be seen that if all pixels in all bit-planes are retrieved, the classical color image can be retrieved from QRCI quantum state accurately.

Because images stored as quantum states cannot be recognized by human eyes, efficiently retrieving classical images from quantum systems is an important process. Measurement is a unique way to recover the classical image from a quantum state. The quantum measurement is defined as follows: |𝐼⟩⊗3 ⊗ |𝐿𝑌 𝑋⟩ ⟨𝐿𝑌 𝑋|

(18)

3 −1 ⎛2∑ ⎞ ⟨𝐶𝐿 (𝑌 , 𝑋)|𝑀 ||𝐶𝐿 (𝑌 , 𝑋)⟩ = ⟨𝐶𝐿 (𝑌 , 𝑋)| ⎜ 𝑔 |𝑔⟩ ⟨𝑔|⎟ ||𝐶𝐿 (𝑌 , 𝑋)⟩ ⎜ 𝑔=0 ⎟ ⎝ ⎠

After these three steps, the whole preparation of QRCI has been completed. Fig. 5 demonstrates the quantum circuit for color image in the QRCI described in Eq. (6).

3 −1 2𝑛 −1 2𝑛 −1 2∑ ∑ ∑

𝑔 |𝑔⟩ ⟨𝑔|

The color information can be retrieved by applying 𝑀 to ||𝑃𝐿𝑌 𝑋 ⟩. For the pixel (𝑌 , 𝑋) in the 𝐿th bit-plane, the accurate value of color information is equivalent to the expectation value ⟨𝐶𝐿 (𝑌 , 𝑋)|| 𝑀 ||𝐶𝐿 (𝑌 , 𝑋)⟩:

𝑛

2∑ −1 2∑ −1 2∑ −1 1 |𝐶𝐿 (𝑌 , 𝑋)⟩ ⊗ |𝐿𝑌 𝑋⟩ = √ | 22𝑛+3 𝐿=0 𝑌 =0 𝑋=0 = |𝐼⟩

𝛤 =

3 −1 2∑

𝑔=0

𝐿=0 𝑌 =0 𝑋=0 3

(17)

4. Some quantum color image processing operations concerning channels and bit-planes based on QRCI In this section, some quantum color image processing operations concerning channels and bit-planes based on QRCI are discussed, and

(16)

𝐿=0 𝑌 =0 𝑋=0

152

L. Wang, Q. Ran, J. Ma et al.

Optics Communications 438 (2019) 147–158

Fig. 17. Bit-planes of the color image in Fig. 16(c): (a) bit-planes of R channel, (b) bit-planes of G channel, (c) bit-planes of B channel.

the corresponding quantum circuits are designed. Moreover, a color digital image with size 256 × 256 is used as an example to verify these operations. Since the lack of quantum hardware, the simulation experiments are implemented on a desktop with Intel(R) Pentium(R) CPU G4560 @3.50 GHz 4.00 GB RAM 64 bit operating system equipped with the MATLAB R2016a environment. 4.1. Color complement operation QRCI makes use of only 3 qubits to store the color information of a color digital image. Therefore, the color complement operation of an image with size 2𝑛 ×2𝑛 can be implemented by utilizing three NOT gates, i.e., the color complement operation 𝑈𝐶 is defined as Eq. (20): 𝑈𝐶 = 𝑋 ⊗3 ⊗ 𝐼 ⊗2𝑛+3

Fig. 18. The quantum circuit of color transformation 𝑈 . (For interpretation of the references to color in this figure legend, the reader is referred to the web version of this article.)

(20)

where 𝑋 denotes the quantum NOT gate: [ ] 0 1 𝑋= = |0⟩ ⟨1| + |1⟩ ⟨0| 1 0

information of three channels of a color digital image. Therefore, 𝑈𝑅𝐺 , 𝑈𝑅𝐵 , 𝑈𝐺𝐵 are defined as follows:

(21)

By performing 𝑈𝐶 on the state |𝐼⟩ in Eq. (4), one can get the following output: 3

𝑛

𝑛

2 −1 2 −1 2 −1 ∑∑∑ ( ) 1 |𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩ 𝑈𝐶 |𝐼⟩ = 𝑋 ⊗3 ⊗ 𝐼 ⊗2𝑛+3 √ | 22𝑛+3 𝐿=0 𝑌 =0 𝑋=0

1

=√ 22𝑛+3

23 −1 2𝑛 −1 2𝑛 −1

∑∑∑

|1 − 𝑅 | | 𝐿𝑌 𝑋 ⟩ |1 − 𝐺𝐿𝑌 𝑋 ⟩ |1 − 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩ |

𝑈𝑅𝐺 = 𝑠𝑤𝑎𝑝 ⊗ 𝐼 ⊗2𝑛+4

(23)

𝑈𝑅𝐵 = 𝑠𝑤𝑎𝑝 (3) ⊗ 𝐼 ⊗2𝑛+3

(24)

𝑈𝐺𝐵 = 𝐼 ⊗ 𝑠𝑤𝑎𝑝 ⊗ 𝐼 ⊗2𝑛+3

(25)

(22)

where, 𝑠𝑤𝑎𝑝 gate and 𝑠𝑤𝑎𝑝 (3) gate are shown in Fig. 7. It can be seen that both 𝑠𝑤𝑎𝑝 gate and 𝑠𝑤𝑎𝑝 (3) gate can be broken down into three controlled-NOT gates.

Fig. 6(a) gives the quantum circuit of color complement operation 𝑈𝐶 in QRCI model. Taking the color digital image ‘‘Peppers’’ shown in Fig. 6(b) as an example, the simulation result of operation 𝑈𝐶 is demonstrated in Fig. 6(c).

By performing operations 𝑈𝑅𝐺 , 𝑈𝑅𝐵 and 𝑈𝐺𝐵 on the state |𝐼⟩ in Eq. (4) respectively, the results obtained are as below:

𝐿=0 𝑌 =0 𝑋=0

3

𝑛

𝑛

2 −1 2 −1 2 −1 ∑∑∑ ( ) 1 |𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩ 𝑈𝑅𝐺 |𝐼⟩ = 𝑠𝑤𝑎𝑝 ⊗ 𝐼 ⊗2𝑛+4 √ | 2𝑛+3 𝐿=0 𝑌 =0 𝑋=0 2

4.2. Channel swapping operation

=√

The channel swapping operations are operations 𝑈𝑅𝐺 , 𝑈𝑅𝐵 and 𝑈𝐺𝐵 , which can achieve the goals of swapping the value of R and G, R and B, G and B, respectively. QRCI makes use of 3 qubits to store the color

1

23 −1 2𝑛 −1 2𝑛 −1

∑∑∑

22𝑛+3 𝐿=0 𝑌 =0 𝑋=0

| |𝐺 | | 𝐿𝑌 𝑋 ⟩ |𝑅𝐿𝑌 𝑋 ⟩ |𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩

(26) 153

L. Wang, Q. Ran, J. Ma et al.

Optics Communications 438 (2019) 147–158

Fig. 19. Eight color digital images and the transformed ones after applying color transformation 𝑈 (256 × 256): (a) Lena, (b) Baboon, (c) Peppers, (d) Splash, (e) Lake, (f) House, (g) Airplane, (h) Earth, (i) transformed Lena, (j) transformed Baboon, (k) transformed Peppers, (l) transformed Splash, (m) transformed Lake, (n) transformed House, (o) transformed Airplane, (p) transformed Earth.

(

𝑈𝑅𝐵 |𝐼⟩ = 𝑠𝑤𝑎𝑝 (3) ⊗ 𝐼 =√

1

⊗2𝑛+3

)

23 −1 2𝑛 −1 2𝑛 −1

∑∑∑

22𝑛+3 𝐿=0 𝑌 =0 𝑋=0



1 22𝑛+3

23 −1 2𝑛 −1 2𝑛 −1

∑∑∑

𝐿=0 𝑌 =0 𝑋=0

where, 𝑉11 (𝑋) gate (i.e., controlled-NOT gate) and 𝑉23 (𝑋) gate (i.e., Toffoli gate) [4] are shown ( in Fig. ) 12. ( ) 1 𝑖 1 −𝑖 † = 1+𝑖 Therein, 𝑉 = 1−𝑖 and 𝑉 , namely, 𝑉 and 2 2 𝑖 1 −𝑖 1 † † 𝑉 are the square roots of NOT gate, i.e., 𝑉 × 𝑉 = 𝑉 × 𝑉 † = 𝑋. From Fig. 12(b), it can be seen that one 𝑉23 (𝑋) gate can be implemented by five 2 qubit gates including two controlled-NOT gates, two controlled-𝑉 gates and one controlled-𝑉 † gate. By performing operation 𝑈𝑇 on the state |𝐼⟩ in Eq. (4), the following quantum state:

|𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩ |

| | |𝐵 | 𝐿𝑌 𝑋 ⟩ |𝐺𝐿𝑌 𝑋 ⟩ |𝑅𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩

(27) 3

𝑛

𝑛

2 −1 2 −1 2 −1 ∑∑∑ ( ) 1 |𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩ 𝑈𝐺𝐵 |𝐼⟩ = 𝐼 ⊗ 𝑠𝑤𝑎𝑝 ⊗ 𝐼 ⊗2𝑛+3 √ | 22𝑛+3 𝐿=0 𝑌 =0 𝑋=0 3

𝑛

𝑛

2 −1 2 −1 2 −1 ∑∑∑ 1 |𝑅𝐿𝑌 𝑋 ⟩ |𝐵𝐿𝑌 𝑋 ⟩ |𝐺𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩ =√ | | | 22𝑛+3 𝐿=0 𝑌 =0 𝑋=0

3

𝑛

𝑛

2 −1 2 −1 2 −1 ∑∑∑ 1 |𝑅𝐿𝑌 𝑋 ⟩ |𝐺𝐿𝑌 𝑋 ⟩ |𝐵𝐿𝑌 𝑋 ⟩ ⊗ |(𝐿 + 7) mod 8⟩ ⊗ |𝑌 𝑋⟩ 𝑈𝑇 |𝐼⟩ = √ | | | 22𝑛+3 𝐿=0 𝑌 =0 𝑋=0

(28)

(32)

The quantum circuits of operations 𝑈𝑅𝐺 , 𝑈𝑅𝐵 and 𝑈𝐺𝐵 are designed as illustrated in Fig. 8. Applying operations 𝑈𝑅𝐺 , 𝑈𝑅𝐵 and 𝑈𝐺𝐵 to the image shown in Fig. 9(a), respectively, Figs. 9(b)–9(d) depict the simulation results.

is obtained, where mod is a modulo operation. Fig. 13 gives the quantum circuit of bit-plane translation operation 𝑈𝑇 in QRCI model, with the color digital image ‘‘Peppers’’ as an example. Fig. 14 demonstrates the simulation results of bit-planes of the color image in Fig. 13(c).

4.3. Bit-plane reversing operation

4.5. Bit-plane exchanging operation

QRCI makes use of 3 qubits to store the bit-plane information of a color digital image. Therefore, the reverse order of bit-planes of a color digital image with size 2𝑛 × 2𝑛 can be implemented by utilizing three NOT gates, i.e., the bit-plane reversing operation 𝑈𝑅 is defined in the following equation: 𝑈𝑅 = 𝐼 ⊗3 ⊗ 𝑋 ⊗3 ⊗ 𝐼 ⊗2𝑛

First, three bit-plane exchanging operations based on QRCI model, i.e., 𝑈𝐸1 , 𝑈𝐸2 and 𝑈𝐸3 , are defined as the following equations:

(29)

By executing 𝑈𝑅 on the state |𝐼⟩ in Eq. (4), the following output can be gained: 3

𝑛

𝑛

(33)

𝑈𝐸2 = 𝐼 ⊗3 ⊗ 𝑠𝑤𝑎𝑝 ⊗ 𝐼 ⊗2𝑛+1

(34)

𝑈𝐸3 = 𝐼 ⊗3 ⊗ 𝑠𝑤𝑎𝑝 (3) ⊗ 𝐼 ⊗2𝑛

(35)

By applying the bit-plane exchanging operations 𝑈𝐸1 , 𝑈𝐸2 and 𝑈𝐸3 to the state |𝐼⟩ in Eq. (4) respectively, the results obtained are as below:

𝑛

2 −1 2 −1 2 −1 ∑∑∑ ( ) 1 |𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩ 𝑈𝑅 |𝐼⟩ = 𝐼 ⊗3 ⊗ 𝑋 ⊗3 ⊗ 𝐼 ⊗2𝑛 √ | 2𝑛+3 𝐿=0 𝑌 =0 𝑋=0 2 3

𝑈𝐸1 = 𝐼 ⊗4 ⊗ 𝑠𝑤𝑎𝑝 ⊗ 𝐼 ⊗2𝑛

3

𝑛

𝑛

3

𝑛

𝑛

2 −1 2 −1 2 −1 ∑∑∑ ( ) 1 |𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩ 𝑈𝐸1 |𝐼⟩ = 𝐼 ⊗4 ⊗ 𝑠𝑤𝑎𝑝 ⊗ 𝐼 ⊗2𝑛 √ | 2𝑛+3 𝐿=0 𝑌 =0 𝑋=0 2

𝑛

2 −1 2 −1 2 −1 ∑∑∑ 1 |𝑅𝐿𝑌 𝑋 ⟩ |𝐺𝐿𝑌 𝑋 ⟩ |𝐵𝐿𝑌 𝑋 ⟩ ⊗ |7 − 𝐿⟩ ⊗ |𝑌 𝑋⟩ =√ | | | 2𝑛+3 𝐿=0 𝑌 =0 𝑋=0 2

2 −1 2 −1 2 −1 ∑∑∑ ( ) 1 |𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿2 𝐿1 𝐿0 ⟩ ⊗ |𝑌 𝑋⟩ = 𝐼 ⊗4 ⊗ 𝑠𝑤𝑎𝑝 ⊗ 𝐼 ⊗2𝑛 √ | | 2𝑛+3 𝐿=0 𝑌 =0 𝑋=0 2

(30)

3

𝑛

𝑛

2 −1 2 −1 2 −1 ∑∑∑ 1 |𝑅𝐿𝑌 𝑋 ⟩ |𝐺𝐿𝑌 𝑋 ⟩ |𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿2 𝐿0 𝐿1 ⟩ ⊗ |𝑌 𝑋⟩ =√ | | | | 22𝑛+3 𝐿=0 𝑌 =0 𝑋=0

Fig. 10 shows the quantum circuit of bit-plane reversing operation 𝑈𝑅 in QRCI model, with the color digital image ‘‘Peppers’’ as an example. Fig. 11 describes the simulation results of bit-planes of the color image in Fig. 10(c).

(36) (

𝑈𝐸2 |𝐼⟩ = 𝐼 ⊗3 ⊗ 𝑠𝑤𝑎𝑝 ⊗ 𝐼

) ⊗2𝑛+1



1 22𝑛+3

23 −1 2𝑛 −1 2𝑛 −1

∑∑∑

𝐿=0 𝑌 =0 𝑋=0 3

𝑛

2 −1 2 −1 2 −1 ∑∑∑ ( ) 1 |𝑅 | = 𝐼 ⊗3 ⊗ 𝑠𝑤𝑎𝑝 ⊗ 𝐼 ⊗2𝑛+1 √ | 𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿2 𝐿1 𝐿0 ⟩ ⊗ |𝑌 𝑋⟩ 22𝑛+3 𝐿=0 𝑌 =0 𝑋=0

4.4. Bit-plane translation operation

3

The bit-plane translation operation is defined as follows: ( )( )( ) 𝑈𝑇 = 𝐼 ⊗(2𝑛+3) ⊗ 𝑉23 (𝑋) 𝐼 ⊗(2𝑛+4) ⊗ 𝑉11 (𝑋) 𝐼 ⊗(2𝑛+5) ⊗ 𝑋

𝑛

|𝑅 | 𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩

𝑛

𝑛

2 −1 2 −1 2 −1 ∑∑∑ 1 |𝑅 | | | =√ | 𝐿𝑌 𝑋 ⟩ |𝐺𝐿𝑌 𝑋 ⟩ |𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿1 𝐿2 𝐿0 ⟩ ⊗ |𝑌 𝑋⟩ 22𝑛+3 𝐿=0 𝑌 =0 𝑋=0

(37)

(31) 154

L. Wang, Q. Ran, J. Ma et al.

Optics Communications 438 (2019) 147–158

Fig. 20. The histogram distributions: (a) R channel of Baboon, (b) G channel of Baboon, (c) B channel of Baboon, (d) R channel of transformed Baboon, (e) G channel of transformed Baboon, (f) B channel of transformed Baboon.

4.6. A color transformation designed by combining the above operations 3

𝑛

𝑛

2 −1 2 −1 2 −1 ∑∑∑ ( ) 1 |𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩ 𝑈𝐸3 |𝐼⟩ = 𝐼 ⊗3 ⊗ 𝑠𝑤𝑎𝑝 (3) ⊗ 𝐼 ⊗2𝑛 √ | 22𝑛+3 𝐿=0 𝑌 =0 𝑋=0

(

= 𝐼 ⊗3 ⊗ 𝑠𝑤𝑎𝑝 (3) ⊗ 𝐼 23 −1 2𝑛 −1 2𝑛 −1

1

=√ 22𝑛+3

∑∑∑

) ⊗2𝑛

23 −1 2𝑛 −1 2𝑛 −1

1

√ 22𝑛+3

∑∑∑

𝐿=0 𝑌 =0 𝑋=0

By combining the above operations, a color transformation 𝑈 is designed as follows:

|𝑅 | | 𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿2 𝐿1 𝐿0 ⟩ ⊗ |𝑌 𝑋⟩

𝑈 = 𝑈𝐸4 𝑈𝑇 𝑈𝑅 𝑈𝐺𝐵 𝑈𝑅𝐺 𝑈𝐶

|𝑅𝐿𝑌 𝑋 ⟩ |𝐺𝐿𝑌 𝑋 ⟩ |𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿0 𝐿1 𝐿2 ⟩ ⊗ |𝑌 𝑋⟩ | | | |

(41)

Then, by combining 𝑈𝐸1 and 𝑈𝐸3 , bit-plane exchanging operation 𝑈𝐸4 is defined in Eq. (39):

Fig. 18 illustrates the quantum circuit of color transformation 𝑈 . Fig. 19(a)–19(h) display eight color digital images and the transformed ones after applying color transformation 𝑈 are shown in Fig. 19(i)–19(p). Furthermore, the histograms of color image ‘‘Baboon’’ and the corresponding transformed one are shown in Fig. 20. Simulation results in Figs. 19 and 20 demonstrate that the designed color transformation 𝑈 is effective. It can change the distribution of pixel values to some extent.

𝑈𝐸4 = 𝑈𝐸3 𝑈𝐸1

4.7. Comparison analysis of the above operations for QRCI and NCQI

𝐿=0 𝑌 =0 𝑋=0

(38) Fig. 15 shows the quantum circuits of bit-plane exchanging operations 𝑈𝐸1 , 𝑈𝐸2 and 𝑈𝐸3 .

(39)

For a quantum operation, quantum cost (i.e., time complexity) is an important performance indicator. Therefore, in this subsection, quantum costs of these image processing operations mentioned above for QRCI and NCQI are compared and analyzed. In this paper, the quantum gate cost evaluation method introduced in Ref. [28] is adopted. According to Ref. [28], the quantum cost of each of 2 qubit gates (controlled-NOT gate, controlled-𝑉 gate and controlled-𝑉 † gate) is 1, which far exceeds the cost of 1 qubit gate (NOT gate). Assuming that NOT gate has a quantum cost of 𝛿, the costs of some quantum gates are listed in Table 2. For NCQI, color complement operation, channel swapping operation, bit-plane reversing operation, bit-plane translation operation and bitplane exchanging operation are implemented by the quantum circuits in Fig. 21. Fig. 21(a) implements the color complement operation and Fig. 21(b)–21(d) implement three channel swapping operations. Figs. 21(e) and 21(f) implement reversing, and translation operation of

Eq. (40) gives the result of performing 𝑈𝐸4 on the state |𝐼⟩ in Eq. (4):

3

𝑛

𝑛

3

𝑛

𝑛

2 −1 2 −1 2 −1 ∑∑∑ ( ) 1 |𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿𝑌 𝑋⟩ 𝑈𝐸4 |𝐼⟩ = 𝑈𝐸3 𝑈𝐸1 √ | 22𝑛+3 𝐿=0 𝑌 =0 𝑋=0 2 −1 2 −1 2 −1 ∑∑∑ ) ( 1 |𝑅𝐿𝑌 𝑋 𝐺𝐿𝑌 𝑋 𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿2 𝐿1 𝐿0 ⟩ ⊗ |𝑌 𝑋⟩ = 𝑈𝐸3 𝑈𝐸1 √ | | 2𝑛+3 𝐿=0 𝑌 =0 𝑋=0 2

=√

1

23 −1 2𝑛 −1 2𝑛 −1

∑∑∑

22𝑛+3 𝐿=0 𝑌 =0 𝑋=0

|𝑅𝐿𝑌 𝑋 ⟩ |𝐺𝐿𝑌 𝑋 ⟩ |𝐵𝐿𝑌 𝑋 ⟩ ⊗ |𝐿1 𝐿0 𝐿2 ⟩ ⊗ |𝑌 𝑋⟩ | | | |

(40) The quantum circuit of bit-plane exchanging operation 𝑈𝐸4 and simulation results are shown in Figs. 16 and 17. 155

L. Wang, Q. Ran, J. Ma et al.

Optics Communications 438 (2019) 147–158

Fig. 21. The quantum circuits of color complement operation, channel swapping operation, bit-plane reversing operation, bit-plane translation operation and bit-plane exchanging operation for NCQI.

Fig. 22. The quantum circuit of designed color transformation for NCQI.

156

L. Wang, Q. Ran, J. Ma et al.

Optics Communications 438 (2019) 147–158

Table 2 The costs of some quantum gates. Quantum gate

Cost

NOT gate Controlled-NOT gate (i.e., 𝑉11 (𝑋) gate) Swap gate Toffoli gate (i.e., 𝑉23 (𝑋) gate)

𝛿≪1 1 3 5

in Section 4.6 could change the distribution of pixel values effectively. How to devise a secure quantum color image encryption algorithm by combining this color transformation with other operations is our future work. 2. More complex operations Classical image processing contains many contents, such as color processing, intensity transformation, filtering in the spatial and frequency domain, image compression, restoration, morphology, segmentation and so on. Compared with classical image processing, the operations in QImP field are too little. More complex quantum image processing operations based on QRCI are needed to be discussed.

Table 3 Quantum costs of some color image processing operations for QRCI and NCQI. Quantum image processing operation Color complement operation 𝑈𝐶 Channel swapping operation 𝑈𝑅𝐺 Channel swapping operation 𝑈𝑅𝐵 Channel swapping operation 𝑈𝐺𝐵 Bit-plane reversing operation 𝑈𝑅 Bit-plane translation operation 𝑈𝑇 Bit-plane exchanging operation 𝑈𝐸1 Bit-plane exchanging operation 𝑈𝐸2 Bit-plane exchanging operation 𝑈𝐸3 Bit-plane exchanging operation 𝑈𝐸4 The designed color transformation 𝑈

Quantum cost QRCI

NCQI

3𝛿 3 3 3 3𝛿 6+𝛿 ≈6 3 3 3 6 18 + 7𝛿 ≈ 18

24𝛿 24 24 24 36 63 18 18 18 36 183 + 24𝛿 ≈ 183

Acknowledgments This work was supported by an excellent team at the Harbin Institute of Technology. References [1] P. Benioff, The computer as a physical system: A microscopic quantum mechanical Hamiltonian model of computers as represented by Turing machines, J. Stat. Phys. 22 (5) (1980) 563–591, http://dx.doi.org/10.1007/BF01011339. [2] R.P. Feynman, Simulating physics with computers, Internat. J. Theoret. Phys. 21 (6) (1982) 467–488, http://dx.doi.org/10.1007/BF02650179. [3] S. Caraiman, V. Manta, Image processing using quantum computing, in: 2012 16th International Conference on System Theory, Control and Computing, ICSTCC, 2012, pp. 1–6, URL https://b.glgoo.top/scholar?hl=zh-CN&as_sdt=0%2C5&q=Image+ processing+using+quantum+computing&btnG=. [4] M.A. Nielsen, I.L. Chuang, Quantum Computation and Quantum Information, Cambridge University Press, Cambridge, 2000, URL http://mmrc.amss.cas.cn/tlb/ 201702/W020170224608149940643.pdf. [5] S.E. Venegas-Andraca, S. Bose, Storing, processing and retrieving an image using quantum mechanics, Proc. SPIE - Int. Soc. Opt. Eng. 5105 (2003) http://dx.doi.org/10.1117/12.485960, URL https://www.spiedigitallibrary.org/ conference-proceedings-of-spie/5105/0000/Storing-processing-and-retrievingan-image-using-quantum-mechanics/10.1117/12.485960.full. [6] J.I. Latorre, Image compression and entanglement, 2005, arXiv preprint quantph/0510031, URL https://arxiv.org/abs/quant-ph/0510031. [7] S.E. Venegas-Andraca, J.L. Ball, Processing images in entangled quantum systems, Quantum Inf. Process. 9 (1) (2010) 1–11, http://dx.doi.org/10.1007/s11128-0090123-z. [8] P.Q. Le, F. Dong, K. Hirota, A flexible representation of quantum images for polynomial preparation, image compression, and processing operations, Quantum Inf. Process. 10 (1) (2011) 63–84, http://dx.doi.org/10.1007/s11128-010-0177-y. [9] B. Sun, A.M. Iliyasu, F. Yan, F. Dong, K. Hirota, An RGB multi-channel representation for images on quantum computers, J. Adv. Comput. Intell. Intell. Informatics 17 (3) (2013) 404–417, http://dx.doi.org/10.20965/jaciii.2013.p0404, URL https: //www.fujipress.jp/jaciii/jc/jacii001700030404/. [10] H.S. Li, Q.X. Zhu, R.G. Zhou, M.C. Li, L. Song, H. Ian, Multidimensional color image storage, retrieval, and compression based on quantum amplitudes and phases, Inform. Sci. 273 (2014) 212–232, http://dx.doi.org/10.1016/j.ins.2014.03.035, URL http://www.sciencedirect.com/science/article/pii/S0020025514003193. [11] Y. Zhang, K. Lu, Y. Gao, K. Xu, A novel quantum representation for log-polar images, Quantum Inf. Process. 12 (9) (2013) 3103–3126, http://dx.doi.org/10. 1007/s11128-013-0587-8. [12] Y. Zhang, K. Lu, Y. Gao, M. Wang, NEQR: A novel enhanced quantum representation of digital images, Quantum Inf. Process. 12 (8) (2013) 2833–2860, http://dx.doi. org/10.1007/s11128-013-0567-z. [13] J.Z. Sang, S. Wang, Q. Li, A novel quantum representation of color digital images, Quantum Inf. Process. 16 (2) (2016) 42, http://dx.doi.org/10.1007/s11128-0161463-0. [14] P.Q. Le, A.M. Iliyasu, F. Dong, K. Hirota, Strategies for designing geometric transformations on quantum images, Theoret. Comput. Sci. 412 (15) (2011) 1406–1418, http://dx.doi.org/10.1016/j.tcs.2010.11.029, URL https:// www.sciencedirect.com/science/article/pii/S0304397510006675. [15] R.G. Zhou, C.Y. Tan, H. Ian, Global and local translation designs of quantum image based on frqi, Internat. J. Theoret. Phys. 56 (4) (2017) 1382–1398, http: //dx.doi.org/10.1007/s10773-017-3279-9. [16] P.Q. Le, A.M. Iliyasu, F. Dong, K. Hirota, Efficient color transformations on quantum images, J. Adv. Comput. Intell. Intell. Informatics 15 (6) (2011) 698–706, http:// dx.doi.org/10.20965/jaciii.2011.p0698, URL https://doi.org/10.20965%2Fjaciii. 2011.p0698. [17] N. Jiang, J. Wang, Y. Mu, Quantum image scaling up based on nearest-neighbor interpolation with integer scaling ratio, Quantum Inf. Process. 14 (11) (2015) 4001– 4026, http://dx.doi.org/10.1007/s11128-015-1099-5.

bit-plane. Fig. 21(g)–21(j) implement four bit-plane exchanging operations. Moreover, for NCQI, the color transformation which is designed by combining the above operations can be implemented by the quantum circuit in Fig. 22. The quantum costs of these image processing operations for QRCI and NCQI are listed in Table 3. Especially, for QRCI, the quantum cost of designed color transformation 𝑈 is approximately 18, which represents a 10-fold reduction over the quantum cost based on NCQI. From Table 3, it can be concluded that QRCI has lower quantum cost than NCQI for these color image processing operations concerning channels and bitplanes. In addition, quantum image geometric transformations are the operations which are applied to position information encoding qubits. Since QRCI exploits the same way to encode position information just like FRQI, NEQR and NCQI, the quantum image geometric transformations based on FRQI, NEQR and NCQI are also applicable to QRCI, such as scrambling [20], translation [29], cycle shift [30], two-point swapping and flipping [31], and so on. QRCI and NCQI have the same quantum costs for geometric transformations. 5. Conclusion In this paper, for the sake of improving the storage capacity of quantum color image representation in which color information is encoded by basis states of qubit sequences, QRCI representation model is proposed in quantum computers. Only 2𝑛 + 6 qubits are required to store a color digital image with size 2𝑛 × 2𝑛 into the QRCI quantum state. QRCI displays the enormous storage capacity and its storage capacity improves 218 times than NCQI. Meanwhile, some quantum color image processing operations based on QRCI are discussed. By analyzing their corresponding quantum circuits, it is found that QRCI has lower quantum cost than NCQI for these operations. In conclusion, the new proposed QRCI representation model can save more storage space than the existing NCQI model which is commonly accepted, and it is more convenient to carry out quantum color image processing operations concerning channels and bit-planes. QImP is still in its infancy. We consider that QRCI constitutes a significant development of QIR and QImP. Our future research directions will focus on: 1. Quantum image encryption Image encryption transforms the original image into a meaningless one to protect the image information. The color transformation designed 157

L. Wang, Q. Ran, J. Ma et al.

Optics Communications 438 (2019) 147–158 [25] M. Abdolmaleky, M. Naseri, J. Batle, A. Farouk, L.H. Gong, Red-Green-Blue multichannel quantum representation of digital images, Optik 128 (2017) 121–132, http: //dx.doi.org/10.1016/j.ijleo.2016.09.123, URL http://www.sciencedirect.com/ science/article/pii/S0030402616311500. [26] R. Zhou, Y.J. Sun, P. Fan, Quantum image gray-code and bit-plane scrambling, Quantum Inf. Process. 14 (5) (2015) 1717–1734, http://dx.doi.org/10.1007/ s11128-015-0964-6. [27] Y.Q. Cai, X.W. Lu, N. Jiang, A survey on quantum image processing, Chin. J. Electr. 27 (4) (2018) 718–727, http://dx.doi.org/10.1049/cje.2018.02.012, URL https://ieeexplore.ieee.org/abstract/document/8447313. [28] J.A. Smolin, D.P. DiVincenzo, Five two-bit quantum gates are sufficient to implement the quantum Fredkin gate, Phys. Rev. A 53 (1996) 2855–2856, http: //dx.doi.org/10.1103/PhysRevA.53.2855, URL https://link.aps.org/doi/10.1103/ PhysRevA.53.2855. [29] J. Wang, N. Jiang, L. Wang, Quantum image translation, Quantum Inf. Process. 14 (5) (2015) 1589–1604, http://dx.doi.org/10.1007/s11128-014-0843-6. [30] Y. Zhang, K. Lu, K. Xu, Y. Gao, R. Wilson, Local feature point extraction for quantum images, Quantum Inf. Process. 14 (5) (2015) 1573–1588, http://dx.doi.org/10. 1007/s11128-014-0842-7. [31] P.Q. Le, A.M. Iliyasu, F. Dong, K. Hirota, Fast geometric transformations on quantum images, Int. J. Appl. Math. 40 (3) (2010) 113–123, URL https: //www.researchgate.net/publication/46093505_Fast_Geometric_Transformations_ on_Quantum_Images.

[18] J.Z. Sang, S. Wang, X.M. Niu, Quantum realization of the nearest-neighbor interpolation method for frqi and neqr, Quantum Inf. Process. 15 (1) (2016) 37–64, http://dx.doi.org/10.1007/s11128-015-1135-5. [19] R.G. Zhou, C.Y. Tan, P. Fan, Quantum multidimensional color image scaling using nearest-neighbor interpolation based on the extension of FRQI, Modern Phys. Lett. B 31 (17) (2017) 1750184, http://dx.doi.org/10.1142/S0217984917501846. [20] N. Jiang, W.Y. Wu, L. Wang, The quantum realization of Arnold and Fibonacci image scrambling, Quantum Inf. Process. 13 (5) (2014) 1223–1236, http://dx.doi. org/10.1007/s11128-013-0721-7. [21] N. Jiang, L. Wang, W.Y. Wu, Quantum hilbert image scrambling, Internat. J. Theoret. Phys. 53 (7) (2014) 2463–2484, http://dx.doi.org/10.1007/s10773-0142046-4. [22] V.I. Manta, S. Caraiman, Quantum image filtering in the frequency domain, Adv. Electr. Comput. Eng. 13 (3) (2013) 77–84, http://dx.doi.org/10. 4316/AECE.2013.03013, URL https://www.ingentaconnect.com/content/doaj/ 15827445/2013/00000013/00000003/art00013. [23] S. Caraiman, V.I. Manta, Histogram-based segmentation of quantum images, Theoret. Comput. Sci. 529 (2014) 46–60, http://dx.doi.org/10.1016/j.tcs.2013.08.005, URL http://www.sciencedirect.com/science/article/pii/S0304397513005835. [24] N. Jiang, Y. Dang, J. Wang, Quantum image matching, Quantum Inf. Process. 15 (9) (2016) 3543–3572, http://dx.doi.org/10.1007/s11128-016-1364-2.

158