[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-397521-105":59,"doc-detail-397521-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","granthi-higher-order-quantum-programming-via-unitary-wiring","Granthi: Higher-Order Quantum Programming via Unitary Wiring","","Many mainstream quantum programming languages keep higher-order structure in a classical host and restrict the quantum layer to first-order operations on qubits. Granthi proposes a purely unitary higher-order quantum programming language where quantum programs are first-class values, control is realized via tag-preserving routing in superposition, and finite label types with staged reversible-operation bindings enable domain-level control spaces. Granthi deterministically normalizes programs to canonical wiring and, under backend correctness, compiles well-typed programs to unitary circuits.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":40,"@type":76,"position":81},"https://docshare.wps.com/document/research-report/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/granthi-higher-order-quantum-programming-via-unitary-wiring/397521/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/granthi-higher-order-quantum-programming-via-unitary-wiring/397521.png","ImageObject",300,407,{"name":92,"@type":93},"Aldword","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-09-28","2026-09-26",true,{"@type":102,"interactionType":103,"userInteractionCount":14},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What problem does Granthi target in existing quantum programming languages?","Question",{"text":112,"@type":113},"It addresses the common design where higher-order structure is confined to a classical host and the quantum layer only supports first-order operations on qubits.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How does Granthi keep control in superposition while remaining purely unitary?",{"text":117,"@type":113},"Granthi uses additive, tag-preserving routing rather than observational branching, allowing control to remain in superposition and eliminating tag management before source typing.",{"name":119,"@type":110,"acceptedAnswer":120},"What does Granthi compile well-typed programs into, and what guarantees correctness?",{"text":121,"@type":113},"Granthi normalizes each source program into a canonical wiring form; every well-typed program has a unitary boundary interpretation, and under backend correctness the reference compiler produces a unitary circuit realizing that interpretation.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},397521,1790624962,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":39,"category_name":40,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":14,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":145},2336478940917,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","arXiv : 2608 .20443v 3 [quant-ph] 8 Sep 2026  \nGranthi: Higher-Order Quantum Programming via Unitary Wiring  \nSAMSON ABRAMSKY, University College London, United Kingdom RADHA JAGADEESAN, DePaul University, USA  \nMany mainstream quantum programming languages confine higher-order structure to a classical host while restricting the quantum layer to first-order operations on qubits. This paper presents Granthi, a purely unitary higher-order quantum programming language built on three design commitments: quantum programs are first-class values that may be passed, returned, and coherently composed; additive structure is tag-preserving routing rather than observational branching, so control may remain in superposition; and programmer-facing finite label types with staged reversible-operation bindings provide domain-level control spaces without exposing tag management. These bindings are eliminated by elaboration before Source typing.  \nGranthi deterministically normalizes each Source program to a canonical wiring form. Every well-typed Source program—including a term of function type—has a unitary boundary interpretation. Under backend correctness (BC), the reference compiler produces a unitary circuit realizing that interpretation.  \nGranthi’s currently supported executable fragment is implemented end-to-end: an OCaml DSL elaborates surface programs through a higher-order Core IR to executable quantum circuits via pytket. The language directly supports the pure-unitary quantum switch for explicitly supplied operations; closed instances compile to static circuits. It also supports interference on control-flow history and structured finite control, all within the purely unitary fragment.  \nCCS Concepts: • Theory of computation → Quantum computation theory; • Software and its engineering → Functional languages.  \nAdditional Key Words and Phrases: quantum programming languages, unitarity, compilation  \nNote. This is the full version, including the appendices, of the article published in Proceedings of the ACMon Programming Languages 10, OOPSLA2, Article 364 (October 2026), [https://doi.org/10.1145/](https://doi.org/10.1145/)[ ](https://doi.org/10.1145/)[3839496](3839496. The appendices contain the proofs and are the supplementary material of the published)[. The appendices contain the proofs and are the supplementary material of the published](3839496. The appendices contain the proofs and are the supplementary material of the published)[ ](3839496. The appendices contain the proofs and are the supplementary material of the published)version.  \n1 Introduction  \nQuantum algorithms were developed well before suitable hardware existed, from early breakthroughs such as Shor’s factoring algorithm to more recent variational and sampling-based methods [Aaronson and Arkhipov 2011; Peruzzo et al. 2014] . Their study also raises a programminglanguage question independent of any particular device technology: how should quantum programs be structured? As in classical computing [Hennessy and Patterson 2019], abstraction, architecture, and programming models are central to that question. Many mainstream quantum programming languages adopt a split architecture: higher-order structure resides entirely in a classical host language, while the quantum layer exposes only first-order operations on qubits and registers [Gay 2006] . Classical languages provide functions, control abstractions, and program generators used to construct and manipulate quantum circuits as classical data. Callable operations and circuit values may be passed, returned, and composed by the host, but coherent quantum programs themselves do not inhabit higher types of the quantum object language. The resulting  \n\n| Authors’ Contact Information: Samson Abramsky, University College London, London, [s.abramsky@ucl.ac.uk](s.abramsky@ucl.ac.uk); Radha Jagadeesan, DePaul University, Chicago, USA, [rjagadee@depaul.edu](rjagadee@depaul.edu). | United | Kingdom, |\n| --- | --- | --- |\n\nThis work","cbCaicicw4AbGl5g","https://ap.wps.com/l/cbCaicicw4AbGl5g","pdf",680340,106,"English","# Introduction\n## Higher-order structure in quantum programming\n## Data abstraction and unitarity constraints\n## Granthi: design commitments and compilation","[{\"question\":\"What problem does Granthi target in existing quantum programming languages?\",\"answer\":\"It addresses the common design where higher-order structure is confined to a classical host and the quantum layer only supports first-order operations on qubits.\"},{\"question\":\"How does Granthi keep control in superposition while remaining purely unitary?\",\"answer\":\"Granthi uses additive, tag-preserving routing rather than observational branching, allowing control to remain in superposition and eliminating tag management before source typing.\"},{\"question\":\"What does Granthi compile well-typed programs into, and what guarantees correctness?\",\"answer\":\"Granthi normalizes each source program into a canonical wiring form; every well-typed program has a unitary boundary interpretation, and under backend correctness the reference compiler produces a unitary circuit realizing that interpretation.\"}]","Granthi: Higher-Order Quantum Programming via Unitary Wiring | PDF",1790462732,267]