Conceptio › Archive › arXiv (OAI Expanded)
arXiv (OAI Expanded) open access

PyEncode: An Open-Source Library for Structured Quantum State Preparation

Suresh, Krishnan et al. · arxiv_oai_expanded
arXiv (OAI Expanded) · Papers
Open Source ↗Direct PDF ↓
emerging-technologies
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

[2603.28259] PyEncode: An Open-Source Library for Structured Quantum State Preparation Skip to main content Search Submit Donate Log in Computer Science > Emerging Technologies arXiv:2603.28259 (cs) [Submitted on 30 Mar 2026 ( v1 ), last revised 24 Aug 2026 (this version, v8)] Title: PyEncode: An Open-Source Library for Structured Quantum State Preparation Authors: Krishnan Suresh , Sanjay Suresh View PDF HTML (experimental) Abstract: Quantum algorithms require encoding classical vectors as quantum states, a step known as amplitude encoding. General-purpose routines produce circuits with $\bigO{2^m}$ gates for vectors of length $N = 2^m$. However, vectors arising in scientific and engineering applications often exhibit mathematical structure that admits far more efficient encoding. Theoretical work over the last decade has established efficient circuits for several structured vector classes, but without open-source implementations. We present \textbf{PyEncode}, an open-source Python library that implements this body of theory in a unified framework. It covers ten exact pattern families: \emph{sparse, step, square, Walsh, Fourier, geometric, Hamming, staircase, Dicke}, and \emph{polynomial}. A function \texttt{encode} maps each pattern to a verified Qiskit circuit, with no vector materialization and no approximation; for example, \texttt{encode(SPARSE([(19, 1.0)]), N=64)} encodes the vector $\mathbf{e}_{19}$ of length $N = 64$. Sparse, step, Walsh, Hamming, and staircase patterns require $\bigO{m}$ gates; square and Fourier patterns require $\bigO{m^2}$; Dicke states $|D^m_k\rangle$ require $\bigO{k(m-k)}$; degree-$d$ polynomials require $\bigO{m^{d+1}}$. A companion \texttt{predict\_gates} function estimates transpiled gate counts without synthesis. Three composition primitives are supported: \texttt{SUM} for weighted superpositions, \texttt{PARTITION} for ancilla-free composition of disjoint-support patterns, and \texttt{TENSOR} for separable states over disjoint subregisters. For amplitude vectors outside these exact families, PyEncode also provides a matrix product state (MPS) loader, \texttt{encode\_mps}. The library is available at this https URL . Subjects: Emerging Technologies (cs.ET) Cite as: arXiv:2603.28259 [cs.ET] (or arXiv:2603.28259v8 [cs.ET] for this version) https://doi.org/10.48550/arXiv.2603.28259 Focus to learn more arXiv-issued DOI via DataCite Submission history From: Krishnan Suresh [ view email ] [v1] Mon, 30 Mar 2026 10:37:56 UTC (1,570 KB) [v2] Wed, 1 Apr 2026 11:45:24 UTC (1,581 KB) [v3] Thu, 2 Apr 2026 10:31:05 UTC (1,578 KB) [v4] Sun, 19 Apr 2026 14:03:42 UTC (1,984 KB) [v5] Sat, 25 Apr 2026 14:59:42 UTC (1,683 KB) [v6] Sun, 3 May 2026 23:37:26 UTC (1,853 KB) [v7] Sat, 4 Jul 2026 10:40:32 UTC (2,840 KB) [v8] Mon, 24 Aug 2026 23:23:27 UTC (2,443 KB) Full-text links: Access Paper: View PDF HTML (experimental) TeX Source view license Additional Features Audio Summary Current browse context: cs.ET < prev | next > new | recent | 2026-03 Change to browse by: cs References & Citations NASA ADS Google Scholar Semantic Scholar export BibTeX citation Bookmark Bibliographic Tools Bibliographic and Citation Tools Bibliographic Explorer Toggle Bibliographic Explorer ( What is the Explorer? ) Connected Papers Toggle Connected Papers ( What is Connected Papers? ) Litmaps Toggle Litmaps ( What is Litmaps? ) scite.ai Toggle scite Smart Citations ( What are Smart Citations? ) Code, Data, Media Code, Data and Media Associated with this Article alphaXiv Toggle alphaXiv ( What is alphaXiv? ) Links to Code Toggle CatalyzeX Code Finder for Papers ( What is CatalyzeX? ) DagsHub Toggle DagsHub ( What is DagsHub? ) GotitPub Toggle Gotit.pub ( What is GotitPub? ) Huggingface Toggle Hugging Face ( What is Huggingface? ) ScienceCast Toggle ScienceCast ( What is ScienceCast? ) Demos Demos Replicate Toggle Replicate ( What is Replicate? ) Spaces Toggle Hugging Face Spaces ( What is Spaces? ) Spaces Toggle TXYZ.AI ( What is TXYZ.AI? ) Related Papers Recommenders and Search Tools Link to Influence Flower Influence Flower ( What are Influence Flowers? ) Core recommender toggle CORE Recommender ( What is CORE? ) Author Venue Institution Topic About arXivLabs arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website. Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them. Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs . Which authors of this paper are endorsers? | Disable MathJax ( What is MathJax? ) We gratefully acknowledge support from our major funders , member institutions , and all contributors. About · Help · Contact · Subscribe · Copyright · Privacy · Accessibility · Operational Status (opens in new tab) Major funding support from

Related documents

Record · ID 668473 · SHA-256 c3d60c38710723f7
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive