Abstract
This source code is meant to support the understanding of our paper Improved FRQI on superconducting processors and its restrictions in the NISQ era. In image processing, the amount of data to be processed grows rapidly, in particular when dealing with images of more than two dimensions or time series of images. Thus, efficient processing is a challenge, as data sizes may push even supercomputers to their limits. Quantum image processing promises to encode images with logarithmically less qubits than classical pixels in the image. In theory, this is a huge progress, but so far not many experiments have been conducted in practice, in particular on real backends. Often, the precise conversion of classical data to quantum states, the exact implementation, and the interpretation of the measurements in the classical context are challenging. We investigate these practical questions in this paper. In particular, we study the feasibility of the flexible representation of quantum images (FRQI). Furthermore, we check experimentally the limit in the current noisy intermediate-scale quantum era, i.e., up to which image size an image can be encoded, both on simulators and on real backends. Finally, we propose a method for simplifying the circuits needed for the FRQI. With our alteration, the number of gates can be reduced, especially the one of the error-prone controlled-NOT gates. As a consequence, the size of manageable images increases.