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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad1325649e183f53d911ae820d2f7b30cfe84eead722d5425033e8782df3ec56
|
|
| MD5 |
8d60cf4f188dfd4d3529930f7ef61208
|
|
| BLAKE2b-256 |
24713c86f0d6546435bf2dae32159dfe5c3a935bafc5f9fc121a386a8144b002
|
Provenance
The following attestation bundles were made for quantumsymmetry-0.3.1.tar.gz:
Publisher:
release.yml on dariopicozzi/quantumsymmetry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quantumsymmetry-0.3.1.tar.gz -
Subject digest:
ad1325649e183f53d911ae820d2f7b30cfe84eead722d5425033e8782df3ec56 - Sigstore transparency entry: 2479919663
- Sigstore integration time:
-
Permalink:
dariopicozzi/quantumsymmetry@1d25813378041be5d69bef06153226576e27a27c -
Branch / Tag:
refs/heads/master - Owner: https://github.com/dariopicozzi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1d25813378041be5d69bef06153226576e27a27c -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7aa15cd32f790bf88526cb08c2e7260f32f01fe85c5c3c69f49896da8f9c5348
|
|
| MD5 |
75c34e7a66f89bfc2a35c38497f28fdd
|
|
| BLAKE2b-256 |
27c6a09630b1a4c83c1961b6a3f304626cc4e1a7580ef73e0668d6c106e6406a
|
Provenance
The following attestation bundles were made for quantumsymmetry-0.3.1-py3-none-any.whl:
Publisher:
release.yml on dariopicozzi/quantumsymmetry
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quantumsymmetry-0.3.1-py3-none-any.whl -
Subject digest:
7aa15cd32f790bf88526cb08c2e7260f32f01fe85c5c3c69f49896da8f9c5348 - Sigstore transparency entry: 2479920133
- Sigstore integration time:
-
Permalink:
dariopicozzi/quantumsymmetry@1d25813378041be5d69bef06153226576e27a27c -
Branch / Tag:
refs/heads/master - Owner: https://github.com/dariopicozzi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1d25813378041be5d69bef06153226576e27a27c -
Trigger Event:
push
-
Statement type: