---
title: Quantum Probability Image Encoding (QPIE)
url: https://www.emergentmind.com/topics/quantum-probability-image-encoding-qpie
type: topic
---

# Quantum Probability Image Encoding (QPIE)

Quantum Probability Image Encoding (QPIE) is a quantum data-loading strategy designed to embed classical grayscale images directly into quantum states via amplitude encoding. It achieves minimal qubit usage—logarithmic in the number of pixels—by mapping normalized pixel intensities to state amplitudes. QPIE has emerged as a key foundation for quantum image processing, supporting downstream applications in quantum machine learning, image compression, and quantum-enhanced feature extraction. Its construction, implementation overhead, and empirical trade-offs have been comprehensively benchmarked against alternatives such as FRQI, NEQR, and tensor network approaches.

## 1. Mathematical Formulation and State Preparation

Given a non-negative grayscale image $I$ of $N$ pixels ($I_k \ge 0$), QPIE normalizes the intensity vector and encodes it as the amplitudes of a pure quantum state over $n=\log_2 N$ qubits:
$$
|\psi_{\text{QPIE}}\rangle = \sum_{k=0}^{N-1} c_k \, |k\rangle,\qquad c_k = \frac{I_k}{\sqrt{\sum_{j=0}^{N-1} I_j^2}}
$$
This construction uses $\ell_2$-normalization to satisfy the unit-norm condition $\sum_k |c_k|^2 = 1$. Each computational-basis state $|k\rangle$ corresponds to a unique pixel address, typically via row- or column-major ordering. For square images of $2^n \times 2^n$ pixels, the encoding uses $2n$ qubits, the theoretical minimum for uniquely specifying all amplitudes [2507.22039, 2410.00742, 2302.07089].

State preparation proceeds via recursive sequences of single- and multi-controlled $R_y$ rotations (binary-tree construction), requiring the computation of partial sums and spherical angle decompositions:
- For $N=2^n$ amplitudes, $O(2^n)$ controlled-rotation gates and $O(n \, 2^n)$ CNOT gates are required [2606.10874, 2410.00742].
- Restricting to real-valued intensities (common in image data) enables the exclusive use of real rotations, omitting arbitrary-phase gates [2302.07089].

QPIE’s state preparation circuit is equivalent to amplitude encoding for classical data, but specialized for images with a natural mapping between the 2D pixel grid and the computational basis.

## 2. Resource Scaling and Optimization Strategies

QPIE achieves the minimal qubit count for encoding $N$-pixel images: $n=\log_2 N$ qubits. However, its generic state-preparation circuit is exponentially costly in gate count and depth:
- Direct state preparation is $O(2^n)$ in both gate count and circuit depth for arbitrary images [2507.22039, 2606.10874].
- Resource optimizations are possible for sparse or structured images, such as skipping zero-intensity regions or exploiting classical precomputation of rotation angles [2410.00742].

### Table 1: Comparison of Qubit and Preparation Complexity (for $2^n \times 2^n$ images)

| Representation | Qubit Count         | Preparation Complexity  |
|----------------|--------------------|------------------------|
| TNR            | $2n+1$             | (instance-dependent)   |
| FRQI           | $2n+1$             | $O(2^{4n})$ (orig.), $O(n2^{2n})$ (EFRQI) |
| NEQR           | $2n+q$ ($q$=bit-depth) | $O(qn2^{2n})$       |
| QPIE           | $2n$               | $O(2^{n})$             |

QPIE achieves the highest compression ratio in terms of bits-per-qubit, with a $256\times$ reduction on 16×16 images compared to their classical representation [2507.22039].

## 3. Advanced State Preparation: Tensor Network and Schmidt Decomposition

To address the exponential circuit depth and CNOT count on near-term hardware, QPIE can be hybridized with tensor network techniques:
- **Matrix Product State (MPS) Approximation:** For sufficiently smooth images, the amplitude vector can be approximated by an MPS of low bond dimension $\chi$, yielding a circuit of $O(N \chi^2)$ gates and $O(N)$ depth [2412.05202]. For smooth, low-entanglement images, $\chi=2-3$ suffices, resulting in dramatically shallower circuits.
- **Schmidt Decomposition (Low-Rank Truncation):** By truncating the bipartite Schmidt rank to the top-$r$ terms (cumulative weight $\geq \delta$), QPIE circuits achieve $O(r)$ scaling in entangling gates while incurring only a modest mean-squared error ($\text{MSE}\lesssim 0.3$ for $r\ll N$) [2606.10874]. Empirically, an $81\%$ depth reduction was realized on $64\times64$ images at little perceptual cost.

