QuantumSymmetry
QuantumSymmetry is an open-source Python package for research in molecular physics using quantum computing. It allows to encode more efficiently information about a molecular system on a quantum computer using symmetry-adapted encodings, and provides a universal hardware-efficient variational ansatz (MinimalCircuit) whose Fubini–Study metric is diagonal in closed form.
QuantumSymmetry uses PySCF to perform Hartre-Fock calculations, for the calculation of one- and two-electron integrals and the construction of symmetry-adapted molecular orbitals. It automatically retrieves from PySCF the largest Boolean symmetry group for the input molecular geometry, as well as the irreducible representation of its HF ground state.
QuantumSymmetry takes arbitrary user input such as the molecular geometry and the atomic basis set and allows the user to construct the qubit operators that correspond to fermionic operators on the molecular system in the appropriate symmetry-adapted encoding. It is compatible with both OpenFermion and Qiskit.
Installation
You can install QuantumSymmetry by running the following command from terminal:
$ pip install quantumsymmetry
Quickstart
In QuantumSymmetry, information about a symmetry-adapted encoding is in an Encoding object:
from quantumsymmetry import Encoding
encoding = Encoding(
atom = 'H 0 0 0; H 0.7414 0 0',
basis = 'sto-3g')
This can be used for example to obtain the symmetry-adapted encoding qubit Hamiltonian:
encoding.hamiltonian
Binary-tree variational ansatz
QuantumSymmetry also provides MinimalCircuit, a universal hardware-efficient variational ansatz built from a binary tree of uniformly controlled rotations. Its Fubini–Study metric is diagonal in closed form, so quantum natural gradient, imaginary- and real-time evolution, and exact sector-restricted (Haar) sampling run with no auxiliary metric circuits and no matrix inversion. When the target state lives in a symmetry sector, a pruning compiler produces circuits whose two-qubit gate count grows linearly in the number of active basis states.
from quantumsymmetry import MinimalCircuit
# Two spatial orbitals (4 qubits), one spin-up and one spin-down electron
mc = MinimalCircuit.from_particle_number(num_spatial_orbitals = 2, num_particles = (1, 1))
mc.circuit # the pruned Qiskit circuit
mc.num_parameters # number of free tree angles
The same object drives natural-gradient VQE (minimize_energy), real- and imaginary-time evolution (evolve_realtime), sector-Haar sampling (sample_sector_haar), a Schrieffer–Wolff dressing layer (make_dressing_pool), and exact total-spin adaptation (MinimalCircuit.from_particle_number(..., total_spin = S)).
Tutorials
Interactive tutorials with code snippets are hosted on Google Colab: the symmetry-adapted encodings series and the binary-tree ansatz series.
How to cite
Picozzi, D. and Tennyson, J. (2023). Symmetry-adapted encodings for qubit number reduction by point-group and other Boolean symmetries. Quantum Science and Technology, 8(3). DOI:https://doi.org/10.1088/2058-9565/acd86c
Getting in touch
For any question about QuantumSymmetry or my research, don't hesitate to get in touch.
License
QuantumSymmetry was created by Dario Picozzi. It is licensed under the terms of the GNU General Public License v3.0 license.
Metadata
Release files for quantumsymmetry 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quantumsymmetry-0.3.5.tar.gz | 137.5 kB | With provenance | Details for quantumsymmetry-0.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| quantumsymmetry-0.3.5-py3-none-any.whl | Python 3 | none | any | Details for quantumsymmetry-0.3.5-py3-none-any.whl |
Total release size: 286.2 kB
Release files / quantumsymmetry-0.3.5.tar.gz
| Download URL | quantumsymmetry-0.3.5.tar.gz |
|---|---|
| Size | 137.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ea4882dcf79bf81d00ebd905c139343999b16a9f9dd13ceba89e48ea4c91c05
|
|
BLAKE2b-256 checksum How to use checksums |
8f793fc78181db61330d9f5277554b66ed9bdaddd2381045371941e321ceac12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.
Transparency logRelease files / quantumsymmetry-0.3.5-py3-none-any.whl
| Download URL | quantumsymmetry-0.3.5-py3-none-any.whl |
|---|---|
| Size | 148.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d420ccd422f2464b18512b1910f5678f89386049553fbb922f4559146c8d4c85
|
|
BLAKE2b-256 checksum How to use checksums |
bc244a63ce21bd66580d88c8db03f481a06056d3ccaa05f170be0528e2b6ee62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.
Transparency logSecurity for quantumsymmetry 0.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for quantumsymmetry-0.3.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.