Compiler-assisted code generation for quantum computing: leveraging the unique properties of quantum architectures

Authors

  • G. G. James Department of Computing, Topfaith University, Mkpatak, Nigeria
  • A. P. Ekong Department of Computer Science, Akwa Ibom State University, Ikot Akpaden, Nigeria
  • A. U. Unyime Department of Computer and Robotic Education, University of Uyo, Nigeria
  • A. Akpanobong Department of Computer Networks, Faculty of Science and Information Technology, UPM, Serdang, Malaysia
  • J. A. Odey Department of Computer Science, University of Calabar, Calabar, Nigeria
  • D. O. Egete Department of Computer Science, University of Calabar, Calabar, Nigeria
  • S. Inyang Department of Computing, Topfaith University, Mkpatak, Nigeria
  • I. Ohaeri Department of Computing, Topfaith University, Mkpatak, Nigeria
  • C. M. Orazulume Department of Electrical Electronics Engineering, Topfaith University, Mkpatak, Nigeria
  • E. Etuk Department of Computer Science, Michael Okpara University of Agriculture, Umudike, Nigeria
  • P. Okafor Department of State Service, Ebonyi State Command, Abakaliki, Nigeria

Keywords:

Neuroprotection, Quantum computing, quantum architectures, quantum circuits design, quantum code optimization

Abstract

Quantum computing holds transformative potential, but its adoption is hindered by the complexity of generating efficient, hardware-specific code. This work presents a modular, extensible compiler framework that bridges high-level quantum languages with diverse hardware architectures. The framework consists of three modules: a front-end for parsing quantum code into a hardware-agnostic intermediate representation (IR), an optimization module for enhancing quantum circuits through gate synthesis, qubit routing, and error mitigation, and a back-end for generating hardware-specific instructions. Major contributions include a hardware-agnostic IR for cross-platform compatibility, optimization techniques to reduce gate complexity and noise, and hardware-specific adaptations to improve execution fidelity. A practical demonstration optimizes quantum circuits, highlighting the impact of hardware constraints. Comparative analysis of IBM Quantum and IonQ platforms underscores the role of qubit connectivity and noise resilience in algorithmic performance. This scalable framework enhances quantum software development and efficient hardware utilization.

Dimensions

[1] P. Shor, “Algorithms for quantum computation: Discrete logarithms and factoring”, Proc. 35th Annu. Symp. Found. Comput. Sci., pp. 124–134, 1994. https://ieeexplore.ieee.org/abstract/document/365700/.

[2] I. L. Chuang & M. A. Nielsen, “Quantum Computation and Quantum Information”, 10th ed., Cambridge University Press, 2010. https://www.cambridge.org/highereducation/books/quantum-computation-and-quantum-information/01E10196D0A682A6AEFFEA52D53BE9AE.

[3] A. W. Cross, A. Javadi-Abhari, T. Alexander, N. De Beaudrap, L. S. Bishop, S. Heidel, C. A. Ryan, P. Sivarajah, J. Smolin, J. M. Gambetta & B. R. Johnson, “OpenQASM 3: A broader and deeper quantum assembly language”, ACM Transactions on Quantum Computing 3 (2022) 3. https://doi.org/10.1145/3505636.

[4] D. Wecker & K. M. Svore, “LIQUi|>: A software design architecture and domain-specific language for quantum computing”, Quantum Sci. Technol. 2 (2017) 015006. https://www.researchgate.net/publication/260268455_LIQUi_A_Software_Design_Architecture_and_Doma_in-Specific_Language_for_Quantum_Computing.

[5] S. S. Tannu & M. K. Qureshi, “Not all qubits are created equal: A case for variability-aware policies for NISQ-era quantum computers”, Proc. 24th Int. Conf. Arch. Support Program. Lang. Oper. Syst. 2019 987. https://dl.acm.org/doi/abs/10.1145/3297858.3304007.

