Skip to content

Commit

Permalink
feat: updates to Qibo v0.1.11, fixes breaking changes (#139)
Browse files Browse the repository at this point in the history
* updates to Qibo v0.1.10, fixes breaking changes

* updates dev-requirements and pre-commit hooks

* change qiboconnection requirement to 0.7.0

* updates to Qibo v0.1.11

* complies with PEP 604 syntax for optional parameters

* fixes tuple typo

* fixes tuple typo
  • Loading branch information
fedonman authored Feb 7, 2023
1 parent 34e8a4a commit efb2601
Show file tree
Hide file tree
Showing 27 changed files with 59 additions and 241 deletions.
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/ambv/black
rev: 22.8.0
rev: 23.1.0
hooks:
- id: black

Expand All @@ -11,7 +11,7 @@ repos:
args: [--max-line-length=120]

- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
Expand All @@ -20,17 +20,17 @@ repos:
rev: 1.5.0
hooks:
- id: interrogate
args: [-vv, -i, --fail-under=80]
args: [src, -vv, -i, --fail-under=80]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v0.981" # Use the sha / tag you want to point at
rev: "v0.991" # Use the sha / tag you want to point at
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
additional_dependencies: [types-PyYAML==6.0.5, types-requests==2.27.15]
additional_dependencies: [types-PyYAML==6.0.12, types-requests==2.28.11.8]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: check-ast
- id: check-builtin-literals
Expand All @@ -47,13 +47,13 @@ repos:
args: [-lll, --recursive, src]

- repo: https://github.com/commitizen-tools/commitizen
rev: v2.35.0
rev: v2.40.0
hooks:
- id: commitizen
stages: [commit-msg]

- repo: https://github.com/pycqa/pylint
rev: v2.15.3
rev: v2.16.0
hooks:
- id: pylint
name: pylint
Expand All @@ -72,7 +72,7 @@ repos:
- mdformat-black

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.5.2
rev: 1.6.1
hooks:
- id: nbqa-black
- id: nbqa-isort
Expand Down
12 changes: 6 additions & 6 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
autopep8==1.7.0
bandit==1.7.4
black==22.8.0
commitizen==2.35.0
black==23.1.0
commitizen==2.40.0
coverage==6.5.0
cryptography==38.0.3
flake8==5.0.4
Expand All @@ -14,7 +14,7 @@ mdformat-gfm==0.3.5
mdformat_footnote==0.1.1
mdformat_frontmatter==0.4.1
mdformat_tables==0.4.1
mypy==0.981
mypy==0.991
mypy-extensions==0.4.3
nbclient==0.6.8
nbconvert==7.0.0
Expand All @@ -23,15 +23,15 @@ nbqa==1.5.2
nbsphinx==0.8.9
pre-commit==2.20.0
pycodestyle==2.9.1
PyJWT==2.5.0
PyJWT==2.6.0
pylint==2.15.3
pytest==7.1.3
pytest-cov==4.0.0
pytest-forked==1.4.0
pytest-xdist==2.5.0
python-dateutil==2.8.2
recommonmark==0.7.1
requests==2.28.1
requests==2.28.2
Sphinx==5.2.3
sphinx-markdown-tables==0.0.17
sphinx-rtd-theme==1.0.0
Expand All @@ -43,7 +43,7 @@ sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
types-PyYAML==6.0.12
types-requests==2.28.11
types-requests==2.28.11.8
types-urllib3==1.26.25
typing_extensions==4.3.0
dummy-qblox@ git+https://github.com/qilimanjaro-tech/qililab-tools.git@0.2.1#subdirectory=services/dummy_qblox
63 changes: 0 additions & 63 deletions examples/cavity_spectroscopy.py

This file was deleted.

8 changes: 4 additions & 4 deletions examples/example_using_qililab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"import os\n",
"from pathlib import Path\n",
"\n",
"from qibo.core.circuit import Circuit\n",
"from qibo.gates import M, X\n",
"from qibo.models.circuit import Circuit\n",
"from qiboconnection.api import API\n",
"\n",
"from qililab import Experiment, ExperimentOptions, ExperimentSettings, build_platform\n",
Expand Down Expand Up @@ -361,7 +361,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.4 ('qililab')",
"display_name": "qililab",
"language": "python",
"name": "python3"
},
Expand All @@ -375,12 +375,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.10.8 (main, Nov 24 2022, 14:13:03) [GCC 11.2.0]"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "68ede8d50e294fa29dca3bb40e8760207660b5b612eb90d94521a9e31e3cbf6a"
"hash": "53235e66022d071ba4e97ea4af77e14ac3da4c0ffb32c596d9da41d30d7af9ae"
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions examples/example_using_soprano.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.4 ('qililab')",
"display_name": "qililab",
"language": "python",
"name": "python3"
},
Expand All @@ -250,12 +250,12 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.4"
"version": "3.10.8"
},
"orig_nbformat": 4,
"vscode": {
"interpreter": {
"hash": "68ede8d50e294fa29dca3bb40e8760207660b5b612eb90d94521a9e31e3cbf6a"
"hash": "121809f944b81f1847d4ffb8cf36b8f2cd17716ab162240359f9a9bc9250f6c8"
}
}
},
Expand Down
3 changes: 1 addition & 2 deletions examples/flux_spectroscopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import h5py
import matplotlib.pyplot as plt
import numpy as np
from qibo.core.circuit import Circuit
from qibo.gates import M
from qibo.models.circuit import Circuit
from qiboconnection.api import API

from qililab import build_platform
Expand Down Expand Up @@ -34,7 +34,6 @@ def run_and_plot(
attenuation_fixed: float,
current_fixed: float,
):

"""Load the platform 'flux_spectroscopy' from the DB."""
platform = build_platform(name="sauron")
platform.connect_and_set_initial_setup(automatic_turn_on_instruments=True, device_id=15)
Expand Down
2 changes: 1 addition & 1 deletion examples/flux_spectroscopy_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.10.8 (main, Nov 24 2022, 14:13:03) [GCC 11.2.0]"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
2 changes: 1 addition & 1 deletion examples/keithley_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
settings = {"id_": 0, "category": "dc_source", "ip": "192.168.1.112", "firmware": None}
keithley = Keithley2600(settings=settings)

keithley.connect()
keithley.initial_setup()
81 changes: 0 additions & 81 deletions examples/punchout.py

This file was deleted.

4 changes: 2 additions & 2 deletions examples/run_all_xy_simulator.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""Run circuit experiment"""
import matplotlib.pyplot as plt
import numpy as np
from qibo.core.circuit import Circuit
from qibo.gates import RX, RY, I
from qibo.models.circuit import Circuit

from qililab import Experiment, build_platform

Expand Down Expand Up @@ -41,7 +41,7 @@ def run_allxy():
circuit.add(gate_pair[1])
circuits.append(circuit)

experiment = Experiment(platform=platform, sequences=circuits)
experiment = Experiment(platform=platform, circuits=circuits)
results = experiment.execute()

x_ticks = np.linspace(-1, 1, 10)
Expand Down
2 changes: 1 addition & 1 deletion examples/run_circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import os
from pathlib import Path

from qibo.core.circuit import Circuit
from qibo.gates import M, X
from qibo.models.circuit import Circuit
from qiboconnection.api import API

from qililab import Experiment, ExperimentOptions, ExperimentSettings, build_platform
Expand Down
Loading

0 comments on commit efb2601

Please sign in to comment.