Flexible Representation of Quantum Images and Its Computational Complexity Analysis
Flexible Representation of Quantum Images and Its Computational Complexity Analysis
1 Department of Computational Intelligence and Systems Science, 2 Department of Applied Computer Science,
Interdisciplinary Graduate School of Science and Engineering, Tokyo Polytechnic University,
Tokyo Institute of Technology, 1583 Iiyama, Atsugi, Kanagawa 243-0297, Japan
Midori-ku, Yokohama 226-8502, Japan. E-mail: [email protected]
E-mail: {phuclq, tou, hirota}@hrt.dis.titech.ac.jp
Abstract: Flexible Representation of Quantum Images (FRQI) is proposed to provide a representation of images that enables
efficient preparation and image processing operators on quantum computers. FRQI captures colors and their corresponding
positions in an image into a quantum state. The preparation with polynomial simple operations for FRQI turning a quantum
computer from the initialized state to the FRQI state is shown by the proposed Polynomial Preparation theorem. The Quantum
Image Compression (QIC) algorithm reduces simple operations used in the preparation process based on the minimization of
Boolean equations are from same color groups of positions. Quantum image processing operators on FRQI based unitary
transforms dealing with only colors, colors at some positions and the combination by the quantum Fourier transform of both
colors and positions are addressed. The experiments for the storage and retrieval of images using FRQI are implemented in
Matlab. The compression ratio of QIC among same color groups ranges from 6.67% to 31.62% on the Lena image.
transform [3], quantum Wavelet transform [5]. capturing colors and corresponding positions of those colors,
The Flexible Representation of Quantum Image (FRQI) where ⊗ is the tensor product notation, 0 , 1 are 2-D
which captures information about colors and their computational basis quantum states, i , i = 0,1, K ,2 2 n − 1 are
corresponding positions in image into a quantum state is 2 2 n -D computational basis quantum states and θi are
proposed. Then the following computational and image angles encoding colors.
processing aspects on FRQI are studied: There are two parts in the quantum representation of an
The complexity of the preparation process for FRQI, image; (cos θi 0 + sin θi 1 ) and i which encode the colors
and their corresponding positions in the image, respectively. quantity of simple quantum gates in preparation and
An example of 2 × 2 image is shown in Fig. 1. reconstruction of quantum images is the Quantum Image
The quantum state in FRQI form is a normalized state,
i.e. I = 1 as given by I =
1
[(cos θ 0 0 + sin θ 0 1 ) ⊗ 00 + (cos θ1 0 + sin θ1 1 ) ⊗ 01 +
2
+ (cos θ 2 0 + sin θ 2 1 ) ⊗ 10 + (cosθ 3 0 + sin θ 3 1 ) ⊗ 11 ]
∑ (cos2 θi + sin 2 θi ) = 2n
2 2 n −1
1 1
I = 22 n = 1. (2)
2n i =0 Fig. 1 A simple image and its quantum state.
This property is very useful for further unitary operations on Compression (QIC). The preparation and reconstruction of
the image state. quantum images are the same, however, in sense of
Lemma 2.1. Given a set {θi }, i = 0,1,K, 22 n − 1(n ∈ N ) of computation.
th
angles encoding colors at the position i , there is a unitary There are several reasons why image compression must
transform P that turns quantum computers from the be considered in the FRQI. Firstly, studies in classical image
( )
and 2 2 n generalized- C 2 n R y (2θ i ) gates, where R y (2θi ) and practical aspects of the FRQI.
The Quantum Image Compression (QIC) is proposed in
are the rotations about ŷ axis by the angles
order to reduce controlled-rotation gates in same color
2θ i , i = 1, 2,K, 2 2n
−1. groups based on the minimization of their Boolean
Theorem 2.3 (Polynomial Preparation Theorem) Given a expression as shown in Fig. 2. The algorithm starts with the
set {θi }, i = 0,1,K, 22 n − 1(n ∈ N ) of angles encoding colors information about positions in a same color group and ends
at the ith position, there is an efficiently implemented with the minimized form of the Boolean expression.
quantum transformation P turning a quantum system from
A same color
⊗2 n +1
initialized state 0 to the quantum image state using
Build Boolean minterms
polynomial number of simple gates.
3. Quantum Image Compression based on
Build Boolean expression
Minimization of Boolean Expression
Classical image compression techniques such as JPEG Minimize Boolean
[9] reduce the amount of computational resources, used to
restore or reconstruct images. Similarly, quantum image
Output minimized
compression is the procedure that reduces quantum
resources used to prepare or reconstruct quantum images.
End
The main resource in quantum computation is the quantity
of simple quantum gates or simple operations used in the Fig. 2 Quantum Image Compression Algorithm
computation. Therefore, the process of decreasing the
The result of QIC algorithm is the minimized Boolean cosθ − sin θ
matrices U = R y (2θ ) = , where θ is the
expressions that are used to construct a quantum circuit. The sin θ cosθ
number of product terms in a minimized Boolean expression shifting parameter. The following calculation produces the
indicates the number of conditioned-rotation gates that is result I S of the application of S on I ,
needed to use for the corresponding group of same color IS = S( I )
positions. The laterals in a product term in each minimized 1 2 2 n −1
expression point out the condition part of the conditioned- = S n
2 ∑ (cos θ i 0 + sin θ i 1 ) ⊗ i
i=0
rotation gate. The Boolean variables with complement 1
( )
2 2 n −1
object for further quantum transforms. The quantum image The quantum image I S has all of its colors coming from
processing operators are unitary operators with image the original image I by shifting the θ angle.
processing purposes. These operators are divided into 3 The changing color of some points in an image depends
categories based on 3 types of unitary transforms, G1 , G2
on the specific positions of the points in the image.
and G3 , applied to FRQI dealing with only colors, colors at
Information about the positions is used as conditions
some specific positions and the combination of colors and
encoded in the matrix C of the conditioned-gate G2 to
positions, respectively.
construct the processing operators. For instance, let us
The unitary transforms of the first group, G1 and the
consider an 2 × 2 image and the changing color at
second one, G2 are in following form
positions 0 , 2 . The matrix C = 0 0 + 2 2 and
G1 = U ⊗ I ⊗ n , (2)
C = 1 1 + 3 3 are used to construct the conditioned-gate
G2 = U ⊗ C + I ⊗ C , (3)
G2 ,
where U are single qubit unitary transforms on colors, C are
G2 = U ⊗ ( 0 0 + 2 2 ) + I ⊗ ( 1 1 + 3 3 ).
matrices regarding eligible positions, C are matrices
The action of this particular G2 on a general 2 × 2 image in
1 0
regarding ineligible positions, I = is the identity 1 3
0 1 FRQI form, I = ∑ (cosθi 0 + sin θi 1 ) ⊗ i , is given by
2 i =0
operator and n is the number of qubits encoding positions.
[
G2 I = U ⊗ ( 0 0 + 2 2 )+ I ⊗ ( 1 1 + 3 3 ) I ]
=
1
(cos θ 0U 0 + sin θ 0U 1 )⊗ 0 +
G1 2
+ (cos θ 2U 0 + sin θ 2U 1 ) ⊗ 2 +
1
(16)
2
+ (cos θ 1 0 + sin θ 1 1 ) ⊗ 1 +
1
2
+ (cos θ 3 3 + sin θ 3U 1 ) ⊗ 3 .
1
G2
2
The calculation in (16) shows that the action of operator
U for changing color affects only on the specific
Fig. 3 The circuits of G1 and G2 image processing
positions 0 , 2 .
operations.
The shifting color operator, S is defined as an operator in The number of simple gates used for an operation in G1
the group G1 , S = U ⊗ I ⊗n , by using rotation category is one gate while the number of controlled-rotations
used for an operator in G2 category depends linearly on FRQI based unitary transforms dealing with only colors,
number of positions involving in the operator. colors at some positions and the combination by the
quantum Fourier transform of both colors and positions are
Fig. 5 Coefficients of quantum state and probability Transforms: Fast Algorithms and Complete Circuits,
distribution arXiv:quant-ph/9809004, 1998.
In experiment, compression ratios among groups are
estimated based on analysis of minimizations of Boolean [5] M. A. Nielsen, I. L. Chuang: Quantum Computation
expressions derived from the 256 × 256 gray image of Lena and Quantum Information, Cambridge Univ. Press,
Fig. 6 Compression ratios of same color groups in Lena image [8] R. K. Brayton, A. Sangiovannni-Vincentelli, C.
6. Discussion
McMullen, G. Hachtel, Logic Minimization Algorithms
FRQI captures colors and their corresponding positions
for VLSI Synthesis, Kluwer Academic Publishers, 1984.
in an image into a quantum state. The preparation with
polynomial simple operations for FRQI turning a quantum [9] JPEG homepage, http://www.jpeg.org/