[6] A. JavadiAbhari, S. Patil, D. Kudrow, J. Heckey, A. Lvov, F. T. Chong & M. V. Martonosi, “ScaffCC: Scalable compilation and analysis of quantum programs”, Proc. Int. Conf. High Perform. Comput., Netw., Storage Anal., pp. 1–11, 2014. https://oar.princeton.edu/handle/88435/pr1768q.

[7] P. Selinger, “Efficient Clifford+T approximation of single-qubit operators”, Quantum Inf. Comput. 15 2015 159. https://ui.adsabs.harvard.edu/abs/2012arXiv1212.6253S/abstract.

[8] S. Sivarajah, S. Dilkes, A. Cowtan, W. Simmons, A. Edgington & R. Duncan, “t|ket>: A retargetable compiler for NISQ devices”, Quantum Sci. Technol. 6 2021 014003. https://iopscience.iop.org/article/10.1088/2058-9565/ab8e92/meta.

[9] A. D. Corcoles, A. Kandala, A. Javadi-Abhari, D. T. McClure, A. W. Cross, K. Temme, P. D. Nation, M. Steffen & J. M. Gambetta, “Challenges and opportunities of near-term quantum computing systems”, Proc. IEEE Int. Symp. High-Perf. Comput. Arch., pp. 1–6, 2021. https://ieeexplore.ieee.org/abstract/document/8936946/.

[10] A. G. Fowler, M. Mariantoni, J. M. Martinis & A. N. Cleland, “Surface codes: Towards practical large-scale quantum computation”, Phys. Rev. A 86 2012 032324. https://journals.aps.org/pra/abstract/10.1103/PhysRevA.86.032324.

[11] T. Haner, D. S. Steiger, K. Svore & M. Troyer, “A software methodology for compiling quantum programs”, Proc. ACM/IEEE Design Autom. Conf., pp. 1–6, 2016. https://iopscience.iop.org/article/10.1088/2058-9565/aaa5cc/meta.

[12] M. Amy, D. Maslov, M. Mosca & M. Roetteler, “A meet-in-the-middle algorithm for fast synthesis of depth-optimal quantum circuits”, IEEE Trans. Comput.-Aided Design Integr. Circuits Syst. 32 2013 818. https://ieeexplore.ieee.org/abstract/document/6516700/.

[13] Y. Ge, W. Wenjie, C. Yuheng, P. Kaisen, L. Xudong, Z. Zixiang, W. Yuhan, W. Ruocheng & Y. Junchi, “Quantum circuit synthesis and compilation optimization: overview and prospects”, Quantum Physics 104 2021 022403. https://openreview.net/forum?id=PlJz4JUOYh.

[14] M. Saeedi, R. Wille & Rolf Drechsler, “Synthesis of quantum circuits for linear nearest neighbor architectures”, Quantum Information Processing 10 (2011) 355377. https://doi.org/10.1007/s11128-010-0201-2.

[15] K. Mitarai, M. Negoro, M. Kitagawa & K. Fujii, “Quantum circuit learning”, Phys. Rev. A 98 2018 032309. https://journals.aps.org/pra/abstract/10.1103/PhysRevA.98.032309.

[16] K. Mitarail, M. Negoro, M. Kitagawa & K. Fujii, “Quantum circuit learning”, Physical Review Journal 98 (2020) 032309. https://doi.org/10.1103/PhysRevA.98.032309.

[17] F. Wagner, D. J. Egger & F. Liers, “Optimized noise suppression for quantum circuits”, Informs Journal of Computing 37 (2024) 1. https://doi.org/10.1287/ijoc.2024.0551.

[18] D. Gottesman, “The Heisenberg representation of quantum computers”, Proc. XXII Int. Colloq. Group Theor. Methods Phys., 1998. https://ui.adsabs.harvard.edu/abs/1998quant.ph..7006G/abstract.

[19] J. Preskill, “Quantum computing in the NISQ era and beyond”, Quantum 2 2018 79. https://quantum-journal.org/papers/q-2018-08-06-79/.

