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.1.tar.gz (134.4 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.1-py3-none-any.whl (145.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quantumsymmetry-0.3.1.tar.gz
  • Upload date:
  • Size: 134.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for quantumsymmetry-0.3.1.tar.gz
Algorithm Hash digest
SHA256 ad1325649e183f53d911ae820d2f7b30cfe84eead722d5425033e8782df3ec56
MD5 8d60cf4f188dfd4d3529930f7ef61208
BLAKE2b-256 24713c86f0d6546435bf2dae32159dfe5c3a935bafc5f9fc121a386a8144b002

See more details on using hashes here.

Provenance

The following attestation bundles were made for quantumsymmetry-0.3.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: quantumsymmetry-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 145.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for quantumsymmetry-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7aa15cd32f790bf88526cb08c2e7260f32f01fe85c5c3c69f49896da8f9c5348
MD5 75c34e7a66f89bfc2a35c38497f28fdd
BLAKE2b-256 27c6a09630b1a4c83c1961b6a3f304626cc4e1a7580ef73e0668d6c106e6406a

See more details on using hashes here.

Provenance

The following attestation bundles were made for quantumsymmetry-0.3.1-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

This release

0.3.1 This release

2 files

0.3.0

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