Skip to content

Commit

Permalink
Release v0.8.0
Browse files Browse the repository at this point in the history
- Creates the pulser-pasqal extension package and the PasqalCloud class
- Introduces the Device vs VirtualDevice distinction
- Adds support for EOM mode operations
- Supports device serialization and deserialzation for the abstract representation
  • Loading branch information
HGSilveri authored Dec 26, 2022
2 parents 541a985 + ae47a93 commit e598d04
Show file tree
Hide file tree
Showing 84 changed files with 7,350 additions and 914 deletions.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ exclude_lines =
pragma: no cover
# Don't test pass statements
pass
# These lines can never be covered
if TYPE_CHECKING:

omit =
tests/*
Expand All @@ -18,3 +20,4 @@ show_missing = True
source =
pulser-core/pulser/
pulser-simulation/pulser_simulation/
pulser-pasqal/pulser_pasqal/
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ jobs:
if: github.event_name != 'push'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.9']
python-version: ["3.7", "3.11"]
steps:
- name: Check out Pulser
uses: actions/checkout@v3
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,24 @@ jobs:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload dist/*
- name: Confirm deployment
timeout-minutes: 5
shell: bash
run: |
until pip download pulser==$version
do
echo "Failed to download from PyPI, will wait for upload and retry."
sleep 30
done
check-release:
needs: deploy
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- name: Check out Pulser
uses: actions/checkout@v3
Expand All @@ -79,6 +89,7 @@ jobs:
- name: Test the installation
shell: bash
run: |
version="$(head -1 VERSION.txt)"
python -c "import pulser; assert pulser.__version__ == '$version'"
grep -e pytest dev_requirements.txt | sed 's/ //g' | xargs pip install
pytest
2 changes: 1 addition & 1 deletion .github/workflows/pulser-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ runs:
shell: bash
run: |
python -m pip install --upgrade pip
pip install -e ./pulser-core -e ./pulser-simulation
make dev-install
- name: Install extra packages from the dev requirements
if: "${{ inputs.extra-packages != '' }}"
shell: bash
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ jobs:
full-tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- name: Check out Pulser
uses: actions/checkout@v3
Expand All @@ -22,4 +23,4 @@ jobs:
python-version: ${{ matrix.python-version }}
extra-packages: pytest
- name: Run the unit tests & generate coverage report
run: pytest --cov --cov-fail-under=100
run: pytest --cov --cov-fail-under=100
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ build/
docs/build/
dist/
env*
pulser.egg-info/
pulser_simulation.egg-info/
pulser_core.egg-info/
*.egg-info/
6 changes: 5 additions & 1 deletion .mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[mypy]
files = pulser-core/pulser, pulser-simulation/pulser_simulation, tests
files =
pulser-core/pulser,
pulser-simulation/pulser_simulation,
pulser-pasqal/pulser_pasqal,
tests
python_version = 3.8
warn_return_any = True
warn_redundant_casts = True
Expand Down
1 change: 1 addition & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ python:
- requirements: dev_requirements.txt
- requirements: pulser-core/rtd_requirements.txt
- requirements: pulser-simulation/rtd_requirements.txt
- requirements: pulser-pasqal/rtd_requirements.txt
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.PHONY: dev-install
dev-install: dev-install-core dev-install-simulation dev-install-pasqal

.PHONY: dev-install-core
dev-install-core:
pip install -e ./pulser-core

.PHONY: dev-install-simulation
dev-install-simulation:
pip install -e ./pulser-simulation

.PHONY: dev-install-pasqal
dev-install-pasqal:
pip install -e ./pulser-pasqal
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ If you wish to **install the development version of Pulser from source** instead

```bash
git checkout develop
pip install -e ./pulser-core -e ./pulser-simulation
make dev-install
```

Bear in mind that this installation will track the contents of your local
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.7.3
0.8.0
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ sphinx-rtd-theme # documentation theme
sphinx_autodoc_typehints
nbsphinx
nbsphinx-link
ipython != 8.7.0 # Avoids bug with code highlighting

# Not on PyPI
# pandoc
9 changes: 9 additions & 0 deletions docs/source/apidoc/cloud.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
************************
Pasqal Cloud connection
************************

PasqalCloud
----------------------

.. autoclass:: pulser_pasqal.PasqalCloud
:members:
46 changes: 32 additions & 14 deletions docs/source/apidoc/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,36 +71,54 @@ Devices

Structure of a Device
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The :class:`Device` class sets the structure of every device instance.
The :class:`Device` class sets the structure of a physical device,
while :class:`VirtualDevice` is a more permissive device type which can
only be used in emulators, as it does not necessarily represent the
constraints of a physical device.

.. automodule:: pulser.devices._device_datacls
:members:
Illustrative instances of :class:`Device` (see `Physical Devices`_) and :class:`VirtualDevice`
(the `MockDevice`) come included in the `pulser.devices` module.

.. autoclass:: pulser.devices._device_datacls.Device
:members:

.. autoclass:: pulser.devices._device_datacls.VirtualDevice
:members:

.. _Physical Devices:

Physical Devices
^^^^^^^^^^^^^^^^^^^
Each device instance holds the characteristics of a physical device,
Each `Device`` instance holds the characteristics of a physical device,
which when associated with a :class:`pulser.Sequence` condition its development.

.. autodata:: pulser.devices.Chadoq2

.. autodata:: pulser.devices.IroiseMVP

The MockDevice
^^^^^^^^^^^^^^^^
A very permissive device that supports sequences which are currently unfeasible
on physical devices. Unlike with physical devices, its channels remain available
after declaration and can be declared again so as to have multiple channels
with the same characteristics.

.. autodata:: pulser.devices.MockDevice

Channels
^^^^^^^^^^^
.. automodule:: pulser.channels
---------------------

Base Channel
^^^^^^^^^^^^^^^
.. automodule:: pulser.channels.base_channel
:members:


Available Channels
^^^^^^^^^^^^^^^^^^^^^^^
.. automodule:: pulser.channels.channels
:members:
:show-inheritance:


EOM Mode Configuration
^^^^^^^^^^^^^^^^^^^^^^^^
.. automodule:: pulser.channels.eom
:members:
:show-inheritance:

Sampler
------------------
.. automodule:: pulser.sampler.sampler
Expand Down
1 change: 1 addition & 0 deletions docs/source/apidoc/pulser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ API Reference

core
simulation
cloud
2 changes: 2 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ computers and simulators, check the pages in :doc:`review`.
tutorials/phase_shifts_vz_gates
tutorials/composite_wfs
tutorials/paramseqs
tutorials/reg_layouts
tutorials/interpolated_wfs
tutorials/serialization
tutorials/slm_mask
tutorials/output_mod_eom

.. toctree::
:maxdepth: 1
Expand Down
2 changes: 1 addition & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ the ``develop`` branch - which holds the development (unstable) version of Pulse
and install from source by running: ::

git checkout develop
pip install -e ./pulser-core -e ./pulser-simulation
make dev-install

Bear in mind that your installation will track the contents of your local
Pulser repository folder, so if you checkout a different branch (e.g. ``master``),
Expand Down
3 changes: 3 additions & 0 deletions docs/source/tutorials/output_mod_eom.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../../../tutorials/advanced_features/Output Modulation and EOM Mode.ipynb"
}
3 changes: 3 additions & 0 deletions docs/source/tutorials/reg_layouts.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../../../tutorials/advanced_features/Register Layouts.ipynb"
}
3 changes: 2 additions & 1 deletion packages.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pulser-core
pulser-simulation
pulser-simulation
pulser-pasqal
3 changes: 2 additions & 1 deletion pulser-core/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.md
include LICENSE
include pulser/devices/interaction_coefficients/C6_coeffs.json
include pulser/json/abstract_repr/schema.json
include pulser/json/abstract_repr/schemas/device-schema.json
include pulser/json/abstract_repr/schemas/sequence-schema.json
Loading

0 comments on commit e598d04

Please sign in to comment.