Skip to main content
QuantumSymmetry

PyPI version

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantumsymmetry-0.3.0.tar.gz (134.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quantumsymmetry-0.3.0-py3-none-any.whl (145.5 kB view details)

Uploaded Python 3

File details

Details for the file quantumsymmetry-0.3.0.tar.gz.

File metadata

  • Download URL: quantumsymmetry-0.3.0.tar.gz
  • Upload date:
  • Size: 134.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for quantumsymmetry-0.3.0.tar.gz
Algorithm Hash digest
SHA256 97dbda4b3c09a63c8905cbb44cc48a077b6760660d0ec450f84848085a35eba3
MD5 806b6b30b8f45ea1f020744ec48c6fef
BLAKE2b-256 e5df6ce9537bf90e704c7b0c62247909cb325fd53f9e2209b065fd92c3ec3a5d

See more details on using hashes here.

Provenance

The following attestation bundles were made for quantumsymmetry-0.3.0.tar.gz:

Publisher: release.yml on dariopicozzi/quantumsymmetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file quantumsymmetry-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: quantumsymmetry-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 145.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for quantumsymmetry-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f62f6d318671ff731cd401a0397fb0365d17c28112bfd3599d02e3dd82cbad1
MD5 b5c21544c96db571651b884bcde93d55
BLAKE2b-256 b04616f7954a77b6f024c2bcb3159c87cdc2823e2c1359bd61bfd948cb351071

See more details on using hashes here.

Provenance

The following attestation bundles were made for quantumsymmetry-0.3.0-py3-none-any.whl:

Publisher: release.yml on dariopicozzi/quantumsymmetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

This release

0.3.0 This release

2 files

0.2.17

2 files

0.2.16

2 files

0.2.15

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.8

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.43

2 files

0.1.42

2 files

0.1.41

2 files

0.1.40

2 files

0.1.39

2 files

0.1.38

2 files

0.1.37

2 files

0.1.36

2 files

0.1.35

2 files

0.1.34

2 files

0.1.33

2 files

0.1.32

2 files

0.1.31

2 files

0.1.30

2 files

0.1.29

2 files

0.1.28

2 files

0.1.27

2 files

0.1.26

2 files

0.1.25

2 files

0.1.24

2 files

0.1.23

2 files

0.1.22

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page