ibm-qdmi 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. ibm_qdmi-0.1.0/AGENTS.md +136 -0
  2. ibm_qdmi-0.1.0/CHANGELOG.md +36 -0
  3. ibm_qdmi-0.1.0/CMakeLists.txt +73 -0
  4. ibm_qdmi-0.1.0/LICENSE +217 -0
  5. ibm_qdmi-0.1.0/PKG-INFO +116 -0
  6. ibm_qdmi-0.1.0/README.md +78 -0
  7. ibm_qdmi-0.1.0/cmake/ExternalDependencies.cmake +113 -0
  8. ibm_qdmi-0.1.0/cmake/Sanitizers.cmake +104 -0
  9. ibm_qdmi-0.1.0/cmake/ibm-qdmi-device-config.cmake.in +22 -0
  10. ibm_qdmi-0.1.0/cmake/ibm-qdmi-device.qdmi.json.in +27 -0
  11. ibm_qdmi-0.1.0/examples/__init__.py +18 -0
  12. ibm_qdmi-0.1.0/examples/common.py +76 -0
  13. ibm_qdmi-0.1.0/examples/mqt_bench.py +220 -0
  14. ibm_qdmi-0.1.0/examples/native/CMakeLists.txt +36 -0
  15. ibm_qdmi-0.1.0/examples/native/execute.c +226 -0
  16. ibm_qdmi-0.1.0/examples/native_job.py +86 -0
  17. ibm_qdmi-0.1.0/examples/pennylane_qaoa.py +78 -0
  18. ibm_qdmi-0.1.0/examples/qiskit_workloads.py +107 -0
  19. ibm_qdmi-0.1.0/examples/qsci_h2.py +168 -0
  20. ibm_qdmi-0.1.0/include/ibm-qdmi-device/constants.h +56 -0
  21. ibm_qdmi-0.1.0/include/ibm-qdmi-device/diagnostics.h +54 -0
  22. ibm_qdmi-0.1.0/noxfile.py +226 -0
  23. ibm_qdmi-0.1.0/pyproject.toml +340 -0
  24. ibm_qdmi-0.1.0/python/ibm/qdmi/__init__.py +44 -0
  25. ibm_qdmi-0.1.0/python/ibm/qdmi/__main__.py +53 -0
  26. ibm_qdmi-0.1.0/python/ibm/qdmi/_backends.py +73 -0
  27. ibm_qdmi-0.1.0/python/ibm/qdmi/_catalogue.py +83 -0
  28. ibm_qdmi-0.1.0/python/ibm/qdmi/_paths.py +40 -0
  29. ibm_qdmi-0.1.0/python/ibm/qdmi/_version.pyi +18 -0
  30. ibm_qdmi-0.1.0/python/ibm/qdmi/estimator.py +62 -0
  31. ibm_qdmi-0.1.0/python/ibm/qdmi/executor.py +151 -0
  32. ibm_qdmi-0.1.0/python/ibm/qdmi/offloader.py +393 -0
  33. ibm_qdmi-0.1.0/python/ibm/qdmi/pennylane.py +222 -0
  34. ibm_qdmi-0.1.0/python/ibm/qdmi/py.typed +0 -0
  35. ibm_qdmi-0.1.0/python/ibm/qdmi/qiskit.py +201 -0
  36. ibm_qdmi-0.1.0/python/ibm/qdmi/sampler.py +58 -0
  37. ibm_qdmi-0.1.0/python/ibm/qdmi/serializers.py +51 -0
  38. ibm_qdmi-0.1.0/src/Auth.cpp +282 -0
  39. ibm_qdmi-0.1.0/src/Auth.hpp +84 -0
  40. ibm_qdmi-0.1.0/src/CMakeLists.txt +151 -0
  41. ibm_qdmi-0.1.0/src/Device.cpp +707 -0
  42. ibm_qdmi-0.1.0/src/Http.cpp +254 -0
  43. ibm_qdmi-0.1.0/src/Http.hpp +79 -0
  44. ibm_qdmi-0.1.0/src/Job.cpp +378 -0
  45. ibm_qdmi-0.1.0/src/Job.hpp +86 -0
  46. ibm_qdmi-0.1.0/src/Metadata.cpp +335 -0
  47. ibm_qdmi-0.1.0/src/Metadata.hpp +64 -0
  48. ibm_qdmi-0.1.0/src/Program.cpp +310 -0
  49. ibm_qdmi-0.1.0/uv.lock +3877 -0
@@ -0,0 +1,136 @@
1
+ # IBM QDMI Device Agent Guide
2
+
3
+ Follow this guide and the nearest scoped `AGENTS.md`. Use
4
+ [`docs/development.md`](docs/development.md) for build, test, and documentation
5
+ commands. Keep this file focused on repository-specific guardrails.
6
+
7
+ ## Repository Layout
8
+
9
+ - `src/` contains the native device, HTTP transport, IAM authentication, and
10
+ metadata parsing. `include/` contains public IBM constants. Generated QDMI
11
+ headers stay in the build tree.
12
+ - `python/ibm/qdmi/` contains the Python package, installed paths, and
13
+ information CLI. The catalogue template lives in `cmake/` and installs beside
14
+ the library. The optional Qiskit backend reuses MQT Core's backend, job, and
15
+ primitives.
16
+ - `test/unit/` contains hermetic GoogleTest cases. `test/integration/` checks
17
+ the shared library and loopback transport. `test/python/` tests Python
18
+ modules.
19
+ - `cmake/`, `CMakeLists.txt`, and `pyproject.toml` define builds. Keep generated
20
+ output in `build/` and `docs/_build/`, never in commits.
21
+ - The project uses Apache-2.0 WITH LLVM-exception. SPANK is out of scope.
22
+
23
+ ## Working Principles
24
+
25
+ - Inspect the worktree before editing and preserve unrelated user changes.
26
+ - Prefer the smallest change that fully solves the problem. Reuse existing code
27
+ and C++20 facilities before adding abstractions or settings.
28
+ - Follow documented policy. Neighboring code does not override instructions.
29
+ - Write comments, documentation, tests, diagnostics, and public text for the
30
+ final design. Remove review chronology and abandoned approaches.
31
+ - Use short sentences, active voice, and one established term per concept.
32
+ Preserve the capitalization of IBM, QDMI, OpenQASM, CMake, and Python.
33
+ - Add tests for changed behavior or concrete regressions. Keep tests in `test/`
34
+ and start with focused checks. Do not add artificial passing device tests.
35
+ - Keep cleanup separate from behavior changes unless correctness requires both.
36
+ Retain only narrow, justified suppressions.
37
+ - Keep documentation at its existing source of truth and link to it.
38
+ - Keep project documentation and configuration self-contained. Do not name or
39
+ link other device implementations. Preserve required copyright and license
40
+ notices in copied material.
41
+ - Group related changes in a concise changelog entry. Once a PR exists, include
42
+ its reference and every contributing author as `([#123]) ([**@username**])`
43
+ and define their links at the bottom of `CHANGELOG.md`. Do not invent PRs.
44
+ - Never hand-edit generated files. Change their source configuration instead.
45
+ Change externally managed templates in their owning repository.
46
+ - Preserve copyright and license notices on copied material.
47
+
48
+ ## C++ and QDMI Contracts
49
+
50
+ The project targets C++20. Use `///` for documentation comments and keep API
51
+ documentation at the declaration. Explain only details that names and signatures
52
+ do not convey. Use C++ casts, not C-style casts.
53
+
54
+ Preserve the QDMI C ABI and the `IBM_` symbol prefix. No C++ exception may cross
55
+ the C boundary. Honor size queries, handle validation, status codes, and null
56
+ checks. Jobs retain their session resources until freed. Never retry a job
57
+ submission automatically or treat local handle cleanup as remote cancellation.
58
+ Preserve physical qubit indices and classical-bit ordering through execution.
59
+ Keep framework imports and package information commands free of live access.
60
+
61
+ ## Build and Validation
62
+
63
+ Run offline tests by default. Collect coverage without IBM credentials or QPU
64
+ submissions; never spend hardware time to improve coverage. Separate native,
65
+ wheel, documentation, and installed-consumer build directories under `build/`.
66
+ Do not run package builds concurrently in the same build directory. For
67
+ dependency-only setup, use `uv sync --locked --only-group dev`.
68
+
69
+ - Run `uvx nox -s lint` after each completed batch of changes. Inspect formatter
70
+ changes, keep only relevant changes, and rerun the check.
71
+ - For C++ changes, reproduce `.github/workflows/cpp-linter.yml` against every
72
+ line of each changed file. Report existing diagnostics rather than hiding them
73
+ with broad suppressions.
74
+ - Run focused Python tests with `uvx nox -s tests-3.14 -- <test path>`. Use
75
+ `uvx nox -s tests minimums` for the supported Python matrix.
76
+ - Use Google-style Python docstrings. Preserve the `ibm.qdmi` namespace. Fix
77
+ Ruff and ty findings where possible.
78
+ - Build Sphinx and Doxygen through the dedicated Nox documentation session.
79
+
80
+ ### Live Access
81
+
82
+ Never print, store, or commit credentials, tokens, account identifiers, or
83
+ private backend details. Live IBM access requires explicit authorization for the
84
+ service, backend, and spending scope. The opt-in metadata checks submit no jobs.
85
+ The manual metadata workflow runs from merged `main` in the branch-restricted
86
+ `ibm-quantum` environment. Never dispatch from a PR or merge to enable a live
87
+ run without human approval. Keep credentials confined to the live test step,
88
+ after wheel installation. Follow `docs/development.md` for commands.
89
+
90
+ Keep live tests marked `live` and skipped before credential access unless
91
+ `--run-live` is explicit. Preserve sequential execution and fixed diagnostic
92
+ categories. Never retain raw responses, topology, or calibration snapshots in
93
+ logs or artifacts. Reproduce compatibility failures with synthetic fixtures
94
+ before fixing them. Quantum checks require the separate `quantum` marker and
95
+ `--run-quantum` opt-in. Run them only after the offline CI gates on merged
96
+ `main` or same-repository PRs labeled `live-qpu-tests`. Applying that label
97
+ requires human authorization and also opts subsequent PR updates into hardware
98
+ checks. Label additions reuse the exact merge commit's successful offline CI and
99
+ retained candidate. Unrelated label changes must not start jobs, cancel CI, or
100
+ publish a skipped `🚦 Check`. Fork PRs remain offline. The authorized CI budget
101
+ is one job each on Berlin and Aachen, 128 shots per job, and at most 60 seconds
102
+ of QPU execution per job. Do not make paid local submissions or automatically
103
+ retry hardware tests. Preserve the tested candidate wheel across offline and
104
+ hardware jobs. The `🚦 Check` aggregate covers every Actions prerequisite on
105
+ `main`. Pre-commit.ci and Read the Docs are required before merging; hardware
106
+ execution uses the Actions prerequisites on the tested commit. Hardware results
107
+ and job IDs must not be uploaded as artifacts.
108
+
109
+ ## Git and GitHub
110
+
111
+ - Keep commits focused. Start subjects with a gitmoji and an imperative verb;
112
+ target 50 characters and never exceed 72. Use the body for constraints and
113
+ non-obvious decisions.
114
+ - Sign commits and annotated tags with the configured key. Verify commits with
115
+ `git verify-commit HEAD` before pushing; never bypass a signing failure.
116
+ - Preserve human attribution. Use `Assisted-by` for AI assistance, never an AI
117
+ `Co-authored-by` trailer.
118
+ - Push, open or merge PRs, and post public text only within explicit human
119
+ authorization. Request new authority before expanding that scope.
120
+ - Start every agent-authored or agent-edited public text body with
121
+ `🤖 *AI text below* 🤖`; titles and commit messages are exempt. Commit
122
+ messages record AI assistance through the `Assisted-by` trailer only. For
123
+ other public text, state how AI assisted the work and leave acceptance and
124
+ responsibility with the human reviewer.
125
+ - Use the applicable PR template, labels, and requested assignee. Do not invent
126
+ checklist items or attest to human review on the user's behalf.
127
+ - Do not work on `good first issue` tasks or post repetitive reviews.
128
+ - A push does not authorize CI monitoring. Verify the remote head, report the
129
+ available status, and stop unless monitoring was requested.
130
+
131
+ ## Handoff
132
+
133
+ Inspect the final diff and worktree. Report what changed and each check run,
134
+ including failures or checks that could not run. Distinguish local validation,
135
+ live validation, and hosted CI for the final head. Never describe queued checks
136
+ or checks from an older commit as passing validation of the new head.
@@ -0,0 +1,36 @@
1
+ <!-- Entries in each category are sorted by merge time, with the latest PRs appearing first. -->
2
+
3
+ # Changelog
4
+
5
+ All notable changes to this project will be documented in this file.
6
+
7
+ The format is based on a mixture of [Keep a Changelog] and [Common Changelog].
8
+ This project adheres to [Semantic Versioning], with the exception that minor
9
+ releases may include breaking changes.
10
+
11
+ ## [Unreleased]
12
+
13
+ ## [0.1.0] - 2026-10-05
14
+
15
+ _This is the initial release of the IBM QDMI Device._
16
+
17
+ ### Added
18
+
19
+ - 🎉 Initial release. See the [documentation] for features and usage.
20
+ ([**@marcelwa**])
21
+
22
+ <!-- Version links -->
23
+
24
+ [unreleased]: https://github.com/munich-quantum-software/ibm-qdmi-device/compare/v0.1.0...HEAD
25
+ [0.1.0]: https://github.com/munich-quantum-software/ibm-qdmi-device/releases/tag/v0.1.0
26
+
27
+ <!-- Contributor -->
28
+
29
+ [**@marcelwa**]: https://github.com/marcelwa
30
+
31
+ <!-- General links -->
32
+
33
+ [Keep a Changelog]: https://keepachangelog.com/en/1.1.0/
34
+ [Common Changelog]: https://common-changelog.org/
35
+ [Semantic Versioning]: https://semver.org/spec/v2.0.0.html
36
+ [documentation]: https://ibm-qdmi-device.readthedocs.io/en/latest/
@@ -0,0 +1,73 @@
1
+ # Copyright (c) 2026 Munich Quantum Software Company GmbH
2
+ # All rights reserved.
3
+ #
4
+ # Licensed under the Apache License v2.0 with LLVM Exceptions (the "License");
5
+ # you may not use this file except in compliance with the License.
6
+ # You may obtain a copy of the License at
7
+ #
8
+ # https://llvm.org/LICENSE.txt
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13
+ # License for the specific language governing permissions and limitations under
14
+ # the License.
15
+ #
16
+ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
17
+
18
+ cmake_minimum_required(VERSION 3.24...4.4)
19
+ project(
20
+ ibm-qdmi-device
21
+ VERSION 0.1.0
22
+ LANGUAGES C CXX
23
+ DESCRIPTION "IBM QDMI Device")
24
+
25
+ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
26
+ set(CMAKE_BUILD_TYPE
27
+ Release
28
+ CACHE STRING "Choose the type of build." FORCE)
29
+ set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS Debug Release MinSizeRel RelWithDebInfo)
30
+ endif()
31
+
32
+ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
33
+ set(CMAKE_CXX_STANDARD 20)
34
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
35
+ set(CMAKE_CXX_EXTENSIONS OFF)
36
+ # There are no C++ modules; keep the compilation database usable before a build.
37
+ set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
38
+ set(CMAKE_VERIFY_INTERFACE_HEADER_SETS ON)
39
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
40
+ set(QDMI_PREFIX IBM)
41
+ set(QDMI_TARGET_NAME ibm-qdmi-device)
42
+
43
+ option(BUILD_IBM_QDMI_TESTS "Build offline native tests" ${PROJECT_IS_TOP_LEVEL})
44
+ option(USE_INSTALLED_IBM_QDMI_DEVICE "Build tests against an installed package" OFF)
45
+ option(IBM_QDMI_ENABLE_COVERAGE "Enable native coverage reporting" OFF)
46
+ option(BUILD_IBM_QDMI_DOCS "Configure the native API documentation" OFF)
47
+
48
+ if(BUILD_IBM_QDMI_DOCS AND USE_INSTALLED_IBM_QDMI_DEVICE)
49
+ message(FATAL_ERROR "Documentation requires a source build")
50
+ endif()
51
+
52
+ include(cmake/Sanitizers.cmake)
53
+ ibm_qdmi_apply_sanitizers()
54
+ include(cmake/ExternalDependencies.cmake)
55
+
56
+ if(USE_INSTALLED_IBM_QDMI_DEVICE)
57
+ find_package(ibm-qdmi-device ${PROJECT_VERSION} REQUIRED CONFIG)
58
+ else()
59
+ get_target_property(IBM_QDMI_QDMI_VERSION qdmi::qdmi VERSION)
60
+ if(NOT IBM_QDMI_QDMI_VERSION)
61
+ set(IBM_QDMI_QDMI_VERSION "${qdmi_VERSION}")
62
+ endif()
63
+ if(NOT IBM_QDMI_QDMI_VERSION)
64
+ message(FATAL_ERROR "Cannot determine the QDMI library version")
65
+ endif()
66
+ add_subdirectory(src)
67
+ endif()
68
+
69
+ if(BUILD_IBM_QDMI_TESTS)
70
+ enable_testing()
71
+ include(GoogleTest)
72
+ add_subdirectory(test)
73
+ endif()
ibm_qdmi-0.1.0/LICENSE ADDED
@@ -0,0 +1,217 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
202
+
203
+ ---- LLVM Exceptions to the Apache 2.0 License ----
204
+
205
+ As an exception, if, as a result of your compiling your source code, portions
206
+ of this Software are embedded into an Object form of such source code, you
207
+ may redistribute such embedded portions in such Object form without complying
208
+ with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
209
+
210
+ In addition, if you combine or link compiled forms of this Software with
211
+ software that is licensed under the GPLv2 ("Combined Software") and if a
212
+ court of competent jurisdiction determines that the patent provision (Section
213
+ 3), the indemnity provision (Section 9) or other Section of the License
214
+ conflicts with the conditions of the GPLv2, you may retroactively and
215
+ prospectively choose to deem waived or otherwise exclude such Section(s) of
216
+ the License, but only in their entirety and only with respect to the Combined
217
+ Software.
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: ibm-qdmi
3
+ Version: 0.1.0
4
+ Summary: IBM quantum execution through QDMI, Qiskit, and PennyLane
5
+ Author-Email: Marcel Walter <marcel@mq.sc>, Lukas Burgholzer <lukas@mq.sc>
6
+ License-Expression: Apache-2.0 WITH LLVM-exception
7
+ License-File: LICENSE
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Information Technology
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Natural Language :: English
12
+ Classifier: Operating System :: MacOS
13
+ Classifier: Operating System :: Microsoft :: Windows
14
+ Classifier: Operating System :: POSIX :: Linux
15
+ Classifier: Programming Language :: C++
16
+ Classifier: Programming Language :: Python
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Programming Language :: Python :: 3.14
23
+ Classifier: Topic :: Scientific/Engineering :: Quantum Computing
24
+ Classifier: Typing :: Typed
25
+ Project-URL: Documentation, https://ibm-qdmi-device.readthedocs.io/en/latest/
26
+ Project-URL: Homepage, https://github.com/munich-quantum-software/ibm-qdmi-device
27
+ Project-URL: Issues, https://github.com/munich-quantum-software/ibm-qdmi-device/issues
28
+ Requires-Python: >=3.11
29
+ Provides-Extra: executor
30
+ Requires-Dist: mqt-core[qiskit]~=4.0.0; extra == "executor"
31
+ Requires-Dist: qiskit-ibm-runtime~=0.50.0; extra == "executor"
32
+ Provides-Extra: pennylane
33
+ Requires-Dist: mqt-core[pennylane,qiskit]~=4.0.0; extra == "pennylane"
34
+ Provides-Extra: qiskit
35
+ Requires-Dist: mqt-core[qiskit]~=4.0.0; extra == "qiskit"
36
+ Requires-Dist: qiskit-algorithms>=0.4; extra == "qiskit"
37
+ Description-Content-Type: text/markdown
38
+
39
+ <!-- rumdl-disable MD033 MD041 -->
40
+ <p align="center">
41
+ <a href="https://mq.sc/">
42
+ <picture>
43
+ <source media="(prefers-color-scheme: dark)" srcset="docs/_static/logo-mqsc-dark.svg">
44
+ <img src="docs/_static/logo-mqsc-light.svg" alt="MQSC Logo" width="40%">
45
+ </picture>
46
+ </a>
47
+ </p>
48
+
49
+ # IBM QDMI Device
50
+
51
+ [![License](https://img.shields.io/badge/License-Apache--2.0_w%2F_LLVM--exception-blue?logo=apache&style=flat-square)](LICENSE)
52
+ [![C++20](https://img.shields.io/badge/C%2B%2B-20-blue?logo=cplusplus&style=flat-square)](https://isocpp.org/)
53
+ [![CMake](https://img.shields.io/badge/CMake-3.24%2B-blue?logo=cmake&style=flat-square)](https://cmake.org/)
54
+ [![CI](https://img.shields.io/github/actions/workflow/status/munich-quantum-software/ibm-qdmi-device/ci.yml?branch=main&style=flat-square&logo=github&label=CI)](https://github.com/munich-quantum-software/ibm-qdmi-device/actions/workflows/ci.yml)
55
+ [![codecov](https://img.shields.io/codecov/c/github/munich-quantum-software/ibm-qdmi-device?style=flat-square&logo=codecov)](https://codecov.io/gh/munich-quantum-software/ibm-qdmi-device)
56
+
57
+ **IBM QDMI Device** connects IBM Quantum Platform to the
58
+ [Quantum Device Management Interface (QDMI)](https://github.com/Munich-Quantum-Software-Stack/QDMI),
59
+ a vendor-neutral C API for quantum hardware. The C++20 library handles API-key
60
+ authentication, calibration queries, and the job lifecycle. It submits OpenQASM
61
+ 3 circuits and returns ordered shots and histograms. Optional Qiskit and
62
+ PennyLane integrations use the same native interface.
63
+
64
+ Live metadata validation has passed; quantum execution has not yet been
65
+ validated on hardware. Examples default to local simulation.
66
+
67
+ <p align="center">
68
+ <a href="https://ibm-qdmi-device.readthedocs.io/en/latest/">
69
+ <img width="30%" src="https://img.shields.io/badge/documentation-blue?style=for-the-badge&logo=read%20the%20docs" alt="Documentation">
70
+ </a>
71
+ </p>
72
+ <!-- rumdl-enable MD033 MD041 -->
73
+
74
+ ## Installation
75
+
76
+ Install from a source checkout with Python 3.11 or newer, a C++20 compiler,
77
+ CMake 3.24 or newer, and Git. Linux builds also require OpenSSL development
78
+ headers.
79
+
80
+ ```console
81
+ uv venv
82
+ uv pip install . # core library and Python entry points
83
+ uv pip install '.[qiskit]' # adds the Qiskit backend (IBMBackend)
84
+ ```
85
+
86
+ For C++ projects, follow the
87
+ [native installation guide](https://ibm-qdmi-device.readthedocs.io/en/latest/installation.html#native-package)
88
+ for CMake build and installation commands.
89
+
90
+ Use [.env.example](.env.example) as a reference for connection and optional
91
+ client settings. Supply credentials through the process environment or a secret
92
+ manager; the device does not load `.env` files.
93
+
94
+ ## Where to Start
95
+
96
+ | I want to… | Guide |
97
+ | :------------------------------------------- | :--------------------------------------------------------------------------------------- |
98
+ | Run circuits from **Python / Qiskit** | [Qiskit Integration](https://ibm-qdmi-device.readthedocs.io/en/latest/qiskit.html) |
99
+ | Execute **PennyLane** QNodes | [PennyLane Integration](https://ibm-qdmi-device.readthedocs.io/en/latest/pennylane.html) |
100
+ | Walk through end-to-end workloads | [Examples](https://ibm-qdmi-device.readthedocs.io/en/latest/examples.html) |
101
+ | Integrate the **C++ library** directly | [Usage Guide](https://ibm-qdmi-device.readthedocs.io/en/latest/api.html) |
102
+ | Understand the Python package's entry points | [Python Package](https://ibm-qdmi-device.readthedocs.io/en/latest/python_package.html) |
103
+ | Contribute to the project | [Contributing](https://ibm-qdmi-device.readthedocs.io/en/latest/contributing.html) |
104
+
105
+ ## Contributing
106
+
107
+ Contributions are welcome, including bug reports, documentation improvements,
108
+ and new features. See the
109
+ [Contributing Guide](https://ibm-qdmi-device.readthedocs.io/en/latest/contributing.html)
110
+ for the development workflow, coding standards, and pull request process.
111
+
112
+ ## License
113
+
114
+ The core C++ library and Python package are licensed under the
115
+ **Apache License 2.0 with LLVM exception**. See [LICENSE](LICENSE) for the
116
+ license text.
@@ -0,0 +1,78 @@
1
+ <!-- rumdl-disable MD033 MD041 -->
2
+ <p align="center">
3
+ <a href="https://mq.sc/">
4
+ <picture>
5
+ <source media="(prefers-color-scheme: dark)" srcset="docs/_static/logo-mqsc-dark.svg">
6
+ <img src="docs/_static/logo-mqsc-light.svg" alt="MQSC Logo" width="40%">
7
+ </picture>
8
+ </a>
9
+ </p>
10
+
11
+ # IBM QDMI Device
12
+
13
+ [![License](https://img.shields.io/badge/License-Apache--2.0_w%2F_LLVM--exception-blue?logo=apache&style=flat-square)](LICENSE)
14
+ [![C++20](https://img.shields.io/badge/C%2B%2B-20-blue?logo=cplusplus&style=flat-square)](https://isocpp.org/)
15
+ [![CMake](https://img.shields.io/badge/CMake-3.24%2B-blue?logo=cmake&style=flat-square)](https://cmake.org/)
16
+ [![CI](https://img.shields.io/github/actions/workflow/status/munich-quantum-software/ibm-qdmi-device/ci.yml?branch=main&style=flat-square&logo=github&label=CI)](https://github.com/munich-quantum-software/ibm-qdmi-device/actions/workflows/ci.yml)
17
+ [![codecov](https://img.shields.io/codecov/c/github/munich-quantum-software/ibm-qdmi-device?style=flat-square&logo=codecov)](https://codecov.io/gh/munich-quantum-software/ibm-qdmi-device)
18
+
19
+ **IBM QDMI Device** connects IBM Quantum Platform to the
20
+ [Quantum Device Management Interface (QDMI)](https://github.com/Munich-Quantum-Software-Stack/QDMI),
21
+ a vendor-neutral C API for quantum hardware. The C++20 library handles API-key
22
+ authentication, calibration queries, and the job lifecycle. It submits OpenQASM
23
+ 3 circuits and returns ordered shots and histograms. Optional Qiskit and
24
+ PennyLane integrations use the same native interface.
25
+
26
+ Live metadata validation has passed; quantum execution has not yet been
27
+ validated on hardware. Examples default to local simulation.
28
+
29
+ <p align="center">
30
+ <a href="https://ibm-qdmi-device.readthedocs.io/en/latest/">
31
+ <img width="30%" src="https://img.shields.io/badge/documentation-blue?style=for-the-badge&logo=read%20the%20docs" alt="Documentation">
32
+ </a>
33
+ </p>
34
+ <!-- rumdl-enable MD033 MD041 -->
35
+
36
+ ## Installation
37
+
38
+ Install from a source checkout with Python 3.11 or newer, a C++20 compiler,
39
+ CMake 3.24 or newer, and Git. Linux builds also require OpenSSL development
40
+ headers.
41
+
42
+ ```console
43
+ uv venv
44
+ uv pip install . # core library and Python entry points
45
+ uv pip install '.[qiskit]' # adds the Qiskit backend (IBMBackend)
46
+ ```
47
+
48
+ For C++ projects, follow the
49
+ [native installation guide](https://ibm-qdmi-device.readthedocs.io/en/latest/installation.html#native-package)
50
+ for CMake build and installation commands.
51
+
52
+ Use [.env.example](.env.example) as a reference for connection and optional
53
+ client settings. Supply credentials through the process environment or a secret
54
+ manager; the device does not load `.env` files.
55
+
56
+ ## Where to Start
57
+
58
+ | I want to… | Guide |
59
+ | :------------------------------------------- | :--------------------------------------------------------------------------------------- |
60
+ | Run circuits from **Python / Qiskit** | [Qiskit Integration](https://ibm-qdmi-device.readthedocs.io/en/latest/qiskit.html) |
61
+ | Execute **PennyLane** QNodes | [PennyLane Integration](https://ibm-qdmi-device.readthedocs.io/en/latest/pennylane.html) |
62
+ | Walk through end-to-end workloads | [Examples](https://ibm-qdmi-device.readthedocs.io/en/latest/examples.html) |
63
+ | Integrate the **C++ library** directly | [Usage Guide](https://ibm-qdmi-device.readthedocs.io/en/latest/api.html) |
64
+ | Understand the Python package's entry points | [Python Package](https://ibm-qdmi-device.readthedocs.io/en/latest/python_package.html) |
65
+ | Contribute to the project | [Contributing](https://ibm-qdmi-device.readthedocs.io/en/latest/contributing.html) |
66
+
67
+ ## Contributing
68
+
69
+ Contributions are welcome, including bug reports, documentation improvements,
70
+ and new features. See the
71
+ [Contributing Guide](https://ibm-qdmi-device.readthedocs.io/en/latest/contributing.html)
72
+ for the development workflow, coding standards, and pull request process.
73
+
74
+ ## License
75
+
76
+ The core C++ library and Python package are licensed under the
77
+ **Apache License 2.0 with LLVM exception**. See [LICENSE](LICENSE) for the
78
+ license text.