DOI : 10.17577/IJERTV15IS042734
- Open Access

- Authors : Aadya Rajpal, Aashi Pillai
- Paper ID : IJERTV15IS042734
- Volume & Issue : Volume 15, Issue 04 , April – 2026
- Published (First Online): 30-04-2026
- ISSN (Online) : 2278-0181
- Publisher Name : IJERT
- License:
This work is licensed under a Creative Commons Attribution 4.0 International License
Quantum Image Edge Detection Using the Qiskit Image Processing Library
Aadya Rajpal, Aashi Pillai
Department of Computer Science and Engineering Dayananda Sagar University, Bangalore, India
Abstract – Finding the edges in an image is still a fundamental part of picture analysis. This report takes a deep dive into how quantum computers could tackle this problem, with a practical focus on using the Qiskit ecosystem. We formalize two of the most common quantum
image encoding methods (FRQI and NEQR) and show how to build quantum circuits that perform edge detection. A key part of our analysis is a realistic comparison of classical and quantum time complexities, where we are careful to include the often-overlooked costs of state preparation and readout. We also analyze how real-world quantum noise might distort the results and show diagrams for the FRQI layout, a sample circuit, and the entire processing pipeline. We wrap up by suggesting which real-world applications might be the rst to benet from this technology and what research is still needed to bridge the gap from theory to practice.
Index TermsQuantum image processing, FRQI, NEQR, Qiskit, edge detection, quantum noise, time complexity.
2) NEQR: Novel Enhanced Quantum Representation
-
INTRODUCTION
Edge detection is all about nding the important outlines in an image. It is a key step that powers everything from medical scan analysis and robotic vision to satellite imaging and quality control in factories. The classical methods for this (like Sobel, Prewitt, and Canny) are well-understood and very efcient.
So, why bring quantum computing into it? The hope is that
NEQR takes a more straightforward approach. It also uses 2n qubits for the pixel location, but instead of one clever angle-based qubit for the intensity, it uses a whole register of q qubits to store the pixels value as a standard binary number.
The state looks like this:
N 1
1
quantum mechanics offers a new set of toolslike superpo-sition, entanglement, and amplitude processingthat could
|NEQR) = N
i=0
|Ii) |i) (2)
give us an edge for certain types of vision tasks.
-
QUANTUM IMAGE REPRESENTATIONS
A. Quantum Image Representations
Before we can do anything, we have to get our classical image into a quantum state. This is the rst and biggest hurdle. Lets look at the two most common ways to do this, FRQI and NEQR, to see how they work and what their pros and cons are.
1) FRQI: Flexible Representation of Quantum Images
×
FRQI is clever. For a 2n 2n image, it uses 2n qubits to store all the pixel locations (x, y) and just one extra qubit to store the intensity (like grayscale value) for that pixel. It saves the intensity value as an angle, i, on that single qubit.
The full state for the entire image (with N = 22n pixels) is
a big superposition of every pixel:
where Ii is the q-bit binary state (e.g. 10110010 ) for the intensity at location i . This is much more like classical digital storage.
·
| )
| ) | )
a) State preparation cost: This is also expensive, costing O(N q) operations in a simple approach. Its main advantage is that reading the data out is deterministicyou just mea-sure the intensity qubits. With FRQI, you have to sample the amplitudes, which is probabilistic.
3) FRQI vs NEQR: a compact comparison
Below is a direct comparison of the two methods (Table 1).
Table 1. Comparison of FRQI and NEQR Encoding Methods
Feature FRQI NEQR
N 1
1
Qubit Count Stingy (2n+1).
) Uses 1 qubit for
Hungry (2n+q). Uses q qubits for
|FRQI) = N
i=0
cos i |0) + sin i |1)
|i) (1)
intensity.
Retrieval Probabilistic via
color depth.
Exact, determinis-
| ) | )
| )
Here, i is the quantum state representing the (x, y) co-ordinate, and the (cos i 0 + sin i 1 ) part is the intensity qubit for that coordinate. To build this state, you rst put the location qubits into a uniform superposition (so they represent all locations at once) and then apply a series of controlled
Native Ops
Noise Sensi-tivity
sampling.
Global, wave-like transforms.
High (analog angle-based).
tic bit-by-bit. Bitwise math; ideal for digital lters. More robust (digi-tal bit ips).
rotations to set the correct intensity angle for each location.
a) State preparation cost: This is the catch. A naive ap-proach to setting every pixels angle requires O(N ) controlled operations, which is slow. While there are more advanced, tree-like methods to speed this up [16], this preparation cost is often the dominant factor in the entire algorithm.
-
QUANTUM EDGE DETECTION METHODS
With the image loaded, how do we actually nd the edges? Here are the main strategies.
-
Hadamard-Based (QHED-like) Amplitude Probe
Using the FRQI state (1), we exploit the Hadamard trick. The goal is to compare the intensity |i) of pixel i with its neigh-
bour j. The Hadamard gate is a natural difference operator:
1 (1 1
-
METHODOLOGY
Our methodology utilizes a formal mathematical framework
H = 2
1 1
to compare quantum encoding schemes and evaluates com-putational efciency through end-to-end complexity analysis.
| )
If two neighbouring pixel states can be interfered and a Hadamard applied, the amplitude on the 1 state is propor-tional to their difference. A large amplitude signals a sharp edge.
| )
| )
a) Circuit idea: A circuit conditioned on location i performs an operation with neighbour j , typically using controlled-shift operations or small local patches.
-
-
NEQR Bitwise Sobel
×
| | | | | |
The classical Sobel lter slides a 3 3 kernel over the image to nd the gradient. With NEQR, pixel values are already in digital format. Quantum arithmetic circuits (reversible adders) compute the Sobel gradients Gx and Gy for all pix-els simultaneously in superposition. The edge magnitude G Gx + Gy is then thresholded.
| )
High-level NEQR Sobel steps: (1) For each index i in
superposition, load the intensities of its 8 neighbours into temporary registers. (2) Use quantum add/subtract circuits to compute Gx and Gy. (3) Approximate the magnitude and apply a threshold. (4) Measure to obtain the edge map.
-
Hybrid Patch-Based Approaches
×
| )
Since controlling operations on a large i register is expensive, a practical NISQ-era approach breaks the image into small patches (e.g. 8 8), processes each patch on a small quantum computer, and stitches the results classically, dramatically reducing qubit and gate requirements.
-
-
RELATED WORK
We move beyond simple processing speedups to consider the critical overheads of state preparation and measurement, while also modelling the degradation of edge delity under realistic quantum noise conditions.
The core objectives are:
-
Encoding Method Comparison: Establish formal mathe-matical distinctions between FRQI and NEQR, contrast-ing qubit requirements and retrieval mechanisms.
-
End-to-End Time Complexity: Rigorously evaluate to-tal runtime, inorporating the often-overlooked costs of image loading (state preparation) and data retrieval (mea-surement).
-
Noise Impact and Mitigation: Quantify edge-detection delity degradation under realistic noise models and iden-tify necessary error mitigation techniques.
-
TIME COMPLEXITY ANALYSIS
A quantum algorithm might look fast on paper, but we must count the entire processfrom loading the image to getting the answer out. Let the image have N = M 2 pixels and q bits of colour depth.
-
Classical Baseline
A classical Sobel lter runs in O(N ), performing a constant number of operations per pixel. This is the benchmark to beat.
-
FRQI Full Pipeline
FRQI
-
State preparation T prep : The naive loading approach re-quires O(N ) rotation gates:
Quantum image processing (QIP) has evolved signicantly from theoretical inception to practical circuit implementations.
prep FRQI
= N (3)
T
The eld began with the development of efcient storage mech-
-
Quantum processing T proc : A global Hadamard on the
anisms, primarily FRQI and NEQR [1, 2]. While FRQI offered
intensity qubit is O(1)
FRQI
a qubit-efcient method by encoding intensity into amplitudes, it suffered from probabilistic measurement limitations. This
. The neighbour-comparison step costs
at least O(log N ).
-
Measurement/readout T meas : Reconstructing the full
led Zhang et al. [2] to propose NEQR, which uses a basis-state representation allowing deterministic retrieval at the cost of increased qubit requirements.
N -pixel edge map requires
-
Total:
FRQI
(N ) measurements.
Building on these foundations, researchers shifted focus toward algorithmic primitives such as ltering and edge de-tection. Early work by Cavalieri and Maio [4] demonstrated theoretical exponential speedup, though this often neglected state-preparation overhead. More recent studies addressed these bottlenecks; Shubha et al. [11] explored Quantumized edge detection that optimises circuit depth for specic image types, while Xu et al. [10] implemented the Kirsch opera-tor using quantum arithmetic for higher-precision directional edges.
T total = O(N )+ O(log N )+ O(N ) O(N ) (4)
FRQI
There is no asymptotic speedup over the classical pipeline.
-
-
NEQR Full Pipeline
NEQR
-
State preparation: T prep = !Nq [O(Nq) cost].
-
Quantum processing: Arithmetic circuit depth darith
depends on q, not N , giving O(darith).
-
Measurement: O(N ), same as FRQI.
-
Total:
T
In the current NISQ era, focus has pivoted to hybrid archi-tectures. Geng et al. [12] proposed a hybrid quantum-classical
total NEQR
= O(Nq)+ O(darith)+ O(N ) O(Nq)
edge detector that ofoads heavy arithmetic to classical pro-cessors while leveraging quantum interference for feature ex-traction. Works such as Billias et al. [25] are pushing toward utility-scale experiments validating these algorithms on real hardware, identifying that quantum error mitigation [21] is critical for usable results.
This is linear in N , same as classical, but slower by constant factor q.
-
-
When Quantum Advantage May Emerge
Quantum advantage may emerge when: (1) only a global property is needed (e.g. does any edge exist?answerable in sublinear time); (2) the image is already in a quantum state
(e.g. from a quantum sensor); (3) the quantum transform has a signicantly smaller constant factor.
-
-
QUANTUM NOISE ANALYSIS
Real quantum computers are noisy. Qubits lose coherence and gates introduce errors. We model noise with standard channels applied to density matrix :
-
Noise Channels
-
Depolarising noise (probability p):
I
Ep() = (1 p) + p 2 (5)
| ) | )
-
Amplitude damping (): Models qubit decay 1 0
(energy loss):
-
-
-
EXPERIMENTAL DESIGN AND SIMULATIONS
-
Datasets and Preprocessing
× ×
-
Simple 8 8 and 16 16 images (squares/circles on black backgrounds).
×
-
Small 16 16 crops from real images (BSD500 dataset, sample MRI scans).
-
All intensities normalised to [0, 1].
-
-
Pipelines Implemented
-
FRQI + Hadamard probe: encode the image, apply the Hadamard probe, and sample the results.
-
NEQR + Bitwise Sobel: encode the image, run the quan-tum Sobel arithmetic circuits, and measure.
×
-
Hybrid patching: split the image into 8 8 patches and run them sequentially.
0
E = (1
0 ,
E = (0
-
-
Simulator and Noise Models
0 1
1 0 0
We used Qiskits aersimulator with custom depolarising
and amplitude-damping noise models. In each run, we mea-
-
Phase damping / dephasing (): Destroys superposition
off-diagonal elements without bit ips; deadly for interference-based algorithms.
-
Effects on Edge Detection
Noise attacks edge signals by: (1) attenuating amplitude dif-ferences, making edges fade; (2) mixing states, causing false-positive spurious edges; (3) ipping readout bits, adding salt-and-pepper noise to the edge map.
We quantify performance using edge delity Fe, the correla-tion between the ground-truth classical edge map Egt and the noisy quantum output Eq. As error rate increases, Fe drops sharply (see Fig. 1).
Figure 1. Conceptual degradation of edge delity as physical error rates increase. Without error mitigation, delity drops sharply.
-
Mitigation Techniques
-
Zero-Noise Extrapolation (ZNE): Run the circuit at several amplied noise levels, then extrapolate back to the zero-noise limit.
-
Probabilistic Error Cancellation: Learn the noise model and stochastically apply inverse gates to can-cel errors.
| )
| )
-
Readout Mitigation: Calibrate the probability that 1 is misread as 0 and correct nal counts via a calibration matrix.
-
Shallow Circuit Design: Fewer gates (especially slow two-qubit gates) reduces exposure time to noise.
sured edge delity Fe, precision, and recall against a ground-truth map from a classical Canny lter.
Figure 2. Illustrative shot budget vs. image size. Distinct colours differentiate FRQI and NEQR scaling behaviours.
-
-
REAL-WORLD APPLICATION MAPPING
While fully fault-tolerant quantum computers are required for broad advantage, specic domains may see earlier benets.
-
Healthcare: Diagnostic Imaging
Medical imaging (MRI, CT, PET) relies heavily on edge detec-tion for organ segmentation and tumour identication. Quan-tum interference patterns may be more sensitive to subtle am-plitude differences at soft-tissue boundaries. Additionally, quantum algorithms can process raw quantum-sensor data di-rectly, skipping the classical conversion step that introduces quantisation noise.
-
Space: Remote Sensing and Earth Observation
Satellite imagery involves vast datasets with unique challenges. Synthetic Aperture Radar (SAR) images suffer from speckle noise; quantum edge detectors using global properties may separate true topological features (ice-shelf cracks, coastline shifts) from coherent noise better than local convolutional lters. Key challenges include data-latency bottlenecks (state-preparation is O(N )) and the prohibitive energy/thermal re-quirements of superconducting qubits for onboard processing.
-
-
CONCLUSIONS
This report walked through the practical steps of quantum edge detection, starting from FRQI and NEQR image encoding and examining the real-world costs of state preparation, processing, and readout. For full-image-to-full-image tasks, these quantum algorithms do not offer an asymptotic speedup over classical O(N ) methods and are likely much slower in practice. We also showed how noise degrades performance and what mitigation strategies can help.
Key ndings:
-
State preparation is the bottleneck. Without practical QRAM, an end-to-end speedup is unlikely.
-
Measurement is the other bottleneck. Global-query models that avoid reading the full image back out are a more promising direction.
-
Noise sensitivity: FRQI (analog) is fragile; NEQR (digi-tal) is more robust but qubit-hungry. This trade-off is a major challenge.
-
Real hardware validation is needed. Most QIP results rely on simulators; experiments on actual noisy hardware are scarce.
The most likely path to quantum advantage is not replacing classical lters but nding niche problems where the input is already quantum or only a single global image property is needed.
-
DIAGRAMS (FRQI, CIRCUIT, FLOWCHART)
Figure 5. High-level pipeline: Input Image Quantum Processing
Error Mitigation Measurement & Reconstruction Classical Post-Processing Edge Map.
================================================
-
QISKIT EXAMPLE CODE
-
The following self-contained Qiskit example demonstrates FRQI-style encoding for a small image and a Hadamard-based edge probe. This code uses the Aer simulator.
Figure 3. FRQI conceptual diagram: the position register controls a rotation on the single intensity qubit to encode pixel values as amplitudes.
Figure 4. Schematic quantum circuit for edge detection: superposition creation (H), neighbour-checking oracle (Controlled-X), and measurement.
1
from qiskit import QuantumRegister, ClassicalRegister,
QuantumCircuit
from qiskit_aer import AerSimulator from qiskit.compiler import transpile
from qiskit.circuit.library import RYGate import numpy as np
def frqi_angles_from_image(img):
# Map pixel values [0,1] -> angles [0, pi/2] angles = (np.pi / 2.0) * img.flatten() return angles
def build_frqi_circuit(angles): n_pixels = len(angles)
n_idx = int(np.ceil(np.log2(n_pixels))) qidx = QuantumRegister(n_idx, idx) qint = QuantumRegister(1, int)
c = ClassicalRegister(1, c) qc = QuantumCircuit(qidx, qint, c)
# Put index register into uniform superposition qc.h(qidx)
qc.barrier()
# Naive controlled rotations for small N for idx, theta in enumerate(angles):
if theta > 0:
bits = format(idx, f0{n_idx}b)[::-1] for i, b in enumerate(bits):
if b == 0:
qc.x(qidx[i])
cry = RYGate(2 * theta).control(n_idx) qc.append(cry, qidx[:] + [qint[0]]) for i, b in enumerate(bits):
if b == 0:
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Listing 1. Qiskit FRQI + Hadamard probe (example)
qc.x(qidx[i]) qc.barrier()
return qc
if name == main :
# Sample 4×4 image: centre square img = np.zeros((4, 4))
img[1:3, 1:3] = 1.0
print(“Input Image:\n”, img)
angles = frqi_angles_from_image(img) qc = build_frqi_circuit(angles)
# Hadamard probe on intensity qubit qc.h(qint[0])
qc.measure(qint[0], c[0])
backend = AerSimulator() t_qc = transpile(qc, backend)
job = backend.run(t_qc, shots=1024) counts = job.result().get_counts() print(“\nMeasurement counts:”, counts)
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
REFERENCES
-
P. Q. Le, F. Dong, and K. Hirota, A exible represen-tation of quantum images for polynomial preparation, image compression, and processing operations, Quan-tum Information Processing, vol. 10, no. 1, pp. 6384,
2011.
-
Y. Zhang, K. Lu, Y. Gao, and M. Wang, NEQR: A novel enhanced quantum representation of digital im-ages, Quantum Information Processing, vol. 12, no. 8,
pp. 28332860, 2013.
-
F. Yan, A. M. Iliyasu, and S. E. Venegas-Andraca, A survey of quantum image representations, Quantum In-formation Processing, vol. 15, no. 1, pp. 135, 2016.
-
G. Cavalieri and D. Maio, A quantum edge detection algorithm, arXiv preprint arXiv:2012.11036, 2020.
-
Y. Zhang, K. Lu, and Y. Gao, QSobel: A novel quan-tum image edge extraction algorithm, Science China Information Sciences, vol. 58, pp. 113, 2015.
-
S. Yuan, X. Mao, and Y. Li, Quantum image edge de-tection based on improved Sobel operator, International Journal of Theoretical Physics, vol. 56, no. 8, pp. 24332445, 2017.
-
Y. Ruan, H. Chen, J. Tan, and X. Li, Quantum image edge detection based on N-level quantum image repre-sentation, IEEE Access, vol. 4, pp. 57845793, 2016.
-
R. G. Zhou, H. Lan, and B. Sun, Quantum image edge extraction based on improved Prewitt operator, Quantum Information Processing, vol. 18, no. 9, p. 261, 2019.
-
X. W. Yao et al., Quantum image edge detection algo-rithm based on Franklin moments, Quantum Informa-tion Processing, vol. 16, no. 11, p. 285, 2017.
-
P. Xu, Z. He, T. Qiu, and H. Ma, Quantum image pro-cessing algorithm using edge extraction based on Kirsch operator, Optics Express, vol. 28, no. 12, pp. 17654
17668, 2020.
-
S. Srivastava, S. A. Khan, and A. P. Singh, Quantum edge detection using quantum Hadamard gate and Sobel operator, Optical and Quantum Electronics, vol. 55, no. 13, p. 1123, 2023.
-
A. Mari, T. R. Bromley, J. Izaac, M. Schuld, and N. Kil-loran, Transfer learning in hybrid classical-quantum neural networks, Quantum, vol. 4, p. 340, 2020.
-
J. Wang, Y. Jiang, and Z. Wang, Quantum image edge
detection based on quantum wavelet transform, Inter-national Journal of Theoretical Physics, vol. 59, no. 6,
pp. 18871902, 2020.
-
W. Liu, Z. Gao, and Y. Liu, Quantum image edge de-tection based on quantum Laplacian operator, Optik, vol. 181, pp. 291300, 2019.
-
P. Fan, R. G. Zhou, W. Hu, and N. Jing, Quantum image edge detection based on quantum morphological opera-tions, Quantum Information Processing, vol. 18, no. 1,
p. 27, 2019.
-
M. G. Amankwah, P. O. D. Mensah, and K. A. Boateng, Novel efcient quantum image compression method based on NEQR, Quantum Informaton Processing, vol. 21, no. 3, p. 89, 2022.
-
P. Li, X. Liu, and H. Xiao, Quantum image processing for medical image analysis: A survey, Entropy, vol. 23, no. 4, p. 429, 2021.
-
S. Heidari et al., Quantum edge detection for remote sensing images, IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, vol. 15,
pp. 12001210, 2022.
-
M. V. Altaisky et al., Quantum neural networks for edge detection, Physics of Particles and Nuclei, vol. 47, no. 5,
pp. 873876, 2016.
-
M. Schuld, I. Sinayskiy, and F. Petruccione, An intro-duction to quantum machine learning, Contemporary Physics, vol. 56, no. 2, pp. 172185, 2015.
-
K. Bharti et al., Noisy intermediate-scale quantum (NISQ) algorithms, Reviews of Modern Physics, vol. 94, no. 1, p. 015004, 2022.
-
M. Cerezo et al., Variational quantum algorithms, Na-ture Reviews Physics, vol. 3, no. 9, pp. 625644, 2021.
-
S. Endo, S. C. Benjamin, and Y. Li, Practical quantum error mitigation for near-future applications, Physical Review X, vol. 8, no. 3, p. 031027, 2018.
-
A. Kandala et al., Error mitigation extends the com-putational reach of a noisy quantum processor, Nature, vol. 567, no. 7749, pp. 491495, 2019.
-
Y. Kim et al., Evidence for the utility of quantum com-puting before fault tolerance, Nature, vol. 618, no. 7965,
pp. 500505, 2023.
-
S. Ghosh and D. Ghosh, Noise mitigation in quantum image processing using error correction codes, Interna-tional Journal of Quantum Information, vol. 19, no. 8,
p. 2150032, 2021.
-
H. Y. Wong et al., Quantum image processing on real quantum hardware: A case study, IEEE Transactions on Quantum Engineering, vol. 3, pp. 112, 2022.
-
Qiskit contributors, Qiskit: An Open-source Frame-work for Quantum Computing, 2023. [Online]. Avail-able: https://qiskit.org
-
P. W. Shor, Fault-tolerant quantum computation, Pro-
ceedings of 37th Conference on Foundations of Computer Science, pp. 5665, 1996.
-
D. Gottesman, Stabilizer codes and quantum error cor-rection, Ph.D. dissertation, California Institute of Tech-nology, 1997.
