0% found this document useful (0 votes)
22 views5 pages

Quantum Image Processing - FRQI Image Representation: Gohar Raiz Haider 2022-12-0005 Wajeeha Rizwan 2022-12-0001

Uploaded by

dresdfhfbj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views5 pages

Quantum Image Processing - FRQI Image Representation: Gohar Raiz Haider 2022-12-0005 Wajeeha Rizwan 2022-12-0001

Uploaded by

dresdfhfbj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Quantum Image Processing - FRQI Image

Representation

Gohar Raiz Haider 2022-12-0005


Wajeeha Rizwan 2022-12-0001
Syed Babar Ali School of Science and Engineering
Lahore University of Management Sciences

1 Abstract

Quantum Image Processing, as the name implies, is a method employed for pro-
cessing images by using quantum information technology. It is a relatively new
advancement in the field of Quantum Information Science and one that ensures
time efficient management of simple operations used in classical image processing.
The first and foremost step of this process is the encoding of classical images to
quantum images which is done by a variety of different methods. In this paper the
FRQI (Flexible Representation of Quantum Images) is explored in detail which
encodes the images for representation on Quantum computers. The FRQI state
consists information about the colours and their respective positions in the image.
Once the FRQI state is achieved, the required Quantum Image Processing algo-
rithm is applied to it which is needed for the specific purpose of carrying out the
entire process. The FRQI is not only used for image representation but for various
other related tasks of Quantum Image Processing. After the preparation of the
FRQI state, its circuit implementation and simulation are carried out on Qiskit.

2 Introduction

Although a relatively new concept in the field of science and technology, quan-
tum computing is being researched on and used extensively for finding solutions to
problems that seem too complicated for the existing classical computers. Though
the quantum computers are quite different and rather complex to use but the
promise of exponentially increasing the speed and efficiency of problem solving
has created an interest among researchers worldwide to dig more into the appli-
cations of this field. Quantum computers are basically even more advanced than
the supercomputers. Even those problems that seem extremely complex for su-
percomputers, like the modelling of atoms in a compound, quantum computers
can perform such tasks rather easily. Currently, quantum computers and quantum
technology in general is being used in various applications like electric vehicles,

1
solving of complex energy challenges, quest of solving space and cosmic mysteries,
image processing and a variety of a lot of other applications [5].

One of the most interesting area where Quantum science and technology
is being utilized is Quantum Image Processing. With a multitude of advances
in technology, image processing has become an extensively researched upon area
of technology. It is being employed in various different disciplines and areas of
research. Facial recognition, automated vehicles, image Photoshop and numerous
other techniques use image processing as their basis. Utilizing Quantum technology
in image processing is what Quantum image processing is all about. As is evident
until now, quantum image processing will be a lot more efficient in terms of speed
and time than its classical counterpart. It will also prove to be extremely useful
for simple day to day applications like simple face recognition on a mobile phone
or criminal detection at a police station, but all of this might be possible in a
fraction of time and with much less error than is now using classical techniques.
Image compression, edge detection, image storage, image retrieval, binary image
line detection are just some of the tasks achievable by quantum image processing
[1, 4].

In order to carry out Quantum Image Processing, the image must first be
transformed into its quantum counterpart known as the quantum image. This state
can be achieved by a number of different processes like FRQI (Flexible Represen-
tation of Quantum Image), NEQR (Novel Enhanced Quantum Representation),
QBIP (Quantum Boolean Image Processing) and a variety of others [6]. Here we
discusses the FRQI technique in detail. The FRQI state represents the classical
images, after a transformation, as quantum images on a quantum computer in a
normalized state. This state carries the information about the colours in an image
and their respective positions. It is quite an efficient method for the preparation of
an image on which various different quantum image processing algorithms can be
applied to achieve desired results. Not only does FRQI provide a representation to
images but can also prove to be extremely useful for the exploration of other tasks
performed by the quantum computers regarding image processing [1, 2]. Preparing
this state requires a polynomial number of simple operations and gates [2, 4]. We
work with a 2x2 image i.e. 4 pixels image, where the color and its position is
encoded in the FRQI state as shown below,
2n
2 −1
1 X
|I(θ)⟩ = n (cos(θi )|0⟩ + sin(θi )|1⟩) ⊗ |i⟩, (1)
2 i=0

π
θi ∈ [0, ], i = 0, 1, 2, ..., 22n − 1. (2)
2

3 Mathematical Formulations

The FRQI state contains coded information in the form of colour and its related
pixel position as shown below. FRQI state is prepared through a unitary transfor-
mation which has two steps. First applying the hadamard transform H = I ⊗H ⊗2 ,

2
where I is the 2D identity matrix and H is the hadamard gate, on |0⟩⊗3 , producing
the state |H⟩,
3
⊗2 ⊗3 1 X
(I ⊗ H )|0 ⟩ = |0⟩ ⊗ |i⟩ = |H⟩. (3)
2 i=0
State |0⟩ is initialised on all three qubits and hadamard gate is applied on the first
two, creating superposition. The third qubit is our ancillary qubit. In the second
step, controlled rotations are applied on the |H⟩ state as defined by,
3
X
Ri = (I ⊗ |j⟩⟨j|) + Ry (2θi ) ⊗ |i⟩⟨i|. (4)
j=0,j̸=i

