This release is a pre-release and may not be stable for production use.
QCompress
Description
QCompress is a Python framework for the quantum autoencoder (QAE) algorithm. Using the code, the user can execute instances of the algorithm on either a quantum simulator or a quantum processor provided by Rigetti Computing’s Quantum Cloud Services. For a more in-depth description of QCompress (including the naming convention for the types of qubits involved in the QAE circuit), click here.
For more information about the algorithm, see Romero et al. Note that we deviate from the training technique used in the original paper and instead introduce two alternative autoencoder training schemes that require lower-depth circuits (see Sim et al).
Features
This code is based on an older version written during Rigetti Computing’s hackathon in April 2018. Since then, we’ve updated and enhanced the code, supporting the following features:
Executability on Rigetti’s quantum processor(s)
Several training schemes for the autoencoder
Use of the RESET operation for the encoding qubits (lowers qubit requirement)
User-definable training circuit and/or classical optimization routine
Installation
There are a few options for installing QCompress:
To install QCompress using pip, execute:
pip install qcompress
To install QCompress using conda, execute:
conda install -c rigetti -c hsim13372 qcompress
To instead install QCompress from source, clone this repository, cd into it, and run:
git clone https://github.com/hsim13372/QCompress
cd QCompress
python -m pip install -e .
Try executing import qcompress to test the installation in your terminal.
Note that the pyQuil version used requires Python 3.6 or later. For installation on a user QMI, please click here.
Examples
We provide several Jupyter notebooks to demonstrate the utility of QCompress. We recommend going through the notebooks in the order shown in the table (top-down).
Notebook |
Feature(s) |
|---|---|
Simulates the compression of the ground states of the hydrogen molecule. Uses OpenFermion and grove to generate data. Demonstrates the “halfway” training scheme. |
|
Simulates the compression of a two-qubit data set. Outlines how to run an instance on an actual device. Demonstrates the “full with reset” training scheme. |
|
Shows user how to run landscape scans for small (few-parameter) instances. Demonstrates setup of the “full with no reset” training scheme. |
Disclaimer
We note that there is a lot of room for improvement and fixes. Please feel free to submit issues and/or pull requests!
How to cite
When using QCompress for research projects, please cite:
Sukin Sim, Yudong Cao, Jonathan Romero, Peter D. Johnson and Alán Aspuru-Guzik. A framework for algorithm deployment on cloud-based quantum computers. arXiv:1810.10576. 2018.
Metadata
Release files for qcompress 0.0.1.dev12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qcompress-0.0.1.dev12.tar.gz | 180.6 kB | Without provenance | Details for qcompress-0.0.1.dev12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qcompress-0.0.1.dev12-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for qcompress-0.0.1.dev12-py2.py3-none-any.whl |
Total release size: 294.7 kB
Release files / qcompress-0.0.1.dev12.tar.gz
| Download URL | qcompress-0.0.1.dev12.tar.gz |
|---|---|
| Size | 180.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb5d97377a1bcbf3af252d2ae63027aadc37fe4ffe9f3b9e15368d1d8a141cb7
|
|
BLAKE2b-256 checksum How to use checksums |
d99affa5d48da7e77276ed3318e520d24994d35b44ffc56da01a95dbad0e6739
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
|
Release files / qcompress-0.0.1.dev12-py2.py3-none-any.whl
| Download URL | qcompress-0.0.1.dev12-py2.py3-none-any.whl |
|---|---|
| Size | 114.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
c2fce18a5ff49f24752d95b31809227e941aaaf472d04ea80301d58815ea4b28
|
|
BLAKE2b-256 checksum How to use checksums |
98fe4609fb919a3b00bbf74a81fbb63a1e233aae6b51f350f00054a597de55c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.7
|
Security for qcompress 0.0.1.dev12
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.