[20] M. Suchara, J. Kubiatowicz, A. Faruque, F. T. Chong, C. Y. Lai & G. Paz, “QuRE: The quantum resource estimator tool”, Proc. Int. Conf. Quan tum Comput. Eng., pp. 1–8, 2020. https://ieeexplore.ieee.org/abstract/document/6657074/.

[21] F. Arute, K. Arya, R. Babbush, D. Bacon, J. C. Bardin, R. Barends, R. Biswas, S. Boixo, F.G. Brandao, D. A. Buell & B. Burkett, “Quantum supremacy using a programmable superconducting processor”, Nature 574 2019 505. https://www.nature.com/articles/s41586-019-1666-5.

[22] A revolutionary computing capability to sift through huge numbers of possibilities and extract potential solutions to complex problems, by A. Valavanidis. (2024, 16 January). [Online]. Available: Quantum Computing.

[23] Z. Cai, R. Babbush, S. C. Benjamin, S. Endo, W. J. Huggins, Y. Li, J. R. McClean & T. E. O’Brien, “Quantum error mitigation”, Reviews of Modern Physics 95 (2023) 045005. https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.95.045005.

[24] L. Egan, D. M. Debroy, C. Noel, A. Risinger, D. Zhu, D. Biswas, M. Newman, M. Li, K. R. Brown, M. Cetina & C. Monroe, “Fault-tolerant operation of a quantum error-correction code”, Quantum Physics. https://inspirehep.net/literature/2727223.

[25] Y. Cao, A. Daskin, S. Frankel & S. Kais, “Quantum circuit design for solving linear systems of equations”, An International Journal at the Interface Between Chemistry and Physics 110 (2012) 16. https://www.tandfonline.com/doi/abs/10.1080/00268976.2012.668289.

[26] Y. R. Sanders, D. W. Berry, P. C. Costa, L. W. Tessler, N. Wiebe, C. Gidney, H. Neven & R. Babbush, “Compilation of fault-tolerant quantum circuits”, Phys. Rev. A, 101 2020 042304. https://journals.aps.org/prxquantum/abstract/10.1103/PRXQuantum.1.020312.

[27] R. Raussendorf & H. J. Briegel, “A one-way quantum computer”, Phys. Rev. Lett. 86 2001 5188. https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.86.5188.

[28] L. Botelho, A. Glos, A. Kundu, J. A. Miszczak, O. Salehil & Z. Zimboras, “Error mitigation for variational quantum algorithms through mid-circuit measurements”, Phys. Rev. A 105 (2022) 022441. https://journals.aps.org/pra/abstract/10.1103/PhysRevA.105.022441.

[29] T. Lubinski, C. Coffrin, C. McGeoch, P. Sathe, J. Apanavicius, D. B. Neira & Quantum Economic Development Consortium(QED-C) Collaboration, “Optimization applications as quantum performance benchmarks”, ACM Transactions on Quantum Computing 5 (2023) 144. https://doi.org/10.1145/3678184.

[30] F. Hua, Y. Chen, Y. Jin, C. Zhang, A. Hayes, Y. Zhang & E. Z. Zhang, “AutoBraid: a framework for enabling efficient surface code communication in quantum computing”, MICRO ’21: MICRO-54: 54th Annual IEEE/ACM International Symposium on Microarchitecture 925 (2021) 936. https://dl.acm.org/doi/abs/10.1145/3466752.3480072.

[31] P. Selinger, “A brief survey of quantum programming languages”, in Proceedings of the 7th International Conference on Mathematics of Program Construction, Stirling, UK, Jul. 2004, pp. 1–15. https://link.springer.com/chapter/10.1007/978-3-540-24754-8 1.

[32] T. Haner, D. S. Steiger, M. Smelyanskiy & M. Troyer, “High-performance emulation of quantum circuits”, in Proceedings of the International Conference for High-Performance Computing, Networking, Storage and Analysis (SC), Denver, CO, USA, Nov. 2016, pp. 866–874. https://ieeexplore.ieee.org/abstract/document/7877152.

