展示HN:Q⊗DASH – 用于基于图的量子计算的Rust/Python量子算子框架

1作者: dioniceOS3 个月前原帖
我发布了一个实验性的量子计算框架,源于我自己的算子/图形工作:Q⊗DASH(MetatronQSO)。 <p>Rust核心库:metatron-qso-rs Python包:metatron_qso <p>GitHub: <a href="https://github.com/LashSesh/qso" rel="nofollow">https://github.com/LashSesh/qso</a> crates.io: <a href="https://crates.io/crates/metatron-qso-rs" rel="nofollow">https://crates.io/crates/metatron-qso-rs</a> PyPI: <a href="https://pypi.org/project/metatron_qso/" rel="nofollow">https://pypi.org/project/metatron_qso/</a> <p># 这是什么 <p>MetatronQSO是一个以Rust为主的量子算子框架,带有Python绑定。它专注于基于图和算子的算法:量子游走、变分量子特征求解器(VQE)、量子近似优化算法(QAOA)风格的电路及相关实验。 <p>核心理念: - 用于状态演化、电路、游走和变分算法的Rust库 - 基于PyO3的Python SDK,反映相同的概念 - 后端抽象(目前是本地模拟器,未来可通过特征支持硬件提供商) - 一个非平凡的默认几何结构(类似Metatron立方体的图形),而不是玩具线性/网格图 <p>目标不是“又一个Qiskit包装器”,而是一个自包含的算子核心,可以灵活地融入到你自己的模型中。 <p># 架构(高层次) <p>工作空间组织为多个库,关键的有: - metatron-qso-rs:核心量子库(状态、算子、电路、游走、VQE/QAOA、示例二进制文件) - metatron_qso_py:Python绑定 - 后端/遥测库,用于插入执行后端并暴露基本指标 <p>一切都是常规的Rust + Cargo,Python轮子通过maturin构建。 <p># 当前状态 <p>metatron-qso-rs已在crates.io上发布(0.1.x) metatron_qso已在PyPI上发布(0.1.x) CI构建Rust + Python,运行测试和一些基准 仓库中有文档/说明,解释算子模型和后端设计 <p>目前处于早期阶段,但它可以编译、运行示例,并且如果你对Rust感到熟悉(或愿意通过Python来操作),可以用于实验。 <p># 我希望得到的反馈 <p>Rust API的表面是否感觉符合习惯且易于组合? 对于Python用户:当前的绑定层是否是你可以实际使用的,还是你期待更高层次的抽象? 后端抽象(目前是本地模拟器,未来是硬件)是否以易于扩展的方式构建? 在我将图形/几何视为主要对象的处理方式上,有没有明显的红旗? <p>如果你对量子计算、基于图的算法或不寻常的Rust工作空间感兴趣,我将非常感激任何反馈、批评或对下一步方向的建议。
查看原文
I’ve released an experimental quantum computing framework that grew out of my own operator&#x2F;graph work: Q⊗DASH (MetatronQSO)<p>Rust core crate: metatron-qso-rs Python package: metatron_qso<p>GitHub: <a href="https:&#x2F;&#x2F;github.com&#x2F;LashSesh&#x2F;qso" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;LashSesh&#x2F;qso</a> crates.io: <a href="https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;metatron-qso-rs" rel="nofollow">https:&#x2F;&#x2F;crates.io&#x2F;crates&#x2F;metatron-qso-rs</a> PyPI: <a href="https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;metatron_qso&#x2F;" rel="nofollow">https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;metatron_qso&#x2F;</a><p># What it is<p>MetatronQSO is a Rust-first quantum operator framework with Python bindings. It focuses on graph- and operator-based algorithms: quantum walks, VQE, QAOA-style circuits and related experiments.<p>Core ideas: - Rust library for state evolution, circuits, walks and variational algorithms - PyO3-based Python SDK mirroring the same concepts - Backend abstraction (local simulator now, room for hardware providers via traits) - A nontrivial default geometry (a Metatron-cube–style graph) instead of toy line&#x2F;grid graphs<p>The goal is not “yet another Qiskit wrapper”, but a self-contained operator core you can bend into your own models.<p># Architecture (high level)<p>The workspace is organized as multiple crates, the key ones: - metatron-qso-rs: core quantum library (state, operators, circuits, walks, VQE&#x2F;QAOA, example binaries) - metatron_qso_py: Python bindings - backend&#x2F;telemetry crates for plugging in execution backends and exposing basic metrics<p>Everything is regular Rust + Cargo, with Python wheels built via maturin.<p># Current status<p>metatron-qso-rs published on crates.io (0.1.x) metatron_qso published on PyPI (0.1.x) CI builds Rust + Python, runs tests and some benchmarks There are docs&#x2F;notes in the repo explaining the operator model and backend design<p>It’s early-stage, but it compiles, runs examples, and is usable for experiments if you’re comfortable with Rust (or happy to drive it from Python).<p># What I’d like feedback on<p>Does the Rust API surface feel idiomatic and composable? For Python users: is the current binding layer something you’d realistically work with, or would you expect a higher-level abstraction? Is the backend abstraction (local simulator now, future hardware later) structured in a way that’s easy to extend? Any obvious red flags in how I treat graphs&#x2F;geometry as the primary object?<p>If you’re into quantum computing, graph-based algorithms, or unusual Rust workspaces, I’d appreciate any feedback, criticism, or ideas for where this should go next.