Skip to content
Quantum.world

Research

SymQuPS: Symbolic Quantum Phase Space Algebra in Python

Overview Research area: Quantum physics — the phase space formulation of quantum mechanics — combined with symbolic computer algebra software development. Technical level: Advanced. The paper assumes

SymQuPS: Symbolic Quantum Phase Space Algebra in Python
arXiv
2608.14263
Published
2026-08-14
Authors
Hendry M. Lim, Donny Dwiputra, Ahmad R. T. Nugraha

AI summary

Overview

Research area: Quantum physics — the phase space formulation of quantum mechanics — combined with symbolic computer algebra software development.

Technical level: Advanced. The paper assumes familiarity with Python and with the Cahill-Glauber / star-product formalism; the authors state they assume readers already know Python fundamentals, and the mathematics section is a compressed review rather than a tutorial.

Scope (one sentence): The paper presents SymQuPS, a SymPy-based Python package that symbolically evaluates Cahill-Glauber phase space representations (Glauber-Sudarshan P, Wigner, Husimi Q), star products and hatted star products via Bopp shifts, and uses these to convert Lindblad master equations into phase space equations of motion.

What This Paper Is About

The phase space formulation of quantum mechanics encodes noncommutativity into an extra structure on ordinary functions, called the star product, and analytic star-product calculations grow quickly in complexity as more quantum objects are multiplied together. The authors motivate the work with an anecdote: one of them (H.M.L.) spent approximately two hours hand-computing a chain of four star products, (q+ip) ⋆ (q+ip) ⋆ f(q,p) ⋆ (q−ip) ⋆ (q−ip), and the result turned out to be miscalculated somewhere and unusable. The goal is a symbolic algebra tool that performs this algebra reliably, and that extends to producing the phase space equation of motion for an arbitrary Lindblad master equation, and — by inverting the transform — to canonical quantization.

Key Contributions

  1. A SymPy-native phase space algebra system. SymQuPS is built entirely on SymPy and implements the Cahill-Glauber correspondence, which interpolates among the Glauber-Sudarshan P, Wigner W, and Husimi Q representations via a parameter s restricted to the real interval [−1, 1]. The package is designed to be self-contained and does not require SymPy modules beyond its core.

  2. Star products and hatted star products via Bopp shifts. Star and HattedStar evaluate ⋆_s and ⋆̂_s products by Bopp-shifting one factor, assuming at least one argument is a polynomial in the ladder operators. Products that cannot be evaluated are retained as an explicit product chain in the object's .args.

  3. s-ordered operators and ordering conversion. The sOrdering class represents { (â†)^m â^n }_s, detects ordering ambiguity, and provides .explicit() (for s = −1, 0, 1) and .express(t, explicit) to rewrite an expression in a different ordering, using the standard ordering-conversion sum over binomial coefficients.

  4. Phase space representation of arbitrary Lindblad master equations. The CG transform of the GKSL equation yields an evolution equation for W_{−s} involving a Moyal-type bracket with the transformed Hamiltonian and a star-product dissipator D_{⋆_s} built from the transformed jump operators — this is described as a key feature of the package.

Main Findings

  • Bopp shift is the computational backbone. Because exp(A ∂_x) f(x) = f(x + A) for A independent of x, the star product reduces to shifting one function's arguments by derivatives acting on the other, which is what makes symbolic evaluation tractable.

  • The s parameter ties together three representations. With the density matrix, W_s[ρ] = W_{−s}; for s = −1, 0, 1 this respectively gives the Glauber-Sudarshan (πP), Wigner W, and Husimi Q functions. The sign flip is tied to the optical equivalence theorem.

  • Formal ladder-operator derivatives simplify the formalism. Defining ∂_â F̂ = −[â†, F̂] and ∂_↠F̂ = [â, F̂] allows compact relations throughout; the authors note the situation is more complicated in the (q,p) / (q̂,p̂) basis.

  • Hilbert-space Bopp superoperators commute. Unlike the phase space Bopp operators (PSBOs), the Hilbert space Bopp superoperators (HSBSs) defined in Eq. (26) commute with each other, so they can be used to speed up hatted star-product evaluation.

  • Implementation uses custom object classes. Scalars and operators subclass a modified sympy.Symbol (Base) with caching and subscript attributes; StateFunction instead subclasses sympy.Function so that sympy.Derivative works on it; a custom Derivative class converts formal operator derivatives into commutators. TimeDependentOp accepts only densityOp, since other operators are time-independent in the formalism.

  • Configurable constants with validation. hbar, zeta, and s are global Constant objects with .val and .default_value. The package warns if s is set outside the real [−1, 1] interval and raises an error if hbar or zeta are not real and positive.

  • Documented limitations. The package does not account for non-polynomial Bopp-shiftable functions such as e^α, and none of its functionalities is directly compatible with the sympy.physics.quantum subpackage.

  • Performance results are not reported in the supplied content. Section 5 of the paper is described as discussing performance in typical use cases, but the excerpt is truncated within Section 3.3, so no timings, benchmarks, or comparisons are available here.

