JPEG-Assisted QPIE: Hybrid Quantum Image Encoding
- The paper presents a hybrid classical–quantum protocol that integrates JPEG’s DCT and quantization to reduce quantum gate counts while preserving image fidelity.
- JQPIE employs truncated 8×8 DCT coefficients for efficient amplitude encoding, achieving up to a 10× reduction in quantum resources compared to direct QPIE.
- The approach generalizes to both amplitude encoding and gate-based representations, with experimental evaluations confirming near-classical JPEG image quality and improved fidelity in its quantization-free variant.
JPEG-Assisted QPIE (JQPIE) is a hybrid classical–quantum image preparation protocol that leverages JPEG compression principles—most notably, 8×8 block-wise discrete cosine transform (DCT) and quantization—to dramatically reduce quantum resource requirements in quantum pixel information encoding (QPIE). By loading only a chosen subset of quantized (or in a variant, unquantized) DCT coefficients into quantum registers, JQPIE enables the efficient construction of quantum image states with gate counts that are reduced by a large constant factor relative to direct QPIE—while retaining image quality metrics on par with classical JPEG, or exceeding them in its quantization-free variant. The approach generalizes the method to both state-preparation-based (amplitude encoding) QPIE schemes (Boosari, 5 Feb 2026) and gate-based quantum image representations such as GQIR (Wang et al., 2017).
1. Hybrid Classical–Quantum Workflow
The JQPIE protocol decomposes image preparation into a classical preprocessing stage and a quantum loading and decompression stage:
A. Classical Preprocessing
- The input image of size is partitioned into pixel blocks .
- For each block, the 2D discrete cosine transform (DCT) is applied:
- Standard JPEG quantization is performed:
where is the standard 8×8 quantization matrix.
- A zigzag permutation (standard JPEG order) is applied to the quantized coefficients, and the first coefficients are retained:
with the zigzag mapping.
B. Quantum Stage
- A quantum state preparation (QSP) routine loads the truncated coefficient vectors as amplitudes, employing index and data registers for addressing blocks and coefficients.
- Quantum decompression comprises three steps:
- Inverse zigzag permutation to restore 0 order.
- Coherent inverse quantization, implemented via block-encoded diagonal unitaries acting jointly on data and a single ancilla.
- Inverse quantum DCT (QDCT), implemented as a separable unitary on each block's subspace.
- Measurement or amplitude amplification post-selects the image state in the ancilla 1 subspace or amplifies its probability as required.
A variant, quantization-free JQPIE (QF-JQPIE), omits quantization and corresponding inverse operations, directly encoding and decompressing the leading DCT coefficients.
2. Circuit Construction and Quantum State Encoding
Registers
- Index register: 2 qubits select blocks (3).
- Data register: 6 qubits address DCT coefficient index 4 within each block.
- Ancilla qubit (JQPIE only): mediates block-encoded quantization during inverse quantization.
Amplitude Encoding for Truncated Coefficients
State preparation operator 5 exactly loads the 6 non-zero amplitudes:
7
where 8 and 9 is a normalization constant.
- The block-encoded unitary for inverse quantization 0 applies a rescaled diagonal 1 using 2-fold uniformly controlled 3 rotations on the ancilla (4, 5 with 6).
QF-JQPIE: Quantization-Free Pathway
- After DCT, apply zigzag and truncate; no quantization or ancilla required.
- The prepared state:
7
where 8.
- Inverse zigzag and only an inverse quantum DCT are required for decompression.
3. Resource Analysis and Quantum Gate Complexity
The main quantum resource cost in JQPIE is set by the QSP stage for truncated block representations, scaling as 9 entangling gates (CX):
| Approach | CX gates (32×32, r=3) | Circuit depth |
|---|---|---|
| Direct QPIE | 1024 | 1024 |
| JQPIE | 228 | 292 |
| QF-JQPIE | 164 | 163 |
- JQPIE reduces the QSP gate count to 0 (12.5% of direct QPIE); end-to-end, the count is 1 of the direct baseline.
- QF-JQPIE achieves 2 of the baseline gate count and even lower depth due to the absence of the block-encoded quantization step.
For large images, the compression factor asymptotes to about a 3 reduction in the leading-order gate count relative to full-amplitude preparation, due to JPEG's energy compaction in the DCT domain and coefficient truncation (Boosari, 5 Feb 2026, Wang et al., 2017).
4. Image Reconstruction Fidelity and Comparative Evaluation
Image fidelity is assessed by 4PSNR and 5SSIM relative to classical JPEG after quantum decompression:
- JQPIE (6, 32 coeffs/block):
- 7 of images have 8PSNR9 dB, 0SSIM1.
- Mean values: 2PSNR3 dB, 4SSIM5.
- JQPIE (6, 16 coeffs):
- 7 of images meet 8PSNR threshold.
- QF-JQPIE (9):
- Nearly all images achieve 0PSNR1 and mean 2SSIM3 (improved over JPEG due to absence of quantization noise).
- QF-JQPIE (4):
- 5 of images maintain or exceed JPEG SSIM.
Experimental evaluations on standard datasets (USC–SIPI, Kodak), show that both JQPIE and QF-JQPIE maintain high perceptual quality, with QF-JQPIE frequently outperforming classical JPEG by eliminating quantization error (Boosari, 5 Feb 2026).
5. Gate-Level Circuits and Operator Sequences
The circuit-level requirements for JQPIE include:
- State preparation: exact amplitude encoding for the selected blockwise coefficient set.
- Block-encoded inverse quantization (6): 7 CX gates plus 8 9 rotations per block, implemented via a Möttönen-style multiplexed rotation network.
- Inverse DCT: each 0 block requires 1 CX gates (separable over 2 and 3 indices).
- Total depth: sum of QSP, inverse quantization, and inverse DCT layers.
- In GQIR-based realizations (Wang et al., 2017), the leading gate term is 4 multi-controlled-NOTs, plus 5 fixed overhead.
These costs advance prior quantum compression methods, achieving dramatic reductions in both multi-qubit circuit width and entangling gate counts for images at and above 6 pixels, owing to JPEG’s empirically measured quantum compression ratio of 7.
6. Limitations, Parameter Choices, and Extensions
Truncation Fidelity: Fixed per-block coefficient truncation parameter 8 does not exploit local content variation; block misadaptation can reduce quality for high-frequency regions.
Probabilistic Step: JQPIE (quantized path) requires postselection or amplitude amplification on the ancilla 9 subspace due to block-encoded diagonal quantization.
Scaling Properties: Asymptotic scaling remains 0; there is no asymptotic speedup for dense images without further sparsity exploitation.
Potential Enhancements:
- Adaptive blockwise 1 based on local DCT energy distribution.
- Alternative state-preparation transforms: JPEG2000 (wavelets), PCA/SVD, or learned autoencoders.
- Integration with near-optimal sparse-state QSP algorithms to exploit further amplitude sparsity.
- Experimental realization on Noisy Intermediate-Scale Quantum (NISQ) devices, including error mitigation strategies.
A plausible implication is that future methods using adaptive or learned transforms could further reduce gate counts beyond fixed-coefficient truncation.
7. Historical and Comparative Context
The JQPIE scheme generalizes early proposals for quantum image preparation by introducing lossy DCT-based compression and quantum decompression, unlike direct GQIR loading or block encoding schemes without amplitude truncation. Preprocessing times for JQPIE are orders of magnitude faster than block-encoding competitors (e.g., 256×256 images: 2s for JQPIE vs. up to 3 h for baseline block-encoding), and quantum gate savings are consistently an order of magnitude or better (Wang et al., 2017). JQPIE thus enables feasible quantum state construction for downstream quantum image processing and machine learning algorithms on non-trivial image sizes.
Summary Table: Key JQPIE and QF-JQPIE Characteristics
| Feature | JQPIE | QF-JQPIE |
|---|---|---|
| Quantization | Standard JPEG | None |
| Ancilla requirement | 1 (for block-encoding) | None |
| Inverse quantization | Block-encoded unitary | Not required |
| Compression factor (typical) | 410× | 510× |
| Typical 6PSNR vs. JPEG | 70 dB | 8 dB |
| Circuit structure | Probabilistic + amplitude amp | Fully unitary |
| Applicability to high-frequency data | JPEG-matched | May underperform without higher 9 |
JQPIE and its quantization-free variant establish the compatibility of robust classical compression (JPEG) with scalable quantum image encoding, serving as a template for future hybrid classical–quantum data-loading protocols (Boosari, 5 Feb 2026, Wang et al., 2017).