Qrisp Implementation and Resource Analysis of a T-Count-Optimized Non-Restoring Quantum Square-Root Circuit | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Qrisp Implementation and Resource Analysis of a T-Count-Optimized Non-Restoring Quantum Square-Root Circuit Heorhi Kupryianau, Marcin Niemiec This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7980062/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract \noindent Efficient quantum arithmetic operations are essential building blocks for complex quantum algorithms, yet few theoretical designs have been implemented in practical quantum programming frameworks. This paper presents the first complete implementation of the T-count optimized non-restoring quantum square root algorithm using the Qrisp quantum programming framework. The algorithm offers better resource efficiency compared to alternative methods, achieving reduced T-count and qubit requirements while avoiding garbage output. Our implementation validates the theoretical resource estimates, confirming a T-count of $14n-14$ and a T-depth of $5n+3$ for $n$-bit inputs. The modular design approach enabled by Qrisp allows the construction of reusable components, including reversible adders, subtractors, and conditional logic blocks built from fundamental quantum gates. The three-stage algorithm, comprising initial subtraction, iterative conditional addition/subtraction, and remainder restoration, is successfully translated from algorithmic description to executable quantum code. Experimental validation across multiple test cases confirms the correctness, with the circuit producing accurate integer square roots and remainders. This work demonstrates the practical realizability of resource-optimized quantum arithmetic algorithms and establishes a foundation for implementing different arithmetic operations in modern quantum programming frameworks. Quantum algorithms Square root Quantum arithmetic Qrisp T-count optimization Quantum circuit Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-7980062","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":555958501,"identity":"940e5e04-e4ee-469e-a7ed-edb3454e9301","order_by":0,"name":"Heorhi Kupryianau","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABTElEQVRIie2PMUvDQBSAXzhJlqjrFYf8hQuBqpDSH+Jyx0EnKQVBHDoECpm0c0WlfyH9By0HyRKcUxowXTpVDAhSUIqXtIKtUVfBfNx79+5xH3cPoKTkD0JkIJlJfqJZ0hyAJCuwDF3G3q+KLtbFh6IWKbBWcjD/WTnUOv5zqwUWmVzNcNKODTJ+GiX0AgzjxFGSRxeaW8rxpc9vegSqJA6qmPoz05twRGgI5iAeIvPOhbPtj0WnFtIJ2CRqqJiqQpGKipkLyqBH1YNdF2S9qTzMPytLUffGQluwJdSlor0WKZGeK9VcYa5gXoRUYA6wvnwUFSlhg0sFW5XYR0esK/h1yC05FOYeZp3K7T3+MksgBNLfbLM7cZXx4kXUusFomqZtu9bv8VE6P7eb+1AEztYO3uiQoeJkBS00VndQutEwnNX+vVJSUlLyT3gHSIZzA3RdISkAAAAASUVORK5CYII=","orcid":"","institution":"AGH University of Krakow","correspondingAuthor":true,"prefix":"","firstName":"Heorhi","middleName":"","lastName":"Kupryianau","suffix":""},{"id":555958502,"identity":"6831f9d5-bd51-444b-aa25-e7307c99d7e0","order_by":1,"name":"Marcin Niemiec","email":"","orcid":"","institution":"AGH University of Krakow","correspondingAuthor":false,"prefix":"","firstName":"Marcin","middleName":"","lastName":"Niemiec","suffix":""}],"badges":[],"createdAt":"2025-10-29 12:53:26","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-7980062/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-7980062/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":97684199,"identity":"b9e7ffad-068b-4d7d-b399-9dee03258c67","added_by":"auto","created_at":"2025-12-08 10:05:20","extension":"json","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":4340,"visible":true,"origin":"","legend":"","description":"","filename":"779b14d52398401098ed9a2ccae46ce0.json","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/2a913cc4b94f81a9208bd725.json"},{"id":97684042,"identity":"951e42b6-300f-466c-a4f8-bc286475660a","added_by":"auto","created_at":"2025-12-08 10:05:00","extension":"txt","order_by":1,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":1070,"visible":true,"origin":"","legend":"","description":"","filename":"Coverletter.txt","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/43af0670c987b6fe9484ab43.txt"},{"id":97684133,"identity":"b8fe9696-eed1-4ce0-b93d-b76cc883e82e","added_by":"auto","created_at":"2025-12-08 10:05:08","extension":"pdf","order_by":2,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":377061,"visible":true,"origin":"","legend":"","description":"","filename":"ISQRTSpringer.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/38ea3893582a2b5948bd121b.pdf"},{"id":97684397,"identity":"8b3d2dba-31e0-424f-806c-4fdca0401f6d","added_by":"auto","created_at":"2025-12-08 10:06:12","extension":"pdf","order_by":3,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":48425,"visible":true,"origin":"","legend":"","description":"","filename":"Pointbypointresponse.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/f109043eee6a21e26dd1304a.pdf"},{"id":97684392,"identity":"17f2b7fc-6685-4450-8fda-0375f0d22068","added_by":"auto","created_at":"2025-12-08 10:06:09","extension":"pdf","order_by":4,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":9583,"visible":true,"origin":"","legend":"","description":"","filename":"fig1anot.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/e0f7e1b7549d1e96484afec5.pdf"},{"id":97684327,"identity":"f2fa8995-fc6a-426e-a9fd-a4b7ce795eb6","added_by":"auto","created_at":"2025-12-08 10:05:50","extension":"pdf","order_by":5,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":18681,"visible":true,"origin":"","legend":"","description":"","filename":"fig1bcnot.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/3793e87a49050d0a1745f511.pdf"},{"id":97684342,"identity":"129749d5-700d-4ba6-af64-ee9a75e64c30","added_by":"auto","created_at":"2025-12-08 10:06:02","extension":"pdf","order_by":6,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":18314,"visible":true,"origin":"","legend":"","description":"","filename":"fig2aswap.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/ae741e5645d212f25c1c60f3.pdf"},{"id":97684131,"identity":"ba835fbd-0e36-4f03-a1e0-c7d9aeed05b4","added_by":"auto","created_at":"2025-12-08 10:05:07","extension":"pdf","order_by":7,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":18566,"visible":true,"origin":"","legend":"","description":"","filename":"fig2bswapd.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/5b29404278f8e8ae0c2af67b.pdf"},{"id":97684208,"identity":"9d484d59-2af8-472f-b3c3-354ffa17a4e2","added_by":"auto","created_at":"2025-12-08 10:05:28","extension":"pdf","order_by":8,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":45222,"visible":true,"origin":"","legend":"","description":"","filename":"fig3hadamard.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/88089da69bd013816c864011.pdf"},{"id":97684460,"identity":"3fea1ec7-2ccb-4d2e-bbf4-37e61c8a5152","added_by":"auto","created_at":"2025-12-08 10:06:40","extension":"pdf","order_by":9,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":19041,"visible":true,"origin":"","legend":"","description":"","filename":"fig4atoffoli.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/ad8a74dfab9e60c9b350f58c.pdf"},{"id":97684398,"identity":"b8271f04-622c-4660-9163-6e24dac2ff17","added_by":"auto","created_at":"2025-12-08 10:06:12","extension":"pdf","order_by":10,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":29386,"visible":true,"origin":"","legend":"","description":"","filename":"fig4btoffolid.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/d8fc83788e000177997eab43.pdf"},{"id":97684198,"identity":"3489df13-a50e-48fb-8084-b359bc6a02a5","added_by":"auto","created_at":"2025-12-08 10:05:20","extension":"pdf","order_by":11,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":19388,"visible":true,"origin":"","legend":"","description":"","filename":"fig5aperes.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/be0fb555991a41ed75265a38.pdf"},{"id":97684166,"identity":"85f983c2-041d-42da-a50c-3299cd7467f3","added_by":"auto","created_at":"2025-12-08 10:05:13","extension":"pdf","order_by":12,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":19136,"visible":true,"origin":"","legend":"","description":"","filename":"fig5bperesd.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/8c9b0d637aad583dd7ad5dd3.pdf"},{"id":97684449,"identity":"1e9360de-5004-449f-8d09-84e5fe829989","added_by":"auto","created_at":"2025-12-08 10:06:34","extension":"pdf","order_by":13,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":29708,"visible":true,"origin":"","legend":"","description":"","filename":"fig64bitadder.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/45beeeeb42d8ddcabe193730.pdf"},{"id":97684396,"identity":"4fbf8988-c3fd-499e-860f-47293c650554","added_by":"auto","created_at":"2025-12-08 10:06:11","extension":"pdf","order_by":14,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":20506,"visible":true,"origin":"","legend":"","description":"","filename":"fig74bitsubtractor.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/bb1d5acb9c3c0cf882cea3dd.pdf"},{"id":97684201,"identity":"d10161d1-6eb4-4b44-962a-f0c8194d1df2","added_by":"auto","created_at":"2025-12-08 10:05:22","extension":"pdf","order_by":15,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":30223,"visible":true,"origin":"","legend":"","description":"","filename":"fig84bitctrladder.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/233db16d39febb7498cc9f75.pdf"},{"id":97684263,"identity":"aeba54e4-e080-4833-9370-73464aecac6b","added_by":"auto","created_at":"2025-12-08 10:05:42","extension":"pdf","order_by":16,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":421391,"visible":true,"origin":"","legend":"","description":"","filename":"snarticle.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/1dee362072b0047ca64b7632.pdf"},{"id":97684129,"identity":"52e9e3b7-dd2c-4bce-bac9-f16e287b3bb3","added_by":"auto","created_at":"2025-12-08 10:05:07","extension":"cls","order_by":17,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":55857,"visible":true,"origin":"","legend":"","description":"","filename":"snjnl.cls","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/f577f2b803b58eb0ecf96e02.cls"},{"id":97684335,"identity":"12c09cbf-d6b4-46fb-9153-14f9ee23e6e8","added_by":"auto","created_at":"2025-12-08 10:05:54","extension":"bst","order_by":18,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":64166,"visible":true,"origin":"","legend":"","description":"","filename":"snmathphysnum.bst","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/178c99213f0a5d1d011bb646.bst"},{"id":97684053,"identity":"51cd7320-03b8-4bf3-a617-835c9edc9dd6","added_by":"auto","created_at":"2025-12-08 10:05:05","extension":"xml","order_by":19,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":86237,"visible":true,"origin":"","legend":"","description":"","filename":"779b14d52398401098ed9a2ccae46ce01structuring.xml","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1/c88327303306d21a9f24cb15.xml"},{"id":100359043,"identity":"7cd96d8f-b6eb-42c2-a29a-7f7230dfa915","added_by":"auto","created_at":"2026-01-16 07:21:39","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":325133,"visible":true,"origin":"","legend":"","description":"","filename":"ISQRTSpringer.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7980062/v1_covered_7f379376-3cf9-45c1-a3aa-09cdc0f130c3.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Qrisp Implementation and Resource Analysis of a T-Count-Optimized Non-Restoring Quantum Square-Root Circuit","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":true,"highlight":"","institution":"","isAcceptedByJournal":false,"isAuthorSuppliedPdf":true,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":true,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Quantum algorithms, Square root, Quantum arithmetic, Qrisp, T-count optimization, Quantum circuit","lastPublishedDoi":"10.21203/rs.3.rs-7980062/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-7980062/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\n\\noindent Efficient quantum arithmetic operations are essential building blocks for complex quantum algorithms, yet few theoretical designs have been implemented in practical quantum programming frameworks. This paper presents the first complete implementation of the T-count optimized non-restoring quantum square root algorithm using the Qrisp quantum programming framework. The algorithm offers better resource efficiency compared to alternative methods, achieving reduced T-count and qubit requirements while avoiding garbage output. Our implementation validates the theoretical resource estimates, confirming a T-count of $14n-14$ and a T-depth of $5n+3$ for $n$-bit inputs. The modular design approach enabled by Qrisp allows the construction of reusable components, including reversible adders, subtractors, and conditional logic blocks built from fundamental quantum gates. The three-stage algorithm, comprising initial subtraction, iterative conditional addition/subtraction, and remainder restoration, is successfully translated from algorithmic description to executable quantum code. Experimental validation across multiple test cases confirms the correctness, with the circuit producing accurate integer square roots and remainders. This work demonstrates the practical realizability of resource-optimized quantum arithmetic algorithms and establishes a foundation for implementing different arithmetic operations in modern quantum programming frameworks.\n","manuscriptTitle":"Qrisp Implementation and Resource Analysis of a T-Count-Optimized Non-Restoring Quantum Square-Root Circuit","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-12-08 09:57:40","doi":"10.21203/rs.3.rs-7980062/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"bb8631b7-696b-4a96-a27b-ab5555db8c20","owner":[],"postedDate":"December 8th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[],"tags":[],"updatedAt":"2026-01-09T14:24:45+00:00","versionOfRecord":[],"versionCreatedAt":"2025-12-08 09:57:40","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-7980062","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-7980062","identity":"rs-7980062","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.