[33] M. Zhang, J. Wang & J. Lai, ”Performance evaluation of quantum computing processors based on quantum assembly language”, 9th International Conference on Cloud Computing and Big Data Analytics (ICCCBDA), 2024. https://ieeexplore.ieee.org/abstract/document/10569330/.

[34] A. Cowtan, S. T. Dill, R. Duncan, A. Krajenbrink, W. Simmons & S. Sivarajah, “On the qubit routing problem”, in Proceedings of the 14th International Conference on Quantum Physics and Logic (QPL), Nijmegen, Netherlands, Jul. 2017, pp. 5–19. https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.TQC.2019.5.

[35] F. J. Cardama, J. Vazquez-P ´ erez, C. Pi ´ neiro, J. C. Pichel, T. F. Pena & A. Gomez, “Review of intermediate representations for quantum computing”, The Journal of Supercomputing 81 (2025) 418. https://link.springer.com/article/10.1007/s11227-024-06892-2.

[36] M. Amy, D.Maslov & M. Mosca, “Polynomial-time T-depth optimization of Clifford+T circuits via matroid partitioning”, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 32 2013 818. https://doi.org/10.1109/TCAD.2013.2244643.

[37] G. G. James, E. G. Chukwu & P. O. Ekwe, “Design of an Intelligent based System for the Diagnosis of Lung Cancer,” Int. J. Innov. Sci. Res. Technol. 12 (2023) 791. https://www.academia.edu/105440235/Design_of_an_Intelligent_based_System_for_the_Diagnosis_of_Lung_Cancer?uc-g-sw=71431716.

[38] C. Ituma, G. G. James & F. U. Onu, “Implementation of intelligent document retrieval model using neuro-fuzzy technology,” Int. J. Eng. Appl. Sci. Technol. 4 (2020) 65. https://www.researchgate.net/publication/341062155_IMPLEMENTATION_OF_INTELLIGENT_DOCUMENT_RETREIVAL_MODEL_USING_NEURO-FUZZY_TECHNOLOGY.

[39] C. I. Iwok, S. Obot & G. G. James, “A model of intelligent packet switching in wireles communication networks,” Int. J. Sci. Eng. Res. 11 (2020) 64. https://www.ijser.org/researchpaper/A-MODEL-OF-INTELLIGENT-PACKET-SWITCHING-IN-WIRELES-COMMUNICATION-NETWORKS.pdf.

[40] C. I. Ituma, Iwok, S. Obot & G. G. James, “Implementation of an optimized packet switching parameters in wireless communication net works”, Int. J. Sci. Eng. Res. 11 (2020) 58. https://www.ijser.org/researchpaper/IMPLEMENTATION-OF-AN-OPTIMIZED-PACKET-SWITCHING-PARAMETERS-IN-WIRELESS-COMMUNICATION-NETWORKS.pdf.

[41] G. G. James, A. E. Okpako C. Ituma, & J. E. Asuquo, “Development of Hybrid Intelligent based Information Retrieval Technique”, Int. J. Comput. Appl. 184 (2022) 13. dhttps://unidel.edu.ng/cms/uploads/publications/unidel_pub_1689455282.pdf.

[42] Ituma, G. G. James & F. U. Onu, “A neuro-fuzzy based document tracking & classification system”, Int. J. Eng. Appl. Sci. Technol. 4 (2020) 414. https://unidel.edu.ng/cms/uploads/publications/unidel_ pub1689455282.pdf.

[43] M. Y. Siraichi, V. F. Santos, S. Collange & F. M. Q. Pereira, “Qubit allocation”, Proceedings of the 2018 International Symposium on Code Generation and Optimization, 2018, pp. 113–125. https://dl.acm.org/doi/abs/10.1145/3168822.

