{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,11,15]],"date-time":"2026-11-15T09:00:34Z","timestamp":1794733234197,"version":"4.9.1"},"publisher-location":"Cham","reference-count":36,"publisher":"Springer Nature Switzerland","isbn-type":[{"value":"9783031300431","type":"print"},{"value":"9783031300448","type":"electronic"}],"license":[{"start":{"date-parts":[[2023,1,1]],"date-time":"2023-01-01T00:00:00Z","timestamp":1672531200000},"content-version":"tdm","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"},{"start":{"date-parts":[[2023,4,17]],"date-time":"2023-04-17T00:00:00Z","timestamp":1681689600000},"content-version":"vor","delay-in-days":106,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0"}],"content-domain":{"domain":["link.springer.com"],"crossmark-restriction":false},"short-container-title":[],"published-print":{"date-parts":[[2023]]},"abstract":"<jats:title>Abstract<\/jats:title>\n                  <jats:p>Variational Quantum Algorithms are hybrid classical-quantum algorithms where classical and quantum computation work in tandem to solve computational problems. These algorithms create interesting challenges for the design of suitable programming languages. In this paper we introduce Qimaera, which is a set of libraries for the Idris 2 programming language that enable the programmer to implement hybrid classical-quantum algorithms where the full power of the elegant Idris language works in synchrony with quantum programming primitives. The two key ingredients of Idris that make this possible are (1) dependent types which allow us to implement unitary quantum operations; and (2) linearity which allows us to enforce fine-grained control over the execution of quantum operations so that we may detect and reject many physically inadmissible programs. We also show that Qimaera is suitable for variational quantum programming by providing implementations of two prominent variational quantum algorithms \u2013 QAOA and VQE.<\/jats:p>","DOI":"10.1007\/978-3-031-30044-8_19","type":"book-chapter","created":{"date-parts":[[2023,4,16]],"date-time":"2023-04-16T16:28:25Z","timestamp":1681662505000},"page":"507-534","update-policy":"https:\/\/doi.org\/10.1007\/springer_crossmark_policy","source":"Crossref","is-referenced-by-count":3,"title":["Type-safe Quantum Programming in Idris"],"prefix":"10.1007","author":[{"given":"Liliane-Joy","family":"Dandy","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Emmanuel","family":"Jeandel","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Vladimir","family":"Zamdzhiev","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"297","published-online":{"date-parts":[[2023,4,17]]},"reference":[{"key":"19_CR1","unstructured":"Qimaera github repository.https:\/\/github.com\/zamdzhiev\/Qimaera, accessed: 30.01.2023"},{"key":"19_CR2","doi-asserted-by":"publisher","unstructured":"Aleksandrowicz, G., Alexander, T., Barkoutsos, P., Bello, L., Ben-Haim, Y., Bucher, D., Cabrera-Hern\u00e1ndez, F.J., Carballo-Franquis, J., Chen, A., Chen, C.F., Chow, J.M., C\u00f3rcoles-Gonzales, A.D., Cross, A.J., Cross, A., Cruz-Benito, J., Culver, C., Gonz\u00e1lez, S.D.L.P., Torre, E.D.L., Ding, D., Dumitrescu, E., Duran, I., Eendebak, P., Everitt, M., Sertage, I.F., Frisch, A., Fuhrer, A., Gambetta, J., Gago, B.G., Gomez-Mosquera, J., Greenberg, D., Hamamura, I., Havlicek, V., Hellmers, J., \u0141ukasz Herok, Horii, H., Hu, S., Imamichi, T., Itoko, T., Javadi-Abhari, A., Kanazawa, N., Karazeev, A., Krsulich, K., Liu, P., Luh, Y., Maeng, Y., Marques, M., Mart\u00edn-Fern\u00e1ndez, F.J., McClure, D.T., McKay, D., Meesala, S., Mezzacapo, A., Moll, N., Rodr\u00edguez, D.M., Nannicini, G., Nation, P., Ollitrault, P., O\u2019Riordan, L.J., Paik, H., P\u00e9rez, J., Phan, A., Pistoia, M., Prutyanov, V., Reuter, M., Rice, J., Davila, A.R., Rudy, R.H.P., Ryu, M., Sathaye, N., Schnabel, C., Schoute, E., Setia, K., Shi, Y., Silva, A., Siraichi, Y., Sivarajah, S., Smolin, J.A., Soeken, M., Takahashi, H., Tavernelli, I., Taylor, C., Taylour, P., Trabing, K., Treinish, M., Turner, W., Vogt-Lee, D., Vuillot, C., Wildstrom, J.A., Wilson, J., Winston, E., Wood, C., Wood, S., W\u00f6rner, S., Akhalwaya, I.Y., Zoufal, C.: Qiskit: An open-source framework for quantum computing (Jan 2019). https:\/\/doi.org\/10.5281\/zenodo.2562111","DOI":"10.5281\/zenodo.2562111"},{"key":"19_CR3","doi-asserted-by":"crossref","unstructured":"Altenkirch, T., Green, A.S.: The quantum IO monad. Semantic Techniques in Quantum Computation pp. 173\u2013205 (2010)","DOI":"10.1017\/CBO9781139193313.006"},{"key":"19_CR4","doi-asserted-by":"publisher","unstructured":"Atkey, R.: Parameterised notions of computation. J. Funct. Program. 19(3-4), 335\u2013376 (2009). https:\/\/doi.org\/10.1017\/S095679680900728X","DOI":"10.1017\/S095679680900728X"},{"key":"19_CR5","doi-asserted-by":"publisher","unstructured":"Atkey, R.: What is a categorical model of arrows? Electron. Notes Theor. Comput. Sci. 229(5), 19\u201337 (2011). https:\/\/doi.org\/10.1016\/j.entcs.2011.02.014","DOI":"10.1016\/j.entcs.2011.02.014"},{"key":"19_CR6","doi-asserted-by":"publisher","unstructured":"Atkey, R.: Syntax and semantics of quantitative type theory. In: Dawar, A., Gr\u00e4del, E. (eds.) Proceedings of the 33rd Annual ACM\/IEEE Symposium on Logic in Computer Science, LICS 2018, Oxford, UK, July 09-12, 2018. pp. 56\u201365. ACM (2018). https:\/\/doi.org\/10.1145\/3209108.3209189","DOI":"10.1145\/3209108.3209189"},{"key":"19_CR7","unstructured":"Benton, P.N., Wadler, P.: Linear logic, monads and the lambda calculus. In: LICS 1996 (1996)"},{"key":"19_CR8","doi-asserted-by":"publisher","unstructured":"Benton, P.: A mixed linear and non-linear logic: Proofs, terms and models. In: Computer Science Logic: 8th Workshop, CSL \u201994, Selected Papaers (1995). https:\/\/doi.org\/10.1007\/BFb0022251","DOI":"10.1007\/BFb0022251"},{"key":"19_CR9","doi-asserted-by":"publisher","unstructured":"Bichsel, B., Baader, M., Gehr, T., Vechev, M.T.: Silq: a high-level quantum language with safe uncomputation and intuitive semantics. In: Donaldson, A.F., Torlak, E. (eds.) Proceedings of the 41st ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2020, London, UK, June 15-20, 2020. pp. 286\u2013300. ACM (2020). https:\/\/doi.org\/10.1145\/3385412.3386007","DOI":"10.1145\/3385412.3386007"},{"key":"19_CR10","doi-asserted-by":"publisher","unstructured":"Brady, E.C.: Idris 2: Quantitative type theory in practice. In: M\u00f8ller, A., Sridharan, M. (eds.) 35th European Conference on Object-Oriented Programming, ECOOP 2021, July 11-17, 2021, Aarhus, Denmark (Virtual Conference). LIPIcs, vol.\u00a0194, pp. 9:1\u20139:26. Schloss Dagstuhl - Leibniz-Zentrum f\u00fcr Informatik (2021). https:\/\/doi.org\/10.4230\/LIPIcs.ECOOP.2021.9","DOI":"10.4230\/LIPIcs.ECOOP.2021.9"},{"key":"19_CR11","unstructured":"Coq Development Team: The Coq proof assistant reference manual. https:\/\/coq.inria.fr\/distrib\/current\/refman\/ (2021), accessed: 19.11.2021"},{"key":"19_CR12","doi-asserted-by":"publisher","unstructured":"Dandy, L.J., Jeandel, E., Zamdzhiev, V.: Type-safe quantum programming in Idris. https:\/\/doi.org\/10.48550\/ARXIV.2111.10867","DOI":"10.48550\/ARXIV.2111.10867"},{"key":"19_CR13","unstructured":"Farhi, E., Goldstone, J., Gutmann, S.: A quantum approximate optimization algorithm (2014)"},{"key":"19_CR14","doi-asserted-by":"publisher","unstructured":"Fu, P., Kishida, K., Ross, N.J., Selinger, P.: A tutorial introduction to quantum circuit programming in dependently typed Proto-Quipper. In: Lanese, I., Rawski, M. (eds.) Reversible Computation - 12th International Conference, RC 2020, Oslo, Norway, July 9-10, 2020, Proceedings. Lecture Notes in Computer Science, vol. 12227, pp. 153\u2013168. Springer (2020). https:\/\/doi.org\/10.1007\/978-3-030-52482-1_9","DOI":"10.1007\/978-3-030-52482-1_9"},{"key":"19_CR15","doi-asserted-by":"publisher","unstructured":"Fu, P., Kishida, K., Ross, N.J., Selinger, P.: Proto-Quipper with dynamic lifting. CoRR abs\/2204.13041 (2022). https:\/\/doi.org\/10.48550\/arXiv.2204.13041","DOI":"10.48550\/arXiv.2204.13041"},{"key":"19_CR16","doi-asserted-by":"crossref","unstructured":"Girard, J.Y.: Linear logic. Theoretical Computer Science 50, 1 \u2013 101 (1987)","DOI":"10.1016\/0304-3975(87)90045-4"},{"key":"19_CR17","unstructured":"Google AI Quantum Team: Cirq. https:\/\/quantumai.google\/cirq (2021), accessed: 13.08.2021"},{"key":"19_CR18","doi-asserted-by":"crossref","unstructured":"Green, A.S., Lumsdaine, P.L., Ross, N.J., Selinger, P., Valiron, B.: Quipper: a scalable quantum programming language. In: PLDI. pp. 333\u2013342. ACM (2013)","DOI":"10.1145\/2499370.2462177"},{"key":"19_CR19","doi-asserted-by":"publisher","unstructured":"Hietala, K., Rand, R., Hung, S., Li, L., Hicks, M.: Proving quantum programs correct. In: Cohen, L., Kaliszyk, C. (eds.) 12th International Conference on Interactive Theorem Proving, ITP 2021, June 29 to July 1, 2021, Rome, Italy (Virtual Conference). LIPIcs, vol.\u00a0193, pp. 21:1\u201321:19. Schloss Dagstuhl - Leibniz-Zentrum f\u00fcr Informatik (2021). https:\/\/doi.org\/10.4230\/LIPIcs.ITP.2021.21","DOI":"10.4230\/LIPIcs.ITP.2021.21"},{"key":"19_CR20","doi-asserted-by":"publisher","unstructured":"Hietala, K., Rand, R., Hung, S., Wu, X., Hicks, M.: A verified optimizer for quantum circuits. Proc. ACM Program. Lang. 5(POPL), 1\u201329 (2021). https:\/\/doi.org\/10.1145\/3434318","DOI":"10.1145\/3434318"},{"key":"19_CR21","doi-asserted-by":"publisher","unstructured":"Hughes, J.: Generalising monads to arrows. Sci. Comput. Program. 37(1-3), 67\u2013111 (2000). https:\/\/doi.org\/10.1016\/S0167-6423(99)00023-4","DOI":"10.1016\/S0167-6423(99)00023-4"},{"key":"19_CR22","doi-asserted-by":"publisher","unstructured":"Jia, X., Kornell, A., Lindenhovius, B., Mislove, M.W., Zamdzhiev, V.: Semantics for variational quantum programming. Proc. ACM Program. Lang. 6(POPL), 1\u201331 (2022). https:\/\/doi.org\/10.1145\/3498687","DOI":"10.1145\/3498687"},{"key":"19_CR23","unstructured":"Mac\u00a0Lane, S.: Categories for the Working Mathematician (2nd ed.). Springer (1998)"},{"key":"19_CR24","doi-asserted-by":"publisher","unstructured":"McBride, C.: I got plenty o\u2019 nuttin\u2019. In: Lindley, S., McBride, C., Trinder, P.W., Sannella, D. (eds.) A List of Successes That Can Change the World - Essays Dedicated to Philip Wadler on the Occasion of His 60th Birthday. Lecture Notes in Computer Science, vol.\u00a09600, pp. 207\u2013233. Springer (2016). https:\/\/doi.org\/10.1007\/978-3-319-30936-1_12","DOI":"10.1007\/978-3-319-30936-1_12"},{"key":"19_CR25","doi-asserted-by":"crossref","unstructured":"McClean, J.R., Romero, J., Babbush, R., Aspuru-Guzik, A.: The theory of variational hybrid quantum-classical algorithms. New Journal of Physics 18(2), 023023 (2016)","DOI":"10.1088\/1367-2630\/18\/2\/023023"},{"key":"19_CR26","doi-asserted-by":"publisher","unstructured":"Nielsen, M.A., Chuang, I.L.: Quantum Computation and Quantum Information: 10th Anniversary Edition. Cambridge University Press (2010). https:\/\/doi.org\/10.1017\/CBO9780511976667","DOI":"10.1017\/CBO9780511976667"},{"key":"19_CR27","doi-asserted-by":"crossref","unstructured":"Paetznick, A., Svore, K.M.: Repeat-until-success: Non-deterministic decomposition of single-qubit unitaries. Quantum Info. Comput. 14(15\u201316), 1277\u20131301 (Nov 2014)","DOI":"10.26421\/QIC14.15-16-2"},{"key":"19_CR28","doi-asserted-by":"crossref","unstructured":"Paykin, J., Rand, R., Zdancewic, S.: QWIRE: a core language for quantum circuits. In: POPL. pp. 846\u2013858. ACM (2017)","DOI":"10.1145\/3093333.3009894"},{"key":"19_CR29","doi-asserted-by":"publisher","unstructured":"P\u00e9choux, R., Perdrix, S., Rennela, M., Zamdzhiev, V.: Quantum programming with inductive datatypes: Causality and affine type theory. In: Foundations of Software Science and Computation Structures, FOSSACS 2020. Lecture Notes in Computer Science, vol. 12077, pp. 562\u2013581. Springer (2020). https:\/\/doi.org\/10.1007\/978-3-030-45231-5_29","DOI":"10.1007\/978-3-030-45231-5_29"},{"key":"19_CR30","doi-asserted-by":"crossref","unstructured":"Peruzzo, A., McClean, J., Shadbolt, P., Yung, M.H., Zhou, X.Q., Love, P.J., Aspuru-Guzik, A., O\u2019brien, J.L.: A variational eigenvalue solver on a photonic quantum processor. Nature communications 5(1), \u00a01\u20137 (2014)","DOI":"10.1038\/ncomms5213"},{"key":"19_CR31","doi-asserted-by":"publisher","unstructured":"Rand, R., Paykin, J., Lee, D., Zdancewic, S.: ReQWIRE: Reasoning about reversible quantum circuits. In: Selinger, P., Chiribella, G. (eds.) Proceedings 15th International Conference on Quantum Physics and Logic, QPL 2018, Halifax, Canada, 3-7th June 2018. EPTCS, vol.\u00a0287, pp. 299\u2013312 (2018). https:\/\/doi.org\/10.4204\/EPTCS.287.17","DOI":"10.4204\/EPTCS.287.17"},{"key":"19_CR32","doi-asserted-by":"crossref","unstructured":"Selinger, P., Valiron, B.: A lambda calculus for quantum computation with classical control. Mathematical Structures in Computer Science 16(3), 527\u2013552 (2006)","DOI":"10.1017\/S0960129506005238"},{"key":"19_CR33","unstructured":"Seo, K.Y.: Indexed state monad blog post. https:\/\/kseo.github.io\/posts\/2017-01-12-indexed-monads.html (2017), accessed: 13.08.2021"},{"key":"19_CR34","doi-asserted-by":"publisher","unstructured":"Shor, P.W.: Polynomial-time algorithms for prime factorization and discrete logarithms on a quantum computer. SIAM Review 41(2), 303\u2013332 (1999). https:\/\/doi.org\/10.1137\/S0036144598347011","DOI":"10.1137\/S0036144598347011"},{"key":"19_CR35","doi-asserted-by":"publisher","unstructured":"Svore, K., Geller, A., Troyer, M., Azariah, J., Granade, C., Heim, B., Kliuchnikov, V., Mykhailova, M., Paz, A., Roetteler, M.: Q#: Enabling scalable quantum computing and development with a high-level dsl. In: Proceedings of the Real World Domain Specific Languages Workshop 2018. RWDSL2018, Association for Computing Machinery, New York, NY, USA (2018). https:\/\/doi.org\/10.1145\/3183895.3183901","DOI":"10.1145\/3183895.3183901"},{"key":"19_CR36","doi-asserted-by":"crossref","unstructured":"Wootters, W.K., Zurek, W.H.: A single quantum cannot be cloned. Nature 299(5886), 802\u2013803 (1982)","DOI":"10.1038\/299802a0"}],"container-title":["Lecture Notes in Computer Science","Programming Languages and Systems"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/link.springer.com\/content\/pdf\/10.1007\/978-3-031-30044-8_19","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2023,6,7]],"date-time":"2023-06-07T05:05:20Z","timestamp":1686114320000},"score":1,"resource":{"primary":{"URL":"https:\/\/link.springer.com\/10.1007\/978-3-031-30044-8_19"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2023]]},"ISBN":["9783031300431","9783031300448"],"references-count":36,"URL":"https:\/\/doi.org\/10.1007\/978-3-031-30044-8_19","relation":{"is-part-of":[{"id-type":"doi","id":"https:\/\/doi.org\/10.1007\/978-3-031-30044-8","asserted-by":"object"}]},"ISSN":["0302-9743","1611-3349"],"issn-type":[{"value":"0302-9743","type":"print"},{"value":"1611-3349","type":"electronic"}],"subject":[],"published":{"date-parts":[[2023]]},"assertion":[{"value":"17 April 2023","order":1,"name":"first_online","label":"First Online","group":{"name":"ChapterHistory","label":"Chapter History"}},{"value":"ESOP","order":1,"name":"conference_acronym","label":"Conference Acronym","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"European Symposium on Programming","order":2,"name":"conference_name","label":"Conference Name","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Paris","order":3,"name":"conference_city","label":"Conference City","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"France","order":4,"name":"conference_country","label":"Conference Country","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"2023","order":5,"name":"conference_year","label":"Conference Year","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"22 April 2023","order":7,"name":"conference_start_date","label":"Conference Start Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"27 April 2023","order":8,"name":"conference_end_date","label":"Conference End Date","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"32","order":9,"name":"conference_number","label":"Conference Number","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"esop2023","order":10,"name":"conference_id","label":"Conference ID","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"https:\/\/etaps.org\/2023\/esop","order":11,"name":"conference_url","label":"Conference URL","group":{"name":"ConferenceInfo","label":"Conference Information"}},{"value":"Double-blind","order":1,"name":"type","label":"Type","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"EasyChair","order":2,"name":"conference_management_system","label":"Conference Management System","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"55","order":3,"name":"number_of_submissions_sent_for_review","label":"Number of Submissions Sent for Review","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"20","order":4,"name":"number_of_full_papers_accepted","label":"Number of Full Papers Accepted","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"0","order":5,"name":"number_of_short_papers_accepted","label":"Number of Short Papers Accepted","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"36% - The value is computed by the equation \"Number of Full Papers Accepted \/ Number of Submissions Sent for Review * 100\" and then rounded to a whole number.","order":6,"name":"acceptance_rate_of_full_papers","label":"Acceptance Rate of Full Papers","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"3","order":7,"name":"average_number_of_reviews_per_paper","label":"Average Number of Reviews per Paper","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"5.5","order":8,"name":"average_number_of_papers_per_reviewer","label":"Average Number of Papers per Reviewer","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}},{"value":"Yes","order":9,"name":"external_reviewers_involved","label":"External Reviewers Involved","group":{"name":"ConfEventPeerReviewInformation","label":"Peer Review Information (provided by the conference organizers)"}}]}}