Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

CommutatorX

Pavitra Kanetkar

Published Aug 3, 2026• 0 citations
Publisher

Abstract

CommutatorX : A Quantum Operator Commutation Simulator This Python script is a small symbolic quantum mechanics engine built using the SymPy library. The script demonstrates one of the most important ideas in quantum mechanics: [A,B]=AB−BA where: A and B are quantum operators, and the commutator determines whether two physical observables are compatible.

DOI
10.17605/osf.io/ug3qr

Related papers

Quantum Mechanics, Quantum Computation, and the Density Operator in SymPy

Addison Cugini

Because aspects of quantum mechanics are both difficult to understand and difficult algebraically, there is a need for software which symbolically simulates quantum me-chanical phenomena. To accomplish this goal, code has been added to an open-source computer algebra system, called SymPy, which models the abstraction of Dirac nota-tion and the density operator. Additionally, a quantum computer simulation has been built using this abstraction. This paper shall discuss the code that has been added as well as any relevant physics important to understanding the code. In particular, we shall focus on the density operator of statistical quantum mechanics using SymPy's density matrices as a guide. 1

•Jan 1, 2011•1 citation

SymQuPS: Symbolic Quantum Phase Space Algebra in Python

Hendry M. Lim, Donny Dwiputra, Ahmad R. T. Nugraha

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.

quant-pharXiv:2608.14263•Aug 17, 2026•0 citations

Quantum Programming in Python: Quantum 1D Simple Harmonic Oscillator and Quantum Mapping Gate

M. Hoff

A common problem when learning Quantum Mechanics is the complexity in the mathematical and physical concepts, which leads to difficulty in solving and understanding problems. Using programming languages like Python have become more and more prevalent in solving challenging physical systems. An open-source computer algebra system, SymPy, has been developed using Python to help solve these difficult systems. I have added code to the SymPy library for two different systems, a One-Dimensional Quantum Harmonic Oscillator and a Quantum Mapping Gate used in Quantum Computing.

•Jan 1, 2013•0 citations

Implementation of quantum game theory simulations using Python

A. Madrid S.

This paper provides some examples about quantum games simulated in Python’s programming language. The quantum games have been developed with the Sympy Python library, which permits solving quantum problems in a symbolic form. The application of these methods of quantum mechanics to game theory gives us more possibility to achieve results not possible before. To illustrate the results of these methods, in particular, there have been simulated the quantum battle of the sexes, the prisoner’s dilemma and card games. These solutions are able to exceed the classic bottle neck and obtain optimal quantum strategies. In this form, python demonstrated that is possible to do more advanced and complicated quantum games algorithms.

Proceedings of SPIE, the International Society for Optical Engineering/Proceedings of SPIE•May 28, 2013•0 citations

Efficiently manipulating Pauli strings with PauliArray

Maxime Dion, Tania Belabbas, Nolan Bastien

Pauli matrices and Pauli strings are widely used in quantum computing. These mathematical objects are useful to describe or manipulate the quantum state of qubits. They offer a convenient basis to express operators and observables used in different problem instances such as molecular simulation and combinatorial optimization. Therefore, it is important to have a well-rounded, versatile and efficient tool to handle a large number of Pauli strings and operators expressed in this basis. This is the objective behind the development of the PauliArray library presented in this work. This library introduces data structures to represent arrays of Pauli strings and operators as well as various methods to modify and combine them. Built using NumPy, PauliArray offers fast operations and the ability to use broadcasting to easily carry out otherwise cumbersome manipulations. Applications to the fermion-to-qubit mapping, to the estimation of expectation values and to the computation of commutators are considered to illustrate how PauliArray can simplify some relevant tasks and accomplish them faster than current libraries.

arXiv:2405.19287•May 29, 2024•7 citations

Symbolic Quantum Circuit Simplification in SymPy

Matthew Curry

In the field of quantum information science, one can design a series of quantum logic operations known as a circuit. Circuits are the basis for quantum computations in quantum computing. As circuits will most likely be designed from a logical standpoint, there could exist mathematical redundancies which will lead to a larger circuit than necessary. These redundancies are computationally expensive, and there is a need for them to be found and eliminated to simplify the circuit. We present our research on finding the rules for simplifying circuits and its implementation in SymPy.

•Jan 1, 2011•2 citations
CommutatorX : A Quantum Operator Commutation Simulator This Python script is a small symbolic quantum mechanics engine built using the SymPy library. The script demonstrates one of the most important ideas in quantum mechanics: [A,B]=AB−BA where: A and B are quantum operators, and the commutator determines whether two physical observables are compatible.
Because aspects of quantum mechanics are both difficult to understand and difficult algebraically, there is a need for software which symbolically simulates quantum me-chanical phenomena. To accomplish this goal, code has been added to an open-source computer algebra system, called SymPy, which models the abstraction of Dirac nota-tion and the density operator. Additionally, a quantum computer simulation has been built using this abstraction. This paper shall discuss the code that has been added as well as any relevant physics important to understanding the code. In particular, we shall focus on the density operator of statistical quantum mechanics using SymPy's density matrices as a guide. 1
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 PPP, Wigner, and Husimi QQQ 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 sss-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.
A common problem when learning Quantum Mechanics is the complexity in the mathematical and physical concepts, which leads to difficulty in solving and understanding problems. Using programming languages like Python have become more and more prevalent in solving challenging physical systems. An open-source computer algebra system, SymPy, has been developed using Python to help solve these difficult systems. I have added code to the SymPy library for two different systems, a One-Dimensional Quantum Harmonic Oscillator and a Quantum Mapping Gate used in Quantum Computing.
This paper provides some examples about quantum games simulated in Python’s programming language. The quantum games have been developed with the Sympy Python library, which permits solving quantum problems in a symbolic form. The application of these methods of quantum mechanics to game theory gives us more possibility to achieve results not possible before. To illustrate the results of these methods, in particular, there have been simulated the quantum battle of the sexes, the prisoner’s dilemma and card games. These solutions are able to exceed the classic bottle neck and obtain optimal quantum strategies. In this form, python demonstrated that is possible to do more advanced and complicated quantum games algorithms.
Pauli matrices and Pauli strings are widely used in quantum computing. These mathematical objects are useful to describe or manipulate the quantum state of qubits. They offer a convenient basis to express operators and observables used in different problem instances such as molecular simulation and combinatorial optimization. Therefore, it is important to have a well-rounded, versatile and efficient tool to handle a large number of Pauli strings and operators expressed in this basis. This is the objective behind the development of the PauliArray library presented in this work. This library introduces data structures to represent arrays of Pauli strings and operators as well as various methods to modify and combine them. Built using NumPy, PauliArray offers fast operations and the ability to use broadcasting to easily carry out otherwise cumbersome manipulations. Applications to the fermion-to-qubit mapping, to the estimation of expectation values and to the computation of commutators are considered to illustrate how PauliArray can simplify some relevant tasks and accomplish them faster than current libraries.
In the field of quantum information science, one can design a series of quantum logic operations known as a circuit. Circuits are the basis for quantum computations in quantum computing. As circuits will most likely be designed from a logical standpoint, there could exist mathematical redundancies which will lead to a larger circuit than necessary. These redundancies are computationally expensive, and there is a need for them to be found and eliminated to simplify the circuit. We present our research on finding the rules for simplifying circuits and its implementation in SymPy.