PauliEngine =========== .. image:: logo/pauliengine-lockup-paulis-color.svg :alt: PauliEngine :width: 420px :align: center :class: only-light .. image:: logo/pauliengine-lockup-paulis-reverse.svg :alt: PauliEngine :width: 420px :align: center :class: only-dark **Fast arithmetic for quantum operators.** A header-only C++20 library with a nanobind Python frontend for Pauli strings, sums of Pauli strings (qubit Hamiltonians) and symmetry-adapted operator bases (Pauli cycles and Pauli orbits). Coefficients can be numeric (``std::complex``) or symbolic (polynomials in named parameters). There are no C++ dependencies. - Products, commutators and targeted commutators in the binary symplectic representation, also directly in the cycle and orbit bases. - Low-weight operators on many qubits are stored sparse automatically, so their cost does not grow with the number of qubits. - Arithmetic and Hilbert-Schmidt inner products between all representations. - Pauli decomposition of arbitrary :math:`2^n \times 2^n` matrices. See `arXiv:2601.02233 `_ for the algorithmic background and `arXiv:2604.16701 `_ for the cycle and orbit bases. .. code-block:: python import pauliengine as pe H = pe.PauliStringSum([pe.PauliString(1.0, {0: "Z", 1: "X"}), pe.PauliString("a", {1: "X"})]) print(H.commutator(H.dagger())) .. toctree:: :maxdepth: 2 :caption: User guide installation quickstart symmetry .. toctree:: :maxdepth: 2 :caption: Reference python_api cpp_api