Octomind
Same model as opencode, same endpoint, same prices — octomind solved 24/25 to its 19/25, at half the cost. Open-source agent runtime: one binary, any model, runs unattended in CI. Apache 2.0.
翻譯準備中
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗A header-only C++ library implementing sparse multidiagonal operator algebra for quantum systems of arbitrary arity, extracted from the C++QED framework.
A multidiagonal operator over a Hilbert space of dimension $N$ is a sparse matrix storing an arbitrary set of diagonals at arbitrary offsets. In the context of quantum optics and cavity QED, Hamiltonians and jump operators naturally take this form. For example, the harmonic oscillator ladder operators $a$, $a^\dagger$ are single off-diagonals; number operators $a^\dagger a$ are main diagonals, and so is the Kerr term $(a^\dagger)^2 a^2 = a^\dagger a,(a^\dagger a - 1)$; two-photon terms like $a^2$ sit two diagonals off the main one.
For a composite system of $R$ subsystems, MultiDiagonal<RANK> stores an operator of the form
$$A = \sum_{\mathbf{o} \in \mathbb{K}} \sum_{\mathbf{n}} \alpha^{\mathbf{o}}_{\mathbf{n}} \left|\mathbf{n}\right\rangle\left\langle \mathbf{n}+\mathbf{o}\right|$$
with $\mathbb{K} \subset \mathbb{Z}^R$ an arbitrary set of signed offset vectors, one entry per subsystem axis, and $\mathbf{n}$ running over the multi-indices for which both $\mathbf{n}$ and $\mathbf{n}+\mathbf{o}$ lie in the truncated Hilbert space. A positive entry thus means an upper diagonal on that axis. The coefficients need not factorize over the subsystems; direct products, built with operator*, are the special case where they do.
Each diagonal is keyed by a signed offset per axis — positive = upper, negative = lower, zero = main diagonal. The offset counts the quanta a diagonal moves along each axis, and the algebra reduces to arithmetic on these counts:
The diagonal at signed offset $o$ (per axis, dimension $D$) has extent $D-|o|$, and entry $k$ holds the matrix element $A_{k+o^-,,k+o^+}$ with $o^\pm=\max(\pm o,0)$. This min(row,col)-anchored storage is symmetric under transposition, which is what makes conjugation a pure key negation. Application to a state vector costs $O(N \cdot d)$ for $d$ diagonals; composition runs over the $d_A \cdot d_B$ diagonal pairs, each in one pass over the window where the two diagonals overlap.
Tridiagonal?The predecessor class Tridiagonal<RANK> in C++QED v2 stored exactly three diagonals per axis — at positions $-K$, $0$, $+K$ for a single shared offset $K$ — and was not closed under composition: the product of two tridiagonal operators is in general pentadiagonal, and with different offsets is not tridiagonal at all. MultiDiagonal lifts all these restrictions — any number of diagonals at independent arbitrary offsets, and the operator algebra is closed under composition (operator|), direct product (operator*), addition, and Hermitian conjugation.
The truncated algebra is represented exactly, including its physical deviations from the untruncated one: e.g. $[a,a^\dagger]$ at cutoff $D$ is $\mathrm{diag}(1,\ldots,1,1-D)$, not $\mathbb{1}$ — as it must be for any finite-dimensional representation.
MultiDiagonal<RANK> for any compile-time arity $M$, including composition at arbitrary rankcopy)tag_invoke, useful for testing and debuggingOn the reference machine (Intel Core i7-7700, GCC 16, Eigen 5.0.1), with the operator in cache, applying a MultiDiagonal is:
These figures are for the default build of both. The speed-up depends on the processor: on a 2022 laptop core it was 1.5–2.4× and 1.0–1.6×. -fcx-limited-range makes Eigen 10–17% faster and leaves the library unchanged, since its kernel multiplies in real arithmetic. Before the application loop was rewritten (#1, #23), the Jaynes–Cummings coupling was 3.4–4.5× slower than Eigen.
For operators as large as the state, the library is between 1.5× faster and 1.45× slower than Eigen. Once both sides are limited by memory bandwidth, no format gains much over a sparse matrix. What still holds the library back is its loop shape, one diagonal at a time with a store to the output for each:
That is a matter of the loop, not of the representation.
Measurements, causes and outlook, including what is not yet measured (the interaction picture): Performance of MultiDiagonal.
include/ to the include path and writing #include <multidiagonal/MultiDiagonal.h>)The library itself is header-only — nothing to build. Configuring and building compiles the test suite:
cmake -B build -DCMAKE_BUILD_TYPE=Debug
cmake --build build
ctest --test-dir build --output-on-failure
(Debug enables the library's bounds and dimension checks, which the test suite exercises; CI runs the Debug×Release matrix on GCC and Clang.)
include(FetchContent)
FetchContent_Declare(cppqed-multidiagonal
GIT_REPOSITORY https://github.com/WignerQuantumOptics/cppqed-multidiagonal.git
GIT_TAG <full commit SHA of a release>
FIND_PACKAGE_ARGS 0.4) # an installed version is used when found
FetchContent_MakeAvailable(cppqed-multidiagonal)
target_link_libraries(MyTarget PUBLIC cppqed::multidiagonal)
A copy of the source tree in your project works too, via add_subdirectory.
find_package (after installation)cmake --install build
find_package(cppqed-multidiagonal REQUIRED)
target_link_libraries(MyTarget PUBLIC cppqed::multidiagonal)
Either way, the headers are included with their directory prefix, e.g. #include <multidiagonal/MultiDiagonal.h>.
include/multidiagonal/
Traits.h — FWD, Boost.Hana/JSON setup, passByValue_v, ReferenceMF
MultiArray.h — generic rank-N array with strided view
MultiArrayComplex.h — dcomp specializations, directProduct, Eigen interop
MultiDiagonal.h — multidiagonal operator algebra (incl. identity and composition)
tests/
testMultiArray.cc, testMultiArrayComplex.cc, testMultiDiagonal.cc
consumer/ — downstream project used by CI (find_package and FetchContent)
benchmarks/
benchmarkMultiDiagonal.cc, plot.py — comparison with Eigen sparse and dense
kernels.cc — application loop experiments (built with and without -fcx-limited-range)
performance.md — measurements, causes and outlook
cmake/
cppqed-multidiagonalConfig.cmake.in
Doxyfile, doxygen-math.sed — API docs; this README is their main page
Distributed under the Boost Software License, Version 1.0.
András Vukics — extracted from C++QED, originally developed 2006–2026.