Hybrid amplitude-compression methods thus substantively expand the tractable image size on NISQ devices.

## 4. Hybrid Classical-Quantum Image Preparation (JPEG-Assisted QPIE)

JPEG-assisted QPIE (JQPIE) and its quantization-free variant (QF-JQPIE) further reduce the quantum state-preparation overhead:
- **JQPIE** loads JPEG-quantized DCT coefficients into the quantum register, implements blockwise decompression with inverse zigzag permutation and quantization, and applies a quantum inverse DCT [2602.06201].
- **QF-JQPIE** omits quantization, loading DCT coefficients directly and yielding a unitary, ancilla-free quantum pipeline.

This hybrid reduces the main cost from $O(2^n)$ to $O(2^{n-r})$ by truncating frequency coefficients, where $r$ is the number of active coefficients per $8\times8$ block. Empirical studies observe $50$–$90\%$ reductions in gate count/depth with negligible or positive PSNR/SSIM impact compared to direct QPIE.

## 5. Practical Applications: Quantum Edge and Feature Extraction

QPIE’s amplitude encoding directly supports quantum implementations of classical image processing primitives:
- **Quantum Gradient Computation:** QPIE states lend themselves to linear, translation-invariant differencing via a lag-2 permutation pipeline, enabling Sobel-like gradient kernels in superposition [2605.00744].
- **Edge and Corner Detection:** QPIE with quantum Sobel–Harris pipelines achieves superior edge density/fragmentation and up to 100% corner-detection accuracy at zero false-positive rate (in ideal simulation) versus FRQI. QPIE-based outputs exhibit lower shot noise and more coherent gradient sensitivity, especially under restrictive measurement budgets [2605.00744].
- In all cases, state preparation dominates resource cost, highlighting the necessity of hybrid classical-quantum and compressed-preparation strategies for scalability.

## 6. Empirical Benchmarks and Quantum Image Kernel Learning

QPIE has been applied to benchmark tasks in quantum machine learning and classification:
- In supervised binary classification with quantum kernels $K(I, I') = |\langle I | I' \rangle|^2$ (via QPIE), QPIE matches FRQI accuracy (≈97%) on Fashion-MNIST (16×16) at half the qubit cost and only marginally below the classical linear kernel (98%) [2507.22039].
- QPIE-encoded images produce moderately compressed Gram matrices (intermediate off-diagonal overlaps $0.2$–$0.8$), placing it between highly-compressed FRQI and less-compressed NEQR/TNR embeddings for kernel SVMs.

## 7. Limitations, Trade-offs, and Future Directions

The key advantages of QPIE are minimal qubit usage, expressivity for arbitrary grayscale data, and compatibility with quantum transformations (QFT, wavelets, global filters) [2410.00742]. However:
- **Measurement Bottleneck:** Exact pixel retrieval is only possible in the infinite-shot (sampling) limit; typically, $O(1/\min_k c_k^2)$ shots are required per pixel, imposing resource demands on quantum readout.
- **Exponential State Preparation:** Full-rank QPIE preparation is infeasible for large images without compression or structure; hybrid methods are critical for scalability on NISQ processors [2606.10874, 2412.05202, 2602.06201].
- **No direct storage use:** QPIE’s encoding is transient and suitable only for in-circuit computation; measurement collapses the entire superposition.

Ongoing developments focus on adaptive, structure-exploiting compression (tensor networks, JPEG-DCT domain, Schmidt truncation), hybrid pipelines leveraging classical pre/post-processing, and noise-resilient state-preparation tailored to available hardware error budgets.

## References

- [2507.22039] Supervised Quantum Image Processing
- [2606.10874] Schmidt Decomposition-Based Methods for Efficient Quantum Image Encoding
- [2410.00742] Representation of Classical Data on Quantum Computers
- [2412.05202] Entanglement scaling in matrix product state representation of smooth functions and their shallow quantum circuit approximations
- [2605.00744] Quantum Gradient-Based Approach for Edge and Corner Detection Using Sobel Kernels
- [2602.06201] Hybrid Quantum Image Preparation via JPEG Compression
- [2302.07089] Novel Design of Quantum Circuits for Representation of Grayscale Images
- [2110.05476] Image Compression and Classification Using Qubits and Quantum Deep Learning

Source: https://www.emergentmind.com/topics/quantum-probability-image-encoding-qpie