Classically postprocess noisy quantum samples to yield more accurate energy estimations
Project description
Qiskit addon: sample-based quantum diagonalization (SQD)
Table of contents
- About
- Documentation
- Installation
- Computational requirements
- Deprecation Policy
- Contributing
- License
- References
About
Qiskit addons are a collection of modular tools for building utility-scale workloads powered by Qiskit.
This package contains the Qiskit addon for sample-based quantum diagonalization (SQD) -- a technique for finding eigenvalues and eigenvectors of quantum operators, such as a quantum system Hamiltonian, using quantum and distributed classical computing together.
Classical distributed computing is used to process samples obtained from a quantum processor and to project and diagonalize a target Hamiltonian in a subspace spanned by them. This allows SQD to be robust to samples corrupted by quantum noise and deal with large Hamiltonians, such as chemistry Hamiltonians with millions of interaction terms, beyond the reach of any exact diagonalization methods.
The SQD tool can target Hamiltonians expressed as linear combinations of Pauli operators, or second-quantized fermionic operators. The input samples are obtained by quantum circuits defined by the user, which are believed to be good representations of eigenstates (e.g. the ground state) of a target operator. The convergence rate of SQD as a function of the number of samples improves with the sparseness of the target eigenstate.
The projection and diagonalization steps are performed by a classical solver. We provide here two generic solvers, one for fermionic systems and another for qubit systems. Other solvers that might be more efficient for specific systems can be interfaced by the users.
Documentation
All documentation is available at https://qiskit.github.io/qiskit-addon-sqd/.
Installation
We encourage installing this package via pip
, when possible:
pip install 'qiskit-addon-sqd'
For more installation information refer to these installation instructions.
Computational requirements
The computational cost of SQD is dominated by the eigenstate solver calls. At each step of the self-consistent configuration recovery iteration, n_batches
of eigenstate solver calls are performed. The different calls are embarrassingly parallel. In this tutorial, those calls are inside a for
loop. It is highly recommended to perform these calls in parallel.
The qiskit_addon_sqd.fermion.solve_fermion()
function is multithreaded and capable of handling systems with ~25 spacial orbitals and ~10 electrons with subspace dimensions of ~$10^7$, using ~10-30 cores.
Choosing subspace dimensions
The choice of the subspace dimension affects the accuracy and runtime of the eigenstate solver. The larger the subspace the more accurate the calculation, at the cost of increasing the runtime and memory requirements. The optimal subspace size for a given system is not known, thus a convergence study with the subspace dimension may be performed as described in this example.
The subspace dimension is set indirectly
In this package, the user controls the number of bitstrings (see the samples_per_batch
argument in qiskit_addon_sqd.subsampling.postselect_and_subsample()
) contained in each subspace. The value of this argument sets an upper bound to the subspace dimension in the case of quantum chemistry applications. See this example for more details.
Deprecation Policy
We follow semantic versioning and are guided by the principles in Qiskit's deprecation policy. We may occasionally make breaking changes in order to improve the user experience. When possible, we will keep old interfaces and mark them as deprecated, as long as they can co-exist with the new ones. Each substantial improvement, breaking change, or deprecation will be documented in the release notes.
Contributing
The source code is available on GitHub.
The developer guide is located at CONTRIBUTING.md in the root of this project's repository. By participating, you are expected to uphold Qiskit's code of conduct.
We use GitHub issues for tracking requests and bugs.
License
References
[1] Javier Robledo-Moreno, et al., Chemistry Beyond Exact Solutions on a Quantum-Centric Supercomputer, arXiv:2405.05068 [quant-ph].
[2] Keita Kanno, et al., Quantum-Selected Configuration Interaction: classical diagonalization of Hamiltonians in subspaces selected by quantum computers, arXiv:2302.11320 [quant-ph].
Project details
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
File details
Details for the file qiskit_addon_sqd-0.8.0.tar.gz
.
File metadata
- Download URL: qiskit_addon_sqd-0.8.0.tar.gz
- Upload date:
- Size: 647.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41a69af80197066d15a6cafabd72c23a12137a8c4eeea9fb4c783f099e17b2f3 |
|
MD5 | 23b30bd7b0790940b0a38398ceed835a |
|
BLAKE2b-256 | d6e54b2d1e0988c0152d4348115c082ded8efe1f6f3aa8ed837ac0fadb68d5b7 |
Provenance
The following attestation bundles were made for qiskit_addon_sqd-0.8.0.tar.gz
:
Publisher:
release.yml
on Qiskit/qiskit-addon-sqd
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
qiskit_addon_sqd-0.8.0.tar.gz
- Subject digest:
41a69af80197066d15a6cafabd72c23a12137a8c4eeea9fb4c783f099e17b2f3
- Sigstore transparency entry: 147067252
- Sigstore integration time:
- Predicate type:
File details
Details for the file qiskit_addon_sqd-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: qiskit_addon_sqd-0.8.0-py3-none-any.whl
- Upload date:
- Size: 29.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce1b31e55351739af70374dfcdcfcdb882b6ceabf1eae03925c38aaa3c10d071 |
|
MD5 | 581588aa046e223adac34cf01e9908a7 |
|
BLAKE2b-256 | 00d1a614b61ffbc3dcaec6ebdfc80e22ee13c6faabe4d1ca5640ccb971e74412 |
Provenance
The following attestation bundles were made for qiskit_addon_sqd-0.8.0-py3-none-any.whl
:
Publisher:
release.yml
on Qiskit/qiskit-addon-sqd
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
qiskit_addon_sqd-0.8.0-py3-none-any.whl
- Subject digest:
ce1b31e55351739af70374dfcdcfcdb882b6ceabf1eae03925c38aaa3c10d071
- Sigstore transparency entry: 147067253
- Sigstore integration time:
- Predicate type: