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.2.tar.gz (135.2 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.2-py3-none-any.whl (146.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quantumsymmetry-0.3.2.tar.gz
  • Upload date:
  • Size: 135.2 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.2.tar.gz
Algorithm Hash digest
SHA256 568002628c977f60b00e9f4efe44fdeaf3d54c800dc3978f6e4252d8d46c6b10
MD5 bf9849115b06cd8cedae8782287e708e
BLAKE2b-256 4e21f684b4aac78af31bbdce0e35032d2450424702ff6957058ff251b8c1a75a

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: quantumsymmetry-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 146.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 64dccf532ead7e96bae41f345dc1551d248471eb6a15795f2c42733668b4f2c1
MD5 b37087014d006a6607cf0458443c1b6e
BLAKE2b-256 c35dc85ba5ff524ee640853915d1b3886908774c151295bcae8130230cd014d8

See more details on using hashes here.

Provenance

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

This release

0.3.2 This release

2 files

0.3.1

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