A quantum plugin for qiskit AER
Project description
AER Quantum Server Plugin
This is the AER plugin for quantum local server. With it, you can easily run your AER jobs in a local server outside your own computer.
Functionalities
In this early stage, this plugin manages the following backends:
- AER (pure AER implementation)
and to them you can submit jobs to get: counts, quasi distributions and expectation values.
Even thought it's very limited for now, in future versions we aim to make more backends available.
No Server
Although this is meant to be used inside a docker container as a plugin for quantum local server, you can run it locally without it.
To do that, simply install the dependencies:
pip install -r requirements
and then import the aer_plugin module inside your python script:
#main.py
from aer_plugin import Plugin
p = Plugin()
# your qiskit code
# remember to export
# your circuit to a
# .qasm file
# ...
target_backend = "aer"
qasm_file_path = "<qasm_file_path>"
metadata = {"shots":1000}
result_type = "counts"
result = p.execute(
target_backend,
qasm_file_path,
metadata,
result_type)
print(result) # e.g.: {'0':1000}
Dev
For developers. There's some dependencies you need to have installed before adding any code. To ease this installation, you can use conda/mamba/conda-lock to load everything in the correct version.
# using conda/mamba/conda-lock
mamba env create -f environment.yml
conda env create -f environment.yml
conda-lock install -n aer-plugin conda-lock.yml
# then activate your environment
conda activate aer-plugin
mamba activate aer-plugin
# however, if you prefere, you can use pip as well
# make sure to use a virtual environment to avoid conflicts
pip install -r requirements.txt -r dev-requirements.txt
In this project are being used 3 check stages to ensure code quality, which are:
- linting/code style: using
pylint/black - types: using
mypy - tests: using
pytest
To manage all this, we're using tox, for 3 python versions: 3.10, 3.11 and 3.12, expecting more versions in the future.
During development, ensure to run tox regularly to ensure that everything is behaving as expected.
to learn more about tox check their wiki here.
Contributing
To start contributing for this project, make sure to:
- open an issue explaining what you have in mind
- follow the dev section
- add as many tests as you can on ./tests
- use a different branch for you modifications
- add comments explaining parts of your code that can be directly understand without deep investigation
- create readable code
Ensuring that, you're ready to open a pull request and be part of this community :)
Project details
Release history Release notifications | RSS feed
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 aer_plugin-0.0.1.tar.gz.
File metadata
- Download URL: aer_plugin-0.0.1.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
876a975ff543c401334e8efaf20ada26dacfcc963959c4a5603559887172efc5
|
|
| MD5 |
5371f71f2161656c515b9f6840aa9b09
|
|
| BLAKE2b-256 |
d577f2345321d16c2c7b7779eb3e21d124f445eedc8c83229f796ea64d40813b
|
Provenance
The following attestation bundles were made for aer_plugin-0.0.1.tar.gz:
Publisher:
build_test_publish.yml on quantum-plugins/aer-plugin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aer_plugin-0.0.1.tar.gz -
Subject digest:
876a975ff543c401334e8efaf20ada26dacfcc963959c4a5603559887172efc5 - Sigstore transparency entry: 171688383
- Sigstore integration time:
-
Permalink:
quantum-plugins/aer-plugin@b28319dde35790057337554ed974d7edfef5e5e9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/quantum-plugins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_test_publish.yml@b28319dde35790057337554ed974d7edfef5e5e9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file aer_plugin-0.0.1-py3-none-any.whl.
File metadata
- Download URL: aer_plugin-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f35237a97df06b15f3bf6d771b6f8a8838a24bc270182ed8d3a96b3930ed1ecb
|
|
| MD5 |
75448b2154107e41cfa5d32cc95f916f
|
|
| BLAKE2b-256 |
c01e6dad5b96f3eabe2ecdfe4185acd224c1e8ecfe35a0e533d9d34544c49dbb
|
Provenance
The following attestation bundles were made for aer_plugin-0.0.1-py3-none-any.whl:
Publisher:
build_test_publish.yml on quantum-plugins/aer-plugin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aer_plugin-0.0.1-py3-none-any.whl -
Subject digest:
f35237a97df06b15f3bf6d771b6f8a8838a24bc270182ed8d3a96b3930ed1ecb - Sigstore transparency entry: 171688385
- Sigstore integration time:
-
Permalink:
quantum-plugins/aer-plugin@b28319dde35790057337554ed974d7edfef5e5e9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/quantum-plugins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build_test_publish.yml@b28319dde35790057337554ed974d7edfef5e5e9 -
Trigger Event:
push
-
Statement type: