Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Added free IBM hardware (kyiv, brisbane, sherbrooke) to CLI #381

Open
wants to merge 78 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
51798a2
:truck: add calibration files for free access IBM devices.
Drewniok Sep 18, 2024
1e24499
:truck: add calibration files for free access IBM devices.
Drewniok Sep 18, 2024
bd833ef
:truck: support circuit generation for free access ibm hardware.
Drewniok Sep 18, 2024
238b51b
:art: small fix.
Drewniok Sep 18, 2024
1b09b1b
Merge branch 'main' into add_ibm_free_devices
Drewniok Sep 18, 2024
5108263
:art: renaming.
Drewniok Sep 18, 2024
fc56294
:art: renaming.
Drewniok Sep 18, 2024
0a9c027
:art: add file to convert ibm-csv to properties.
Drewniok Sep 18, 2024
8149136
:art: update parser.
Drewniok Sep 19, 2024
6ef47b9
:art: add line.
Drewniok Sep 19, 2024
398a563
:art: undo changes in ``backend.py``
Drewniok Sep 19, 2024
b3fc240
:white_check_mark: update tests.
Drewniok Sep 19, 2024
893d5a5
:green_heart: update CI to run on fork.
Drewniok Sep 19, 2024
c3638aa
:green_heart: update CI to run on fork.
Drewniok Sep 19, 2024
837992e
:white_check_mark: fix test.
Drewniok Sep 19, 2024
29d5f1d
:white_check_mark: fix test.
Drewniok Sep 19, 2024
ecb09c9
:white_check_mark: fix test.
Drewniok Sep 19, 2024
604bbc4
:white_check_mark: add tests.
Drewniok Sep 19, 2024
c6dfc74
:white_check_mark: fix tests.
Drewniok Sep 19, 2024
a0a5f83
:art: small fix.
Drewniok Sep 19, 2024
fda5425
:art: remove unused import of BackendV2
Drewniok Sep 19, 2024
90fbd8d
:art: revert CI changes.
Drewniok Sep 19, 2024
ef414ec
🎨 pre-commit fixes
pre-commit-ci[bot] Sep 19, 2024
b74578a
:art: addressing linting warnings and implementing best practices.
Drewniok Sep 19, 2024
057ee1a
Merge remote-tracking branch 'origin/add_ibm_free_devices' into add_i…
Drewniok Sep 19, 2024
881207a
🎨 pre-commit fixes
pre-commit-ci[bot] Sep 19, 2024
38b04e5
:art: small fix.
Drewniok Sep 19, 2024
094950f
🎨 pre-commit fixes
pre-commit-ci[bot] Sep 19, 2024
072be89
Merge branch 'main' into add_ibm_free_devices
Drewniok Sep 19, 2024
d2a2ce0
:white_check_mark: add more unit tests.
Drewniok Sep 19, 2024
40ed22b
🎨 pre-commit fixes
pre-commit-ci[bot] Sep 19, 2024
cbf8c54
:white_check_mark: small fix.
Drewniok Sep 19, 2024
566d470
🎨 pre-commit fixes
pre-commit-ci[bot] Sep 19, 2024
dec2c54
:art: integrate first batch of Lukas' comments.
Drewniok Sep 25, 2024
837ad7b
🎨 pre-commit fixes
pre-commit-ci[bot] Sep 25, 2024
897d481
Merge branch 'main' into add_ibm_free_devices
Drewniok Sep 26, 2024
c1ff512
:art: delete requirements.txt and add metadata.
Drewniok Sep 26, 2024
06fd507
:bug: Check the availability of the provider and device iff the appro…
Drewniok Oct 2, 2024
85881c4
:white_check_mark: add corresponding test.
Drewniok Oct 2, 2024
7aaf4b8
:art: small change.
Drewniok Oct 2, 2024
4a25cf2
:white_check_mark: add more tests.
Drewniok Oct 2, 2024
ef6248d
Merge branch 'small_cli_fix' into add_ibm_free_devices
Drewniok Oct 2, 2024
d6fb35a
:fire: delete calibration files of open-access devices.
Drewniok Oct 16, 2024
8331d2b
:fire: delete csv-to-json script.
Drewniok Oct 16, 2024
5189ff1
:art: small fix.
Drewniok Oct 16, 2024
25f854a
Merge branch 'main' into add_ibm_free_devices
Drewniok Oct 16, 2024
b17a9bc
🎨 pre-commit fixes
pre-commit-ci[bot] Oct 16, 2024
34a5959
:art: small fix.
Drewniok Oct 16, 2024
3ffcce6
Merge remote-tracking branch 'origin/add_ibm_free_devices' into add_i…
Drewniok Oct 16, 2024
bd0298b
:art: small fix.
Drewniok Oct 16, 2024
e968d02
🎨 pre-commit fixes
pre-commit-ci[bot] Oct 16, 2024
0a30e5b
:art: fix pre-commit.
Drewniok Oct 16, 2024
88c576a
Merge remote-tracking branch 'origin/add_ibm_free_devices' into add_i…
Drewniok Oct 16, 2024
672ff3e
:art: fix coupling map.
Drewniok Oct 16, 2024
de79664
:art: fix linter issue.
Drewniok Oct 16, 2024
962d270
Merge branch 'main' into add_ibm_free_devices
Drewniok Oct 17, 2024
2bf3f46
🎨 pre-commit fixes
pre-commit-ci[bot] Oct 17, 2024
5e2a513
:green_heart: add IBM token as a secret.
Drewniok Oct 17, 2024
b11dab5
:fire: delete test file.
Drewniok Oct 17, 2024
5c9a052
:fire: small fix.
Drewniok Oct 17, 2024
2226088
:art: revert CI changes.
Drewniok Oct 17, 2024
7d10129
:green_heart: use specific test step in CI.
Drewniok Oct 17, 2024
12d38aa
:white_check_mark: skip if IBM_TOKEN is not found.
Drewniok Oct 17, 2024
380c2e1
🎨 pre-commit fixes
pre-commit-ci[bot] Oct 17, 2024
44886de
:white_check_mark: skip if IBM_TOKEN is not found.
Drewniok Oct 17, 2024
8df9dc0
Merge remote-tracking branch 'origin/add_ibm_free_devices' into add_i…
Drewniok Oct 17, 2024
6240cde
🎨 pre-commit fixes
pre-commit-ci[bot] Oct 17, 2024
acada5c
:white_check_mark: skip if IBM_TOKEN is not found.
Drewniok Oct 17, 2024
9295f4e
Merge remote-tracking branch 'origin/add_ibm_free_devices' into add_i…
Drewniok Oct 17, 2024
60820c7
🎨 pre-commit fixes
pre-commit-ci[bot] Oct 17, 2024
43b737b
:white_check_mark: name token.
Drewniok Oct 17, 2024
150ac42
Merge branch 'main' into add_ibm_free_devices
burgholzer Oct 18, 2024
1b1ca83
:white_check_mark: small fix for specific tests.
Drewniok Oct 18, 2024
bb9e4bf
Merge remote-tracking branch 'origin/add_ibm_free_devices' into add_i…
Drewniok Oct 18, 2024
4dc4a08
:white_check_mark: small fix for specific tests.
Drewniok Oct 18, 2024
c7c6aba
:green_heart: small fix.
Drewniok Oct 18, 2024
e971ce5
:green_heart: small fix.
Drewniok Oct 18, 2024
fd4a5ad
Merge branch 'main' into add_ibm_free_devices
Drewniok Nov 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,59 @@ jobs:
if: fromJSON(needs.change-detection.outputs.run-python-tests)
uses: cda-tum/mqt-workflows/.github/workflows/[email protected]

run-specific-test:
name: 🐍 Run Specific Test with Secret
needs: python-tests
runs-on: ubuntu-latest
env:
FORCE_COLOR: 3
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IBM_TOKEN: ${{ secrets.IBM_TOKEN }}
steps:
# Check out the repository (including submodules and full history)
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

# Set up uv for faster Python package management
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true

# Set up nox for convenient testing
- uses: wntrblm/[email protected]

# Install dependencies (including qiskit-ibm-runtime)
- name: Install Qiskit Runtime
run: |
python -m pip install --upgrade pip
pip install qiskit-ibm-runtime

# Configure IBM Quantum account for Qiskit Runtime
- name: Configure IBM Quantum account for Qiskit Runtime
run: |
python -c "from qiskit_ibm_runtime import QiskitRuntimeService; \
QiskitRuntimeService.save_account(channel='ibm_quantum', \
token='$IBM_TOKEN')"

# Run the specific tests
- name: 🐍 Run specific tests
run: |
nox -s tests -- \
tests/devices/test_devices.py \
tests/test_bench.py::test_quantumcircuit_native_and_mapped_levels \
--cov --cov-report=xml:coverage-specific.xml --cov-append

# Upload coverage report for this specific test
- name: Upload 🐍 coverage report for specific test
uses: actions/upload-artifact@v4
with:
name: coverage-specific
path: coverage-specific.xml

code-ql:
name: 📝 CodeQL
needs: change-detection
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ dependencies = [
"qiskit_optimization>=0.6",
"qiskit_nature[pyscf]>=0.7",
"qiskit_finance>=0.4.1",
"qiskit_ibm_runtime>=0.11.0", # Added qiskit_ibm_runtime dependency
"pandas>=2.1.2",
"flask>=2.3.0",
"networkx>=2.8.8",
"joblib>=1.3.0",
"numpy>=1.26; python_version >= '3.12'",
Expand Down
13 changes: 11 additions & 2 deletions src/mqt/bench/devices/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from .device import Device
from .provider import Provider

from .ibm import IBMProvider
from .ibm import IBMProvider, IBMOpenAccessProvider
from .ionq import IonQProvider
from .iqm import IQMProvider
from .oqc import OQCProvider
Expand All @@ -25,7 +25,15 @@ class NotFoundError(Exception):

def get_available_providers() -> list[Provider]:
"""Get a list of all available providers."""
return [IBMProvider(), IonQProvider(), OQCProvider(), RigettiProvider(), QuantinuumProvider(), IQMProvider()]
return [
IBMProvider(),
IBMOpenAccessProvider(),
IonQProvider(),
OQCProvider(),
RigettiProvider(),
QuantinuumProvider(),
IQMProvider(),
]


def get_available_provider_names() -> list[str]:
Expand Down Expand Up @@ -92,6 +100,7 @@ def get_device_by_name(device_name: str) -> Device:
__all__ = [
"Device",
"DeviceCalibration",
"IBMOpenAccessProvider",
"IBMProvider",
"IQMProvider",
"IonQProvider",
Expand Down
Loading
Loading