Twist: Sound Reasoning for Purity and Entanglement in Quantum Programs. Yuan, C., McNally, C., & Carbin, M. Proceedings of the ACM on Programming Languages, 6(POPL):30, January, 2022.
Paper doi abstract bibtex Quantum programming languages enable developers to implement algorithms for quantum computers that promise computational breakthroughs in classically intractable tasks. Programming quantum computers requires awareness of entanglement, the phenomenon in which measurement outcomes of qubits are correlated. Entanglement can determine the correctness of algorithms and suitability of programming patterns. In this work, we formalize purity as a central tool for automating reasoning about entanglement in quantum programs. A pure expression is one whose evaluation is unaffected by the measurement outcomes of qubits that it does not own, implying freedom from entanglement with any other expression in the computation. We present Twist, the first language that features a type system for sound reasoning about purity. The type system enables the developer to identify pure expressions using type annotations. Twist also features purity assertion operators that state the absence of entanglement in the output of quantum gates. To soundly check these assertions, Twist uses a combination of static analysis and runtime verification. We evaluate Twist's type system and analyses on a benchmark suite of quantum programs in simulation, demonstrating that Twist can express quantum algorithms, catch programming errors in them, and support programs that existing languages disallow, while incurring runtime verification overhead of less than 3.5%.
@article{Yuan2022,
title = {Twist: Sound Reasoning for Purity and Entanglement in Quantum Programs},
author = {Yuan, Charles and McNally, Christopher and Carbin, Michael},
year = {2022},
month = jan,
journal = pacmpl,
volume = {6},
number = {POPL},
eid = {30},
pages = {30},
doi = {10.1145/3498691},
archiveprefix = {arXiv},
eprint = {2205.02287},
url = {https://github.com/psg-mit/twist-popl22},
abstract = {Quantum programming languages enable developers to implement algorithms for quantum computers that promise computational breakthroughs in classically intractable tasks. Programming quantum computers requires awareness of entanglement, the phenomenon in which measurement outcomes of qubits are correlated. Entanglement can determine the correctness of algorithms and suitability of programming patterns. In this work, we formalize purity as a central tool for automating reasoning about entanglement in quantum programs. A pure expression is one whose evaluation is unaffected by the measurement outcomes of qubits that it does not own, implying freedom from entanglement with any other expression in the computation. We present Twist, the first language that features a type system for sound reasoning about purity. The type system enables the developer to identify pure expressions using type annotations. Twist also features purity assertion operators that state the absence of entanglement in the output of quantum gates. To soundly check these assertions, Twist uses a combination of static analysis and runtime verification. We evaluate Twist's type system and analyses on a benchmark suite of quantum programs in simulation, demonstrating that Twist can express quantum algorithms, catch programming errors in them, and support programs that existing languages disallow, while incurring runtime verification overhead of less than 3.5\%.},
keywords = {entanglement, purity, quantum programming, type systems},
webnote = {POPL '22. The extended version on arXiv includes the appendix and differs from ACM Proceedings in that it includes a more refined comparison to prior work, specifically in Sections 3.5 and 9.6.},
bibsource = qplbib
}
Downloads: 0
{"_id":"zRkyFA8jJdWaoWtjg","bibbaseid":"yuan-mcnally-carbin-twistsoundreasoningforpurityandentanglementinquantumprograms-2022","author_short":["Yuan, C.","McNally, C.","Carbin, M."],"bibdata":{"bibtype":"article","type":"article","title":"Twist: Sound Reasoning for Purity and Entanglement in Quantum Programs","author":[{"propositions":[],"lastnames":["Yuan"],"firstnames":["Charles"],"suffixes":[]},{"propositions":[],"lastnames":["McNally"],"firstnames":["Christopher"],"suffixes":[]},{"propositions":[],"lastnames":["Carbin"],"firstnames":["Michael"],"suffixes":[]}],"year":"2022","month":"January","journal":"Proceedings of the ACM on Programming Languages","volume":"6","number":"POPL","eid":"30","pages":"30","doi":"10.1145/3498691","archiveprefix":"arXiv","eprint":"2205.02287","url":"https://github.com/psg-mit/twist-popl22","abstract":"Quantum programming languages enable developers to implement algorithms for quantum computers that promise computational breakthroughs in classically intractable tasks. Programming quantum computers requires awareness of entanglement, the phenomenon in which measurement outcomes of qubits are correlated. Entanglement can determine the correctness of algorithms and suitability of programming patterns. In this work, we formalize purity as a central tool for automating reasoning about entanglement in quantum programs. A pure expression is one whose evaluation is unaffected by the measurement outcomes of qubits that it does not own, implying freedom from entanglement with any other expression in the computation. We present Twist, the first language that features a type system for sound reasoning about purity. The type system enables the developer to identify pure expressions using type annotations. Twist also features purity assertion operators that state the absence of entanglement in the output of quantum gates. To soundly check these assertions, Twist uses a combination of static analysis and runtime verification. We evaluate Twist's type system and analyses on a benchmark suite of quantum programs in simulation, demonstrating that Twist can express quantum algorithms, catch programming errors in them, and support programs that existing languages disallow, while incurring runtime verification overhead of less than 3.5%.","keywords":"entanglement, purity, quantum programming, type systems","webnote":"POPL '22. The extended version on arXiv includes the appendix and differs from ACM Proceedings in that it includes a more refined comparison to prior work, specifically in Sections 3.5 and 9.6.","bibsource":"Quantum Programming Languages & Verification Bibliography, https://git.io/qpl-bib","bibtex":"@article{Yuan2022,\n title = {Twist: Sound Reasoning for Purity and Entanglement in Quantum Programs},\n author = {Yuan, Charles and McNally, Christopher and Carbin, Michael},\n year = {2022},\n month = jan,\n journal = pacmpl,\n volume = {6},\n number = {POPL},\n eid = {30},\n pages = {30},\n doi = {10.1145/3498691},\n archiveprefix = {arXiv},\n eprint = {2205.02287},\n url = {https://github.com/psg-mit/twist-popl22},\n abstract = {Quantum programming languages enable developers to implement algorithms for quantum computers that promise computational breakthroughs in classically intractable tasks. Programming quantum computers requires awareness of entanglement, the phenomenon in which measurement outcomes of qubits are correlated. Entanglement can determine the correctness of algorithms and suitability of programming patterns. In this work, we formalize purity as a central tool for automating reasoning about entanglement in quantum programs. A pure expression is one whose evaluation is unaffected by the measurement outcomes of qubits that it does not own, implying freedom from entanglement with any other expression in the computation. We present Twist, the first language that features a type system for sound reasoning about purity. The type system enables the developer to identify pure expressions using type annotations. Twist also features purity assertion operators that state the absence of entanglement in the output of quantum gates. To soundly check these assertions, Twist uses a combination of static analysis and runtime verification. We evaluate Twist's type system and analyses on a benchmark suite of quantum programs in simulation, demonstrating that Twist can express quantum algorithms, catch programming errors in them, and support programs that existing languages disallow, while incurring runtime verification overhead of less than 3.5\\%.},\n keywords = {entanglement, purity, quantum programming, type systems},\n webnote = {POPL '22. The extended version on arXiv includes the appendix and differs from ACM Proceedings in that it includes a more refined comparison to prior work, specifically in Sections 3.5 and 9.6.},\n bibsource = qplbib\n}\n\n","author_short":["Yuan, C.","McNally, C.","Carbin, M."],"key":"Yuan2022","id":"Yuan2022","bibbaseid":"yuan-mcnally-carbin-twistsoundreasoningforpurityandentanglementinquantumprograms-2022","role":"author","urls":{"Paper":"https://github.com/psg-mit/twist-popl22"},"keyword":["entanglement","purity","quantum programming","type systems"],"metadata":{"authorlinks":{}}},"bibtype":"article","biburl":"https://raw.githubusercontent.com/QuantumPL/bib/main/bbt.bib","dataSources":["MbqeeC74KZhwBpe8j","JG9W34HAXfSxsC6ML"],"keywords":["entanglement","purity","quantum programming","type systems"],"search_terms":["twist","sound","reasoning","purity","entanglement","quantum","programs","yuan","mcnally","carbin"],"title":"Twist: Sound Reasoning for Purity and Entanglement in Quantum Programs","year":2022}