# Quantum image processing

Quantum image processing (QIMP) is using quantum computing or quantum information processing to create and work with quantum images.
Due to some of the properties inherent to quantum computation, notably entanglement and parallelism, it is hoped that QIMP technologies will offer capabilities and performances that surpass their traditional equivalents, in terms of computing speed, security, and minimum storage requirements.

## Background

A. Y. Vlasov's work in 1997 focused on using a quantum system to recognize orthogonal images. This was followed by efforts using quantum algorithms to search specific patterns in binary images and detect the posture of certain targets. Notably, more optics-based interpretations for quantum imaging were initially experimentally demonstrated in and formalized in after seven years.
In 2003, Salvador Venegas-Andraca and S. Bose presented Qubit Lattice, the first published general model for storing, processing and retrieving images using quantum systems. Later on, in 2005, Latorre proposed another kind of representation, called the Real Ket, whose purpose was to encode quantum images as a basis for further applications in QIMP. Furthermore, in 2010 Venegas-Andraca and Ball presented a method for storing and retrieving binary geometrical shapes in quantum mechanical systems in which it is shown that maximally entangled qubits can be used to reconstruct images without using any additional information.
Technically, these pioneering efforts with the subsequent studies related to them can be classified into three main groups:
* Quantum-assisted digital image processing (QDIP): These applications aim at improving digital or classical image processing tasks and applications.
* Optics-based quantum imaging (OQI)
* Classically inspired quantum image processing (QIMP)
A survey of quantum image representation has been published in. Furthermore, the recently published book Quantum Image Processing provides a comprehensive introduction to quantum image processing, which focuses on extending conventional image processing tasks to the quantum computing frameworks. It summarizes the available quantum image representations and their operations, reviews the possible quantum image applications and their implementation, and discusses the open questions and future development trends.

## Quantum image representations

There are various approaches for quantum image representation, that are usually based on the encoding of color information. A common representation is FRQI (Flexible Representation for Quantum Images), that captures the color and position at every pixel of the image, and defined as:$\vert I\rangle ={\frac {1}{2^{n}}}\sum _{i=0}^{2^{2n-1}}\vert c_{i}\rangle \otimes \vert i\rangle$where |i⟩{\textstyle |i\rangle } is the position and |c$_i$⟩=cosθ$_i$|0⟩+sinθ$_i$|1⟩{\textstyle \vert c_{i}\rangle =cos\theta _{i}\vert 0\rangle +sin\theta _{i}\vert 1\rangle } the color with a vector of angles θ$_i$∈[0, π/2]{\textstyle \theta _{i}\in \left[0, \pi /2\right]}. As it can be seen, |c$_i$⟩{\textstyle \vert c_{i}\rangle } is a regular qubit state of the form $\vert \psi \rangle =\alpha \vert 0\rangle +\beta \vert 1\rangle$, with basis states |0⟩=(10){\textstyle \vert 0\rangle ={\begin{pmatrix}1\\0\end{pmatrix}}} and |1⟩=(01){\textstyle \vert 1\rangle ={\begin{pmatrix}0\\1\end{pmatrix}}}, as well as amplitudes α{\textstyle \alpha } and β{\textstyle \beta } that satisfy |α|$^2$+|β|$^2$=1{\textstyle \left|\alpha \right|^{2}+\left|\beta \right|^{2}=1}.
Another common representation is MCQI (Multi-Channel Representation for Quantum Images), that uses the RGB channels with quantum states and following FRQI definition:$\vert I\rangle ={\frac {1}{2^{n+1}}}\sum _{i=0}^{2^{2n-1}}\vert C_{RGB}^{i}\rangle \otimes \vert i\rangle$${\begin{aligned}{\begin{aligned}\vert C_{RGB}^{i}\rangle &={\cos \theta _{R}^{i}\vert 000\rangle }+{\cos \theta _{G}^{i}\vert 001\rangle }+{\cos \theta _{B}^{i}\vert 010\rangle }\\&\quad +{\sin \theta _{R}^{i}\vert 100\rangle }+{\sin \theta _{G}^{i}\vert 101\rangle }+{\sin \theta _{B}^{i}\vert 110\rangle }\\&\quad +{\cos {\theta _{\alpha }}\vert 011\rangle }+{\sin \theta _{\alpha }\vert 111\rangle }\end{aligned}}\end{aligned}}$
Departing from the angle-based approach of FRQI and MCQI, and using a qubit sequence, NEQR (Novel Enhanced Representation for Quantum Images) is another representation approach, that uses a function f(y, x)=C$_{yx}$$^{q−1}$C$_{yx}$$^{q−2}$…C$_{yx}$$^1$C$_{yx}$$^0${\textstyle f\left(y, x\right)=C_{yx}^{q-1}C_{yx}^{q-2}\ldots C_{yx}^{1}C_{yx}^{0}} to encode color values for a $2^{n}\times 2^{n}$ image:$\vert I\rangle ={\frac {1}{2^{n}}}\sum _{y=0}^{2^{n}-1}\sum _{x=0}^{2^{n}-1}\vert f\left(y,x\right)\rangle \vert yx\rangle$