where  
cos(θi ) − sin(θi )
Ry (2θi ) =
sin(θi ) cos(θi )

The controlled rotations are applied in succession correspondimg to the


number of pixels, which in our case is 4. This corresponds to a unitary operation
R defined as,
Y3
R|H⟩ = Ri |H⟩. (5)
i=0
Equation ’(1)’ is our state obtained after applying the hadamard transform. Now,
the controlled rotation operators are applied in succession as follows.
3
! 3
X 1 X
R0 |H⟩ = I ⊗ |i⟩⟨i|) + Ry (2θ0 ) ⊗ |0⟩⟨0| ( |0⟩ ⊗ |i⟩)
i=0,i̸=0
2 i=0
" 3
#
1 X
= |0⟩ ⊗ |i⟩⟨i| + (cos(θ0 )|0⟩ + sin(θ0 )|1⟩) ⊗ |0⟩ . (6)
2 i=0,i̸=0

3
! 3
X 1 X
R1 (R0 |H⟩) = I⊗ |i⟩⟨i|) + Ry (2θ1 ) ⊗ |1⟩⟨1| |0⟩ ⊗ |i⟩⟨i|
i=0,i̸=1
2 i=0,i̸=0
!
+ (cos(θ0 )|0⟩ + sin(θ0 )|1⟩) ⊗ |0⟩]

" 3
#
1 X
= |0⟩ ⊗ |i⟩⟨i| + (cos(θ0 )|0⟩ sin(θ0 )|1⟩) ⊗ |0⟩ + (cos(θ1 )|0⟩ + sin(θ1 )|1⟩) ⊗ |1⟩ .
2 i=0,i̸=0,1
(7)

3
! 3
X 1 X
R2 (R1 R0 |H⟩) = I⊗ |i⟩⟨i|) + Ry (2θ2 ) ⊗ |2⟩⟨2| |0⟩ ⊗ |i⟩⟨i|
i=0,i̸=2
2 i=0,i̸=0,1
!
+ (cos(θ0 )|0⟩ + sin(θ0 )|1⟩) ⊗ |0⟩ + (cos(θ1 )|0⟩ + sin(θ1 )|1⟩) ⊗ |1⟩

3
3
1 X
= |0⟩⊗ |i⟩⟨i|+(cos(θ0 )|0⟩+sin(θ0 )|1⟩)⊗|0⟩+(cos(θ1 )|0⟩+sin(θ1 )|1⟩)⊗|1⟩
2 i=0,i̸=0,1,2
!
+ (cos(θ2 )|0⟩ + sin(θ2 )|1⟩) ⊗ |2⟩ . (8)

3
! 3
X 1 X
R3 (R2 R1 R0 |0⟩) = I⊗ |i⟩⟨i|) + Ry (2θ3 ) ⊗ |3⟩⟨3| |0⟩ ⊗ |i⟩⟨i|
i=0,i̸=3
2 i=0,i̸=0,1,2
!
+(cos(θ0 )|0⟩+sin(θ0 )|1⟩)⊗|0⟩+(cos(θ1 )|0⟩+sin(θ1 )|1⟩)⊗|1⟩ +(cos(θ2 )|0⟩+sin(θ2 )|1⟩)⊗|2⟩

3
1 X
= |0⟩⊗ |i⟩⟨i|+(cos(θ0 )|0⟩+sin(θ0 )|1⟩⊗|0⟩+(cos(θ1 )|0⟩+sin(θ1 )|1⟩⊗|1⟩
2 i=0,i̸=0,1,2,3
!
+ (cos(θ2 )|0⟩ + sin(θ2 )|1⟩) ⊗ |2⟩ + (cos(θ3 )|0⟩ + sin(θ3 )|1⟩) ⊗ |3⟩ . (9)

P3
In above equation, the second term vanishes and i=0 |i⟩ are just numeric
representation of two qubit states in Zeeman basis,

1. |0⟩ = |00⟩

2. |1⟩ = |01⟩

3. |2⟩ = |10⟩

4. |3⟩ = |11⟩.

Hence, the FRQI state achieved is,

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⟩ . (10)

Bibliography
[1] Le, Phuc Q., Fangyan Dong, and Kaoru Hirota. ”A flexible representation of
quantum images for polynomial preparation, image compression, and process-
ing operations.” Quantum Information Processing 10 (2011): 63-84.

4
[2] Le, Quang Phuc, et al. ”Flexible representation of quantum images and its
computational complexity analysis.”

[3] Yan, Fei, Abdullah M. Iliyasu, and Zhengang Jiang. ”Quantum computation-
based image representation, processing operations and their applications.”
Entropy 16.10 (2014): 5290-5338.

[4] Team, Qiskit. Quantum Image Processing - FRQI and NEQR Image Rep-
resentations. 6 Apr. 2023,https://qiskit.org/textbook/ch-applications/image-
processing-frqi-neqr.html.

[5] What Is Quantum Computing?IBM. www.ibm.com/topics/quantum-


computing.

[6] Mastriani, Mario. ”Quantum image processing: the truth, the whole truth,
and nothing but the truth about its problems on internal image representation
and outcomes recovering.” arXiv preprint arXiv:2002.04394 (2020).

You might also like