Skip to content

Commit

Permalink
Release v0.6.0 (#372)
Browse files Browse the repository at this point in the history
Main changes:
- 3921795 Remove string variables (#365)
- b23ff22 Splitting `pulser` into `pulser-core` and `pulser-simulation`. 
(#362)
- 4f684f3 Address qubits with indices (#356)
- f2ee5e2 Make evaluation times uniform including final time (#330)
- c34dffb Changes for compatibility with upcoming export format (#353)
- 3ac1f66 Sequence sampler (#345)
  • Loading branch information
HGSilveri committed May 13, 2022
2 parents 9304b65 + de2248a commit 9d978ab
Show file tree
Hide file tree
Showing 101 changed files with 2,788 additions and 471 deletions.
10 changes: 9 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ exclude_lines =
# Don't test pass statements
pass

omit = pulser/tests/*
omit =
tests/*
setup.py


show_missing = True

[run]
source =
pulser-core/pulser/
pulser-simulation/pulser_simulation/
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ per-file-ignores =
# D100 Missing docstring in public module
# D103 Missing docstring in public function
# F401 Module imported but unused
pulser/tests/*: D100, D103
tests/*: D100, D103
__init__.py: F401
setup.py: D100
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -e ./pulser-core -e ./pulser-simulation
pip install -r requirements.txt
- name: Lint with flake8
run: flake8
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -e ./pulser-core -e ./pulser-simulation
pip install -r requirements.txt
- name: Check import sorting with isort
run: isort --check-only --diff .
Expand All @@ -71,7 +71,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -e ./pulser-core -e ./pulser-simulation
pip install -r requirements.txt
- name: Type check with mypy
run: mypy
Expand All @@ -91,7 +91,7 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -e ./pulser-core -e ./pulser-simulation
pip install -r requirements.txt
- name: Run the unit tests & generate coverage report
run: pytest --cov --cov-fail-under=100 pulser
run: pytest --cov --cov-fail-under=100
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ docs/build/
dist/
env*
pulser.egg-info/
pulser_simulation.egg-info/
pulser_core.egg-info/
4 changes: 2 additions & 2 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
files = pulser
files = pulser-core/pulser, pulser-simulation/pulser_simulation, tests
python_version = 3.8
warn_return_any = True
warn_redundant_casts = True
Expand All @@ -11,5 +11,5 @@ disallow_untyped_defs = True
follow_imports = silent
ignore_missing_imports = true

[mypy-pulser.tests.*]
[mypy-tests.*]
disallow_untyped_defs = False
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ python:
install:
- requirements: docs/requirements.txt
- requirements: requirements.txt
- method: setuptools
path: .
- requirements: pulser-core/rtd_requirements.txt
- requirements: pulser-simulation/rtd_requirements.txt
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include README.md
include requirements.txt
include LICENSE
include pulser/devices/interaction_coefficients/C6_coeffs.json
include VERSION.txt
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,35 @@ and also allows the creation of **analog** quantum simulations, outside of the
scope of traditional quantum circuit approaches. Whatever the type of experiment
or paradigm, if it can be done on the device, it can be done with Pulser.

Additionally, Pulser features built-in tools for classical simulation (using [QuTiP][qutip] libraries) to aid in the development and testing of new pulse sequences.
Additionally, the ``pulser_simulation`` extension provides tools for classical simulation (using [QuTiP][qutip] libraries) to aid in the development and testing of new pulse sequences.

For a comprehensive overview of Pulser, check out [Pulser's arXiv preprint](https://arxiv.org/abs/2104.15044).
For a comprehensive overview of Pulser, check out [Pulser's white paper](https://quantum-journal.org/papers/q-2022-01-24-629/).

## Installation

**Note**: *Pulser v0.6 introduced a split of the ``pulser`` package that prevents it from being correctly upgraded. If you have an older version of ``pulser`` installed and wish to upgrade, make sure to uninstall it first by running ``pip uninstall pulser``.*

To install the latest release of ``pulser``, have Python 3.7.0 or higher installed, then use ``pip``:

```bash
pip install pulser
```

The standard ``pulser`` distribution will install the core ``pulser`` package
and the ``pulser_simulation`` extension package, which is required if you want
to access the emulation features.

If you wish to install only the core ``pulser`` features, you can instead run:

```bash
pip install pulser-core
```

If you wish to **install the development version of Pulser from source** instead, do the following from within this repository after cloning it:

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

Bear in mind that this installation will track the contents of your local
Expand All @@ -49,7 +61,7 @@ pip install -r requirements.txt
Then, you can do the following to run the test suite and report test coverage:

```bash
pytest --cov pulser
pytest --cov
```

## Contributing
Expand Down
1 change: 1 addition & 0 deletions VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.6.0
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# For generating documentation.
Sphinx
sphinx_rtd_theme
sphinx-rtd-theme # documentation theme
nbsphinx
nbsphinx-link

Expand Down
4 changes: 4 additions & 0 deletions docs/source/_static/css/max_width.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.wy-nav-content {
width: 80% !important;
max-width: 1600px !important;
}
41 changes: 40 additions & 1 deletion docs/source/apidoc/creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,47 @@ Sequence
Register
----------------------

.. automodule:: pulser.register
Register classes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The register classes allow for the creation of arbitrary registers.

.. autoclass:: pulser.register.base_register.BaseRegister
:members:

.. autoclass:: pulser.register.register.Register
:members:
:show-inheritance:

.. autoclass:: pulser.register.register3d.Register3D
:members:
:show-inheritance:


Register layout
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A ``RegisterLayout`` is used to define a register from a set of traps. It is
intended to be given to the user by the hardware provided as a way of showing
which layouts are already available on a given device. In turn, the user
can create a ``Register`` by selecting the traps on which to place atoms, or
even a ``MappableRegister``, which allows for the creation of sequences whose
register can be defined at build time.

.. autoclass:: pulser.register.register_layout.RegisterLayout
:members:

.. autoclass:: pulser.register.mappable_reg.MappableRegister
:members:



Special cases
""""""""""""""""""

.. automodule:: pulser.register.special_layouts
:members:
:show-inheritance:


Pulse
-------------------

Expand Down Expand Up @@ -46,6 +83,8 @@ 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
Expand Down
11 changes: 7 additions & 4 deletions docs/source/apidoc/emulation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
Classical Simulation
*********************

Since version 0.6.0, all simulation classes (previously under the ``pulser.simulation`` module)
are in the ``pulser-simulation`` extension and should be imported from ``pulser_simulation``.

Simulation
----------------------

.. automodule:: pulser.simulation.simulation
.. automodule:: pulser_simulation.simulation
:members:

SimConfig
----------------------

.. automodule:: pulser.simulation.simconfig
.. automodule:: pulser_simulation.simconfig
:members:

Simulation Results
Expand All @@ -29,14 +32,14 @@ within them.
CoherentResults
^^^^^^^^^^^^^^^^

.. autoclass:: pulser.simulation.simresults.CoherentResults
.. autoclass:: pulser_simulation.simresults.CoherentResults
:members:
:inherited-members:


NoisyResults
^^^^^^^^^^^^^^^^

.. autoclass:: pulser.simulation.simresults.NoisyResults
.. autoclass:: pulser_simulation.simresults.NoisyResults
:members:
:inherited-members:
12 changes: 8 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
import os
import sys

sys.path.insert(0, os.path.abspath("../../pulser"))
sys.path.insert(0, os.path.abspath("../../"))

__version__ = ""
exec(open("../../pulser/_version.py").read())
with open("../../VERSION.txt", "r") as f:
__version__ = f.read().strip()

# -- Project information -----------------------------------------------------

project = "Pulser"
copyright = "2020, Pulser Development Team"
copyright = "2022, Pulser Development Team"
author = "Pulser Development Team"

# The full version, including alpha/beta/rc tags
Expand Down Expand Up @@ -69,3 +69,7 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]

html_css_files = [
"css/max_width.css",
]
2 changes: 2 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ and simulation.

**Online documentation**: `<https://pulser.readthedocs.io>`_

**White paper**: `Quantum 6, 629 (2022) <https://quantum-journal.org/papers/q-2022-01-24-629/>`_

**Source code repository** (go `here <https://pulser.readthedocs.io/en/latest/>`_
for the latest docs): `<https://github.com/pasqal-io/Pulser>`_

Expand Down
15 changes: 14 additions & 1 deletion docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
Installation
==============

**Note**: Pulser v0.6 introduced a split of the ``pulser`` package that prevents
it from being correctly upgraded. If you have an older version of ``pulser`` installed
and wish to upgrade, make sure to uninstall it first by running ``pip uninstall pulser``
before proceeding to any of the steps below.

Stable version
-----------------
To install the latest release of ``pulser``, have Python 3.7.0 or higher
installed, then use ``pip``: ::

pip install pulser

The standard ``pulser`` distribution will install the core ``pulser`` package
and the ``pulser_simulation`` extension package, which is required if you want
to access the :doc:`apidoc/emulation` features.

If you wish to install only the core ``pulser`` features, you can instead run: ::

pip install pulser-core


Latest version
---------------
Expand All @@ -18,7 +31,7 @@ the ``develop`` branch - which holds the latest (unstable) version of Pulser -
and install from source by running: ::

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

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
2 changes: 1 addition & 1 deletion docs/source/intro_rydberg_blockade.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@
],
"source": [
"import matplotlib.pyplot as plt\n",
"from pulser.simulation import Simulation\n",
"from pulser_simulation import Simulation\n",
"\n",
"data = []\n",
"distances = np.linspace(6.5, 14, 7)\n",
Expand Down
Loading

0 comments on commit 9d978ab

Please sign in to comment.