In principle, the design and implementation of quantum programming languages are the same essential tasks as for conventional (classical) programming languages. High-level programming constructs and compilation tools are structurally similar in both cases. The difference is mainly in the hardware machine executing the final code, which in the case of quantum programming languages is a quantum processor, i.e. a physical object obeying the laws of quantum mechanics. Therefore, special technical solutions are required to comply with such laws. In this paper, we show how static analysis can guarantee the correct implementation of quantum programs by introducing two data-flow analyses for detecting some ‘wrong’ uses of quantum variables. A compiler including such analyses would allow for a higher level of abstraction in the quantum language, relieving the programmer of low-level tasks such as the safe removal of temporary variables.

Static Analysis of Quantum Programs

Nicola Assolini;Alessandra Di Pierro;Isabella Mastroeni
2024-01-01

Abstract

In principle, the design and implementation of quantum programming languages are the same essential tasks as for conventional (classical) programming languages. High-level programming constructs and compilation tools are structurally similar in both cases. The difference is mainly in the hardware machine executing the final code, which in the case of quantum programming languages is a quantum processor, i.e. a physical object obeying the laws of quantum mechanics. Therefore, special technical solutions are required to comply with such laws. In this paper, we show how static analysis can guarantee the correct implementation of quantum programs by introducing two data-flow analyses for detecting some ‘wrong’ uses of quantum variables. A compiler including such analyses would allow for a higher level of abstraction in the quantum language, relieving the programmer of low-level tasks such as the safe removal of temporary variables.
2024
978-3-031-74775-5
Quantum programming, Static Analysis, Abstract Interpretation
File in questo prodotto:
File Dimensione Formato  
SAS24_paper_9.pdf

solo utenti autorizzati

Tipologia: Documento in Pre-print
Licenza: Creative commons
Dimensione 686.07 kB
Formato Adobe PDF
686.07 kB Adobe PDF   Visualizza/Apri   Richiedi una copia

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11562/1154927
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
social impact