## Quantum image manipulations

A lot of the effort in QIMP has been focused on designing algorithms to manipulate the position and color information encoded using flexible representation of quantum images (FRQI) and its many variants. For instance, FRQI-based fast geometric transformations including (two-point) swapping, flip, (orthogonal) rotations and restricted geometric transformations to constrain these operations to a specified area of an image were initially proposed. Recently, NEQR-based quantum image translation to map the position of each picture element in an input image into a new position in an output image and quantum image scaling to resize a quantum image were discussed. While FRQI-based general form of color transformations were first proposed by means of the single qubit gates such as X, Z, and H gates. Later, Multi-Channel Quantum Image-based channel of interest (CoI) operator to entail shifting the grayscale value of the preselected color channel and the channel swapping (CS) operator to swap the grayscale values between two channels have been fully discussed.
To illustrate the feasibility and capability of QIMP algorithms and application, researchers always prefer to simulate the digital image processing tasks on the basis of the QIRs that we already have. By using the basic quantum gates and the aforementioned operations, so far, researchers have contributed to quantum image feature extraction, quantum image segmentation, quantum image morphology, quantum image comparison, quantum image filtering, quantum image classification, quantum image stabilization, among others. In particular, QIMP-based security technologies have attracted extensive interest of researchers as presented in the ensuing discussions. Similarly, these advancements have led to many applications in the areas of watermarking, encryption, and steganography etc., which form the core security technologies highlighted in this area.
In general, the work pursued by the researchers in this area are focused on expanding the applicability of QIMP to realize more classical-like digital image processing algorithms; propose technologies to physically realize the QIMP hardware; or simply to note the likely challenges that could impede the realization of some QIMP protocols.

## Quantum image transform

By encoding and processing the image information in quantum-mechanical systems, a framework of quantum image processing is presented, where a pure quantum state encodes the image information: to encode the pixel values in the probability amplitudes and the pixel positions in the computational basis states.
Given an image $F=(F_{i,j})_{M\times L}$, where $F_{i,j}$ represents the pixel value at position $(i,j)$ with $i=1,\dots ,M$ and $j=1,\dots ,L$, a vector ${\vec {f}}$ with $ML$ elements can be formed by letting the first $M$ elements of ${\vec {f}}$ be the first column of $F$, the next $M$ elements the second column, etc.
A large class of image operations is linear, e.g., unitary transformations, convolutions, and linear filtering. In the quantum computing, the linear transformation can be represented as $|g\rangle ={\hat {U}}|f\rangle$ with the input image state $|f\rangle$ and the output image state $|g\rangle$. A unitary transformation can be implemented as a unitary evolution. Some basic and commonly used image transforms (e.g., the Fourier, Hadamard, and Haar wavelet transforms) can be expressed in the form $G=PFQ$, with the resulting image $G$ and a row (column) transform matrix $P(Q)$.
The corresponding unitary operator ${\hat {U}}$ can then be written as ${\hat {U}}={Q}^{T}\otimes {P}$. Several commonly used two-dimensional image transforms, such as the Haar wavelet, Fourier, and Hadamard transforms, are experimentally demonstrated on a quantum computer, with exponential speedup over their classical counterparts. In addition, a novel highly efficient quantum algorithm is proposed and experimentally implemented for detecting the boundary between different regions of a picture: It requires only one single-qubit gate in the processing stage, independent of the size of the picture.