Skip to main content

AER Quantum Server Plugin

Build, Test and publish release version

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.

Installation

To install run in your terminal:

pip install aer-plugin

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}

Usage

As postulated by the qserver documentation, the 3 possible outcomes are counts, quasi dist and expval. To evaluate them with this plugin you must provide some metadata in a specific pattern:

type what you need
counts no metadata is mandatory here, but you can specify the amount of shots you want metadata={"shots":1024}, by default the 1000 are taken.
quasi-dist the same as counts
expval the obs(observables) metadata is mandatory to run the estimator. You must provide a list of lists. Each list inside the main list represents a distinct pub (circuit evaluation - example: [ [pub1], [pub2], ..., [pubn] ]). Inside these lists, you must provide tuples with an observable and its coefficient like: (obs, coeff). Here's an example of a correct expval experiment metadata: [ [('ZZI', 0.4), ('ZIZ', 0.3)], [('IZ', 1)] ].

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 :)

Metadata

Release files for aer-plugin 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aer-plugin 0.0.2
File Size Uploaded
aer_plugin-0.0.2.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aer-plugin 0.0.2
File Interpreter ABI Platform
aer_plugin-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 19.1 kB

Release files / aer_plugin-0.0.2.tar.gz

Download URL aer_plugin-0.0.2.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fc565b62cc4051979029c40bcf9c9b94c255c7d6f2bd8d15ed1fb8ac8883873c
BLAKE2b-256 checksum
How to use checksums
9ef274d5cae939540c3e0c8620a7977fb0fa55fef9d46ccc13ae72e17125517c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2025.

Transparency log

Release files / aer_plugin-0.0.2-py3-none-any.whl

Download URL aer_plugin-0.0.2-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2234f7f0554fb5b587889c01d7b66452fa1c00fbba4c69223f7b9fcb032939a3
BLAKE2b-256 checksum
How to use checksums
44d216d5e43557362ba35238b637069497fa281e32c2f03152e6cf7250f80c9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release 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