Methodology in Plain English

The authors first lay out the Cahill-Glauber correspondence, a one-parameter family of maps between quantum operators and functions on phase space, parameterized by s. Instead of computing the transform integrals directly, they exploit algebraic properties of the correspondence: the transform of an s-ordered monomial is just the monomial with â replaced by α and ↠replaced by α*, and transforms are complex linear and respect Hermitian conjugation. For products, they use the Bopp shift, which turns a star product into a shifted-argument evaluation of one function on the other — practical whenever one factor is a polynomial in the ladder operators. They then implement this in Python on top of SymPy, splitting the physical quantities into scalar and operator object classes, adding ordering-aware objects, and providing CGTransform and iCGTransform that apply the algebraic rules factor by factor (polynomial factors are first rewritten in s-ordered form). The inverse transform doubles as a quantization routine. Finally, applying the transform term by term to the Lindblad equation produces the phase space equation of motion, which the package can construct symbolically.

Why This Matters

Impact on research: Hand algebra with star products is slow and error-prone, as the authors' own two-hour miscalculation illustrates. A symbolic tool makes derivations of phase space equations of motion reproducible and checkable, and lowers the barrier to working in a formulation the authors describe as historically less prominent than path integrals or Hilbert space methods. It also provides a quantization route, since the transforms are invertible.

Real-world applications (as framed in the paper):

  • Quantum optics, where the phase space formalism has been used intensively and where Gaussian states of light exhibit useful properties.
  • Studies of decoherence and the classical limit of quantum systems, dynamics the authors say may be less intuitive in other formulations.
  • Plasma physics, cited among the recently found uses of the formalism.
  • Mesoscopic systems, likewise cited.

Industry relevance: The package is released under the Apache License 2.0 (the paper is CC BY-NC-SA 4.0), is aimed at the journal Computer Physics Communications, and is maintained at a public GitHub repository — positioning it as reusable research software rather than a one-off calculation. Its dependence only on SymPy core keeps installation and integration simple for computational physics groups.

Future Directions

  • Handling non-polynomial Bopp-shiftable factors. The current implementation explicitly excludes cases such as e^α, which remain as unevaluated star-product chains rather than being simplified.
  • Interoperability with SymPy's quantum module. The authors state that SymQuPS does not work with sympy.physics.quantum without manual manipulation, leaving a natural integration target open.
  • Scaling the multipartite description. The formalism is presented for a unipartite system with multipartite formulae deferred to Appendix A, and a minimal symqups.simple subpackage exists for unipartite use; extending convenient support for composite systems is an implied next step.
  • Performance characterization and improvement. The paper promises a performance discussion in Section 5, but no timings or benchmark comparisons appear in the supplied content, so the practical cost of large star-product chains and possible speedups (for example exploiting the commuting HSBSs) remain open questions.

Target Audience

Quantum optics and open quantum systems researchers who derive phase space equations of motion by hand; computational physicists looking for symbolic rather than numerical tools; developers of computer algebra software in physics; and graduate students already comfortable with Python and with operator/phase space methods who want to automate star-product algebra. Readers seeking benchmark numbers or introductory tutorials will need the full paper, since the performance section is not included in the supplied content.

Authors’ abstract

We present \texttt{SymQuPS}, a SymPy-based algebra system in Python mainly aimed toward the phase space representation of quantum mechanics within the Cahill-Glauber formalism (including the Glauber-Sudarshan $P$, Wigner, and Husimi $Q$ representations). By extension, the package serves as an algebraic venue for canonical quantization. A key feature is the phase space representation of an arbitrary Lindblad master equation, which gives the phase space equation of motion of the quantum system. We describe the core functionalities of the package, consisting of $s$-ordered operators, the star products, and the phase space representation. Some examples of use are given to illustrate the application of the package, and the package's performance in typical use cases is discussed.

Read the original paper