An extension to interface MyQLM with Pulser.
Project description
Pulser-MyQLM
Pulser-MyQLM is an extension of Pulser and myqlm qat.core for the integration of the Pulser framework and Pasqal devices within the Atos MyQLM framework.
Installation
To install the pulser-myqlm
package, simply clone this repository, go to its root folder and run
pip install -e .
or
python setup.py install
This will install pulser
and myqlm
. If you also wish to install the development requirements (optional), follow up with:
pip install -r dev_requirements.txt
or
python setup.py install easy_install "pulser-myqlm[dev]"
If, among the development requirements, you only wish to install the test requirements, do:
python setup.py install easy_install "pulser-myqlm[test_dev]"
Continuous Integration Requirements
We enforce some continuous integration standards. Make sure you follow them, otherwise your pull requests will be blocked until you fix them. To check if your changes pass all CI tests before you make the PR, you'll need additional packages, which you can install by running
pip install -r dev_requirements.txt
or
python setup.py install easy_install "pulser-myqlm[dev]"
-
Tests: We use
pytest
to run unit tests on our code. If your changes break existing tests, you'll have to update these tests accordingly. Additionally, we aim for 100% coverage over our code. Try to cover all the new lines of code with simple tests, which should be placed in thetests/
folder. To run all tests and check coverage, run:pytest --cov .
All lines that are not meant to be tested must be tagged with
# pragma: no cover
. Use it sparingly, every decision to leave a line uncovered must be well justified. -
Style: We use
flake8
and theflake8-docstrings
extension to enforce PEP8 style guidelines. To lint your code withflake8
, simply run:flake8 .
To help you keep your code compliant with PEP8 guidelines effortlessly, we suggest you look into installing a linter for your text editor of choice.
-
Format: We use the
black
auto-formatter to enforce a consistent style throughout the entire code base, including the Jupyter notebooks (so make sure to installblack[jupyter]
). It will also ensure your code is compliant with the formatting enforced byflake8
for you. To automatically format your code with black, just run:black .
Note that some IDE's and text editors support plug-ins which auto-format your code with
black
upon saving, so you don't have to worry about code format at all. -
Import sorting: We use
isort
to automatically sort all library imports. You can do the same by running:isort .
-
Type hints: We use
mypy
to type check the code. Your code should have type annotations and pass the type checks from running:mypy
In case
mypy
produces a false positive, you can ignore the respective line by adding the# type: ignore
annotation.Note: Type hints for
numpy
have only been added in version 1.20. Make sure you havenumpy >= 1.20
installed before running the type checks.
License
Copyright 2023 Pasqal Quantum Solutions / Pulser Development Team
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
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 Distributions
Built Distribution
Hashes for pulser_myqlm-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60cfc34ca98f918470f3d3d03473c2df54665104a5f1ebeed1e772040aacfb53 |
|
MD5 | 25edfbcd5c44ee613ac553c093ab5804 |
|
BLAKE2b-256 | 58b63838147efad99a1e6f75356287adc054dadb56053b8dd8309ceee026c253 |