$Classi|Q\rangle$ Towards a Translation Framework To Bridge The Classical-Quantum Programming Gap

Matteo Esposito,Maryam Tavassoli Sabzevari,Boshuai Ye,Davide Falessi,Arif Ali Khan,Davide Taibi
DOI: https://doi.org/10.1145/3663531.3664752
2024-07-01
Abstract:Quantum computing, albeit readily available as hardware or emulated on the cloud, is still far from being available in general regarding complex programming paradigms and learning curves. This vision paper introduces $Classi|Q\rangle$, a translation framework idea to bridge Classical and Quantum Computing by translating high-level programming languages, e.g., Python or C++, into a low-level language, e.g., Quantum Assembly. Our idea paper serves as a blueprint for ongoing efforts in quantum software engineering, offering a roadmap for further $Classi|Q\rangle$ development to meet the diverse needs of researchers and practitioners. $Classi|Q\rangle$ is designed to empower researchers and practitioners with no prior quantum experience to harness the potential of hybrid quantum computation. We also discuss future enhancements to $Classi|Q\rangle$, including support for additional quantum languages, improved optimization strategies, and integration with emerging quantum computing platforms.
Software Engineering,Computation and Language,Emerging Technologies,Programming Languages
What problem does this paper attempt to address?
The problem that this paper attempts to solve is the programming gap between classical computing and quantum computing. Specifically, the authors propose a translation framework named đ¶đ‘™đ‘Žđ‘ đ‘ đ‘–|đ‘„âŸ©, aiming to convert high - level programming languages (such as Python or C++) into low - level quantum assembly languages (such as QASM), so that researchers and practitioners without a quantum computing background can also take advantage of the potential of quantum computing. ### Main problems 1. **Accessibility and complexity of quantum computing**: Although quantum computing hardware or simulation environments are already available in the cloud, due to complex programming paradigms and a steep learning curve, quantum computing is still difficult to be widely applied. 2. **Differences in programming languages**: There are significant differences between classical programming languages (such as Python, C++) and quantum programming languages (such as QASM, Q#), which prevent researchers and practitioners from making a seamless transition from classical computing to quantum computing. 3. **Lack of efficient translation tools**: Currently, there is a lack of an effective tool that can directly translate algorithms written in classical programming languages into quantum assembly languages to fully utilize the advantages of quantum computing. ### Solutions To address the above problems, this paper proposes a new translation framework - đ¶đ‘™đ‘Žđ‘ đ‘ đ‘–|đ‘„âŸ©, whose main objectives include: - **Source code translation**: Through the abstract syntax tree (AST) as an intermediate representation, achieve automatic translation from classical programming languages to quantum assembly languages. - **Optimization module**: Introduce quantum programming language patterns (QPLPs) to optimize the entire code block and replace parts of classical computing with efficient implementations of quantum computing. - **Support for multiple languages**: There are plans to expand support for more quantum programming languages in the future and integrate them into emerging quantum computing platforms. ### Specific contributions 1. **Propose the first translator from PyC to QASM**: This is the first tool that can translate Python or C++ code into QASM. 2. **Introduce the concept of QPLP**: Define quantum programming language patterns for more efficient optimization and replacement of code blocks in classical computing. 3. **Promote multidisciplinary cooperation**: By simplifying the programming process of quantum computing, researchers and practitioners from different backgrounds can more easily participate in the research and development of quantum computing. ### Conclusion The đ¶đ‘™đ‘Žđ‘ đ‘ đ‘–|đ‘„âŸ© framework aims to bridge the gap between classical computing and quantum computing, enabling more researchers and practitioners to take advantage of the powerful capabilities of quantum computing without in - depth understanding of the underlying principles of quantum computing. This work not only promotes the development of quantum software engineering but also provides an important basic tool for future quantum computing applications.