Quantum Algorithm for Binary Vector Encoding and Retrieval Utilizing the Permutation Trick | 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 Quantum Algorithm for Binary Vector Encoding and Retrieval Utilizing the Permutation Trick Andreas Wichert This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-7808609/v1 This work is licensed under a CC BY 4.0 License Status: Under Review Version 1 posted 4 You are reading this latest preprint version Abstract We present a novel quantum storage algorithm for $k$ binary vectors of dimension $m$ into a superposition of a $m$-qubit quantum state based on a permutation technique. We compare this algorithm to the storage algorithm proposed by Ventura and Martinez. The permutation technique is simpler and can lead to an additional reduction through the reduce algorithm. To retrieve a binary vector from the superposition of $k$ vectors represented by a $m$-qubit quantum state, we must use a modified version of Grover’s algorithm, as Grover’s algorithm does not function correctly for non-uniform distributions. We introduce the permutation trick that enables an exhaustive search by Grover’s algorithm in $O(\sqrt{k})$ steps for $k$ patterns, independent of $n=2^m$. We compare this trick to the Ventura and Martinez trick, which requires $O(\sqrt{n})$ steps for $k$ patterns Basis Encoding Non-Uniform Distribution Quantum Nearest Neighbor Quantum Associative Memory Grover’s Algorithm Full Text Additional Declarations No competing interests reported. Cite Share Download PDF Status: Under Review Version 1 posted Reviewers invited by journal 07 Nov, 2025 Editor assigned by journal 07 Nov, 2025 Submission checks completed at journal 08 Oct, 2025 First submitted to journal 08 Oct, 2025 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-7808609","acceptedTermsAndConditions":true,"allowDirectSubmit":false,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":546358003,"identity":"ab1b6874-6f26-4b8a-82f7-b3d2309c1556","order_by":0,"name":"Andreas Wichert","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAABQ0lEQVRIie3Rv2qDQBzA8ZODc/mlXRXhfIWTQCQQ2lcxBMySQiFLoSEVBLPYdrX0MQqdCj04MEsewKGDUHDqkBAoDqH0jFTyh9DSqRS/iId3fsRThOrq/masHDAixUDXF05xUhUP/4CwJlQEfxFygJQrrBtWC3h97JHje/9xPh+NEZviLF08rfrPqp+l6aiDmMD+8vziBNmmt0m0l3h4F8VC3kBsK8rYWQixzZzYlTNKYESzHmoH26+VDJoYCEctAcQALok2IFrXE2uCGwFGLN4SZkFWH+OSrDjrg/lWEX/ZCK52CSuIfFpJEGcOaFARz2gEYpdYiTtUrm8EnArS0kPetMKZ29LkXkAv9zKFduBsEpr0HlD+Pqb6rci0nFNTnYhMz0cdejSdvMovdkltzHd/TBEcngG2t/ZtvyB1dXV1/6pPeV5uM/qI7lIAAAAASUVORK5CYII=","orcid":"","institution":"Instituto Superior Técnico - Universidade de Lisboa","correspondingAuthor":true,"prefix":"","firstName":"Andreas","middleName":"","lastName":"Wichert","suffix":""}],"badges":[],"createdAt":"2025-10-08 13:53:36","currentVersionCode":1,"declarations":"","doi":"10.21203/rs.3.rs-7808609/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-7808609/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":96145348,"identity":"9227127d-a786-462f-91c8-8c17065ddcde","added_by":"auto","created_at":"2025-11-18 06:32:30","extension":"json","order_by":0,"title":"","display":"","copyAsset":false,"role":"acdc-reference","size":2691,"visible":true,"origin":"","legend":"","description":"","filename":"d30e051d6fba48d987a7c19b7aaa20ed.json","url":"https://assets-eu.researchsquare.com/files/rs-7808609/v1/49f8c08de4f4cfc179082d1c.json"},{"id":96249949,"identity":"d2b23a71-c96e-4ad0-acb4-6863dc68497a","added_by":"auto","created_at":"2025-11-19 07:36:50","extension":"pdf","order_by":1,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":1713155,"visible":true,"origin":"","legend":"","description":"","filename":"PROD4.pdf","url":"https://assets-eu.researchsquare.com/files/rs-7808609/v1_covered_0de33850-f563-4f82-891a-e46eae384ce5.pdf"}],"financialInterests":"No competing interests reported.","formattedTitle":"Quantum Algorithm for Binary Vector Encoding and Retrieval Utilizing the Permutation Trick","fulltext":[],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":false,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":false,"hideJournal":false,"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":"quantum-machine-intelligence","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"qumi","sideBox":"Learn more about [Quantum Machine Intelligence](http://link.springer.com/journal/42484)","snPcode":"42484","submissionUrl":"https://submission.nature.com/new-submission/42484/3","title":"Quantum Machine Intelligence","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"em","reportingPortfolio":"Springer Hybrid","inReviewEnabled":true,"inReviewRevisionsEnabled":false},"keywords":"Basis Encoding; Non-Uniform Distribution; Quantum Nearest Neighbor; Quantum Associative Memory; Grover’s Algorithm","lastPublishedDoi":"10.21203/rs.3.rs-7808609/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-7808609/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"We present a novel quantum storage algorithm for $k$ binary vectors of dimension $m$ into a superposition of a $m$-qubit quantum state based on a permutation technique. We compare this algorithm to the storage algorithm proposed by Ventura and Martinez. The permutation technique is simpler and can lead to an additional reduction through the reduce algorithm. To retrieve a binary vector from the superposition of $k$ vectors represented by a $m$-qubit quantum state, we must use a modified version of Grover’s algorithm, as Grover’s algorithm does not function correctly for non-uniform distributions. We introduce the permutation trick that enables an exhaustive search by Grover’s algorithm in $O(\\sqrt{k})$ steps for $k$ patterns, independent of $n=2^m$. We compare this trick to the Ventura and Martinez trick, which requires $O(\\sqrt{n})$ steps for $k$ patterns","manuscriptTitle":"Quantum Algorithm for Binary Vector Encoding and Retrieval Utilizing the Permutation Trick","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-11-18 06:32:26","doi":"10.21203/rs.3.rs-7808609/v1","editorialEvents":[{"type":"communityComments","content":0},{"type":"reviewersInvited","content":"","date":"2025-11-07T14:09:48+00:00","index":"","fulltext":""},{"type":"editorAssigned","content":"","date":"2025-11-07T10:01:59+00:00","index":"","fulltext":""},{"type":"checksComplete","content":"","date":"2025-10-09T00:09:46+00:00","index":"","fulltext":""},{"type":"submitted","content":"Quantum Machine Intelligence","date":"2025-10-08T13:51:47+00:00","index":"","fulltext":""}],"status":"published","journal":{"display":true,"email":"
[email protected]","identity":"quantum-machine-intelligence","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":false,"externalIdentity":"qumi","sideBox":"Learn more about [Quantum Machine Intelligence](http://link.springer.com/journal/42484)","snPcode":"42484","submissionUrl":"https://submission.nature.com/new-submission/42484/3","title":"Quantum Machine Intelligence","twitterHandle":"","acdcEnabled":true,"dfaEnabled":true,"editorialSystem":"em","reportingPortfolio":"Springer Hybrid","inReviewEnabled":true,"inReviewRevisionsEnabled":false}}],"origin":"","ownerIdentity":"7bfa98fc-c05e-4820-8b20-69dbf6a15c09","owner":[],"postedDate":"November 18th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"under-review","subjectAreas":[],"tags":[],"updatedAt":"2025-11-18T06:32:26+00:00","versionOfRecord":[],"versionCreatedAt":"2025-11-18 06:32:26","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-7808609","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-7808609","identity":"rs-7808609","version":["v1"]},"buildId":"XKTyCvWXoU3ODBz1xrDgd","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.