-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Main changes: 21a47f3 Remove Register.rotate() (#642) 20e6765 FIX: Redefine slope of RampWaveform (#644) c2d5b6c Enabling definition of multiple noise channels and noise channels in XY (#647) bcb78cc Enable digital simulation (#652) 0f6e3dd Improve access to output modulation durations (#663) 188d21d Remove deprecated noise arguments (#674) f303138 Adding relaxation noise channel (#675) 716b86b Centralize all backend imports from a single pulser.backends module (#678) 96a8c34 Add hyperfine dephasing rate to NoiseModel (#680) 4981ca6 Add optional default noise models to devices (#676) c695373 Rectangular lattice register and layout (#665)
- Loading branch information
Showing
66 changed files
with
1,957 additions
and
1,065 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.10.1 | ||
rev: 24.4.0 | ||
hooks: | ||
- id: black-jupyter | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.17.4 | ||
0.18.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# tests | ||
black[jupyter] ~= 23.1 | ||
black[jupyter] ~= 24.3 | ||
flake8 | ||
flake8-docstrings | ||
isort | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Copyright 2024 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 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
"""A module gathering all available backends.""" | ||
from __future__ import annotations | ||
|
||
import importlib | ||
from typing import TYPE_CHECKING, Type | ||
|
||
from pulser.backend.abc import Backend | ||
|
||
if TYPE_CHECKING: | ||
from pulser.backend import QPUBackend as QPUBackend | ||
from pulser_pasqal import EmuFreeBackend as EmuFreeBackend | ||
from pulser_pasqal import EmuTNBackend as EmuTNBackend | ||
from pulser_simulation import QutipBackend as QutipBackend | ||
|
||
_BACKENDS = { | ||
"QPUBackend": "pulser.backend", | ||
"QutipBackend": "pulser_simulation", | ||
"EmuFreeBackend": "pulser_pasqal", | ||
"EmuTNBackend": "pulser_pasqal", | ||
} | ||
|
||
|
||
# This prevents * imports to attempt importing unavailable backends | ||
__all__: list[str] = [] | ||
|
||
|
||
def __getattr__(name: str) -> Type[Backend]: | ||
if name not in _BACKENDS: | ||
raise AttributeError(f"Module {__name__!r} has no attribute {name!r}.") | ||
try: | ||
return getattr( # type: ignore | ||
importlib.import_module(_BACKENDS[name]), | ||
name, | ||
) | ||
except ModuleNotFoundError: | ||
raise AttributeError( | ||
f"{name!r} requires the {_BACKENDS[name]!r} package. To install " | ||
f"it, run `pip install {_BACKENDS[name]}`." | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.