[44] F. T. Chong, K. Y. Tan, Y. Ding, Y. Shi, W. J. Zeng, C. J. Lin & S. Yong, “A quantum computing compiler and design flow”, in Proceedings of the 24th ACM International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2019, pp. 52–63. https://dl.acm.org/doi/pdf/10.1145/329-7858.3304075.

[45] A. Bocharov, M. Roetteler & K. M. Svore, ”Efficient synthesis of universal repeat-until-success quantum circuits”, Physical Review Letters 114 2017 080502. https://journals.aps.org/prl/abstract/10.1103/PhysRevLett.114.080502.

[46] A. Zulehner, A. Paler & R. Wille, “Efficient mapping of quantum circuits to the IBM QX architectures”, IEEE Transactions on Computer Aided Design of Integrated Circuits and Systems 38 2018 1226. https://ieeexplore.ieee.org/document/8342181.

[47] P. Murali, ”Noise-adaptive compiler mappings for noisy intermediatescale quantum computers”, Proceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS), 2019, pp. 1015–1029. https://dl.acm.org/doi/10.1145/3297858.3304075.

[48] Anietie Ekong, Immaculata Attih, Gabriel James & Unyime Edet, “Effective Classification of Diabetes Mellitus Using Support Vector Machine Algorithm”, Res. J. Sci. Technol. 4 (2024) 34. https://www.rejost.com.ng/index.php/home/article/view/97.

[49] C. I. Iwok, S. Obot & G. G. James, “A model of intelligent packet switching in wireles communication networks”, Int. J. Sci. Eng. Res. 11 (2020) 64. https://www.ijser.org/researchpaper/A-MODEL-OF-INTELLIGENT-PACKET-SWITCHING-IN-WIRELES-COMMUNICATION-NETWORKS.pdf.

[50] C. I. Ituma, Iwok, Sunday Obot & G. G. James, “Implementation of an optimized packet switching parameters in wireless communication networks”, Int. J. Sci. Eng. Res. 11 (2020) 58. https://www.ijser.org/researchpaper/IMPLEMENTATION-OF-AN-OPTIMIZED-PACKET-SWITCHING-PARAMETERS-IN-WIRELESS-COMMUNICATION-NETWORKS.pdf.

[51] A. P. Ekong, G. G. James & I. Ohaeri, “Oil and Gas Pipeline Leakage Detection using IoT and Deep Learning Algorithm”, J. Inf. Syst. Inform. 6 (2024) 421. https://pdfs.semanticscholar.org/9acb/077b59f349d6a60df2d6703d5e3741cf3132.pdf.

[52] K. Hietala, R. Rand, S. Hung, X. Wu & Michael Hicks, “A verified optimizer for Quantum circuits”, Proceedings of the ACM on Programming Languages 5 (2023) 29. https://doi.org/10.1145/3434318.

[53] A. W. Cross, L. S. Bishop, S. Sheldon, P. D. Nation & J. M. Gam betta, “Open Quantum assembly language”, arXiv preprint, 2017. https://ui.adsabs.harvard.edu/abs/2017arXiv170703429C/abstract.

[54] A. G. Fowler, M. Mariantoni, J. M. Martinis & A. N. Cleland, “Surface codes: Towards practical large-scale Quantum computation”, Physical Review A 86 (2012) 032324. https://journals.aps.org/pra/abstract/10.1103/PhysRevA.86.032324.

Histogram of measurement probabilities for the IBM Quantum implementation of the 3-qubit QFT algorithm.

Published

2025-05-01

How to Cite

Compiler-assisted code generation for quantum computing: leveraging the unique properties of quantum architectures. (2025). Journal of the Nigerian Society of Physical Sciences, 7(2), 2615. https://doi.org/10.46481/jnsps.2025.2615

Issue

Section

Computer Science

How to Cite

Compiler-assisted code generation for quantum computing: leveraging the unique properties of quantum architectures. (2025). Journal of the Nigerian Society of Physical Sciences, 7(2), 2615. https://doi.org/10.46481/jnsps.2025.2615