haiqu-sdk 1.0.5__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 (43) hide show
  1. haiqu_sdk-1.0.5/LICENSE +200 -0
  2. haiqu_sdk-1.0.5/PKG-INFO +182 -0
  3. haiqu_sdk-1.0.5/README.md +126 -0
  4. haiqu_sdk-1.0.5/haiqu/sdk/__init__.py +22 -0
  5. haiqu_sdk-1.0.5/haiqu/sdk/api_client.py +766 -0
  6. haiqu_sdk-1.0.5/haiqu/sdk/backpropagation.py +60 -0
  7. haiqu_sdk-1.0.5/haiqu/sdk/constants.py +11 -0
  8. haiqu_sdk-1.0.5/haiqu/sdk/errors.py +104 -0
  9. haiqu_sdk-1.0.5/haiqu/sdk/exceptions.py +75 -0
  10. haiqu_sdk-1.0.5/haiqu/sdk/gates.py +135 -0
  11. haiqu_sdk-1.0.5/haiqu/sdk/haiqu.mplstyle +100 -0
  12. haiqu_sdk-1.0.5/haiqu/sdk/library/__init__.py +4 -0
  13. haiqu_sdk-1.0.5/haiqu/sdk/library/ae.py +140 -0
  14. haiqu_sdk-1.0.5/haiqu/sdk/library/cfd.py +174 -0
  15. haiqu_sdk-1.0.5/haiqu/sdk/library/custom_metrics.py +73 -0
  16. haiqu_sdk-1.0.5/haiqu/sdk/library/inv_qft.py +35 -0
  17. haiqu_sdk-1.0.5/haiqu/sdk/mpl_style.py +110 -0
  18. haiqu_sdk-1.0.5/haiqu/sdk/optimization/__init__.py +17 -0
  19. haiqu_sdk-1.0.5/haiqu/sdk/optimization/postprocess.py +102 -0
  20. haiqu_sdk-1.0.5/haiqu/sdk/optimization/qubo.py +405 -0
  21. haiqu_sdk-1.0.5/haiqu/sdk/optimization/result.py +54 -0
  22. haiqu_sdk-1.0.5/haiqu/sdk/qml/__init__.py +14 -0
  23. haiqu_sdk-1.0.5/haiqu/sdk/qml/optimizer.py +75 -0
  24. haiqu_sdk-1.0.5/haiqu/sdk/qml/problem.py +75 -0
  25. haiqu_sdk-1.0.5/haiqu/sdk/quantum_haiqu.py +3715 -0
  26. haiqu_sdk-1.0.5/haiqu/sdk/schemas.py +2153 -0
  27. haiqu_sdk-1.0.5/haiqu/sdk/skqd/__init__.py +27 -0
  28. haiqu_sdk-1.0.5/haiqu/sdk/skqd/circuits_hubbard.py +153 -0
  29. haiqu_sdk-1.0.5/haiqu/sdk/skqd/circuits_siam.py +174 -0
  30. haiqu_sdk-1.0.5/haiqu/sdk/skqd/config.py +34 -0
  31. haiqu_sdk-1.0.5/haiqu/sdk/skqd/hamiltonian.py +176 -0
  32. haiqu_sdk-1.0.5/haiqu/sdk/utils.py +594 -0
  33. haiqu_sdk-1.0.5/haiqu/sdk/version.py +5 -0
  34. haiqu_sdk-1.0.5/haiqu/sdk/wiz/__init__.py +9 -0
  35. haiqu_sdk-1.0.5/haiqu/sdk/wiz/drawer.py +563 -0
  36. haiqu_sdk-1.0.5/haiqu/sdk/wiz/jupyter.py +1359 -0
  37. haiqu_sdk-1.0.5/haiqu_sdk.egg-info/PKG-INFO +182 -0
  38. haiqu_sdk-1.0.5/haiqu_sdk.egg-info/SOURCES.txt +41 -0
  39. haiqu_sdk-1.0.5/haiqu_sdk.egg-info/dependency_links.txt +1 -0
  40. haiqu_sdk-1.0.5/haiqu_sdk.egg-info/requires.txt +32 -0
  41. haiqu_sdk-1.0.5/haiqu_sdk.egg-info/top_level.txt +1 -0
  42. haiqu_sdk-1.0.5/pyproject.toml +127 -0
  43. haiqu_sdk-1.0.5/setup.cfg +4 -0
@@ -0,0 +1,200 @@
1
+ Version 2.0, January 2004
2
+ http://www.apache.org/licenses/
3
+
4
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
5
+
6
+ 1. Definitions.
7
+
8
+ "License" shall mean the terms and conditions for use, reproduction,
9
+ and distribution as defined by Sections 1 through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by
12
+ the copyright owner that is granting the License.
13
+
14
+ "Legal Entity" shall mean the union of the acting entity and all
15
+ other entities that control, are controlled by, or are under common
16
+ control with that entity. For the purposes of this definition,
17
+ "control" means (i) the power, direct or indirect, to cause the
18
+ direction or management of such entity, whether by contract or
19
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity
23
+ exercising permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications,
26
+ including but not limited to software source code, documentation
27
+ source, and configuration files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical
30
+ transformation or translation of a Source form, including but
31
+ not limited to compiled object code, generated documentation,
32
+ and conversions to other media types.
33
+
34
+ "Work" shall mean the work of authorship, whether in Source or
35
+ Object form, made available under the License, as indicated by a
36
+ copyright notice that is included in or attached to the work
37
+ (an example is provided in the Appendix below).
38
+
39
+ "Derivative Works" shall mean any work, whether in Source or Object
40
+ form, that is based on (or derived from) the Work and for which the
41
+ editorial revisions, annotations, elaborations, or other modifications
42
+ represent, as a whole, an original work of authorship. For the purposes
43
+ of this License, Derivative Works shall not include works that remain
44
+ separable from, or merely link (or bind by name) to the interfaces of,
45
+ the Work and Derivative Works thereof.
46
+
47
+ "Contribution" shall mean any work of authorship, including
48
+ the original version of the Work and any modifications or additions
49
+ to that Work or Derivative Works thereof, that is intentionally
50
+ submitted to Licensor for inclusion in the Work by the copyright owner
51
+ or by an individual or Legal Entity authorized to submit on behalf of
52
+ the copyright owner. For the purposes of this definition, "submitted"
53
+ means any form of electronic, verbal, or written communication sent
54
+ to the Licensor or its representatives, including but not limited to
55
+ communication on electronic mailing lists, source code control systems,
56
+ and issue tracking systems that are managed by, or on behalf of, the
57
+ Licensor for the purpose of discussing and improving the Work, but
58
+ excluding communication that is conspicuously marked or otherwise
59
+ designated in writing by the copyright owner as "Not a Contribution."
60
+
61
+ "Contributor" shall mean Licensor and any individual or Legal Entity
62
+ on behalf of whom a Contribution has been received by Licensor and
63
+ subsequently incorporated within the Work.
64
+
65
+ 2. Grant of Copyright License. Subject to the terms and conditions of
66
+ this License, each Contributor hereby grants to You a perpetual,
67
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
68
+ copyright license to reproduce, prepare Derivative Works of,
69
+ publicly display, publicly perform, sublicense, and distribute the
70
+ Work and such Derivative Works in Source or Object form.
71
+
72
+ 3. Grant of Patent License. Subject to the terms and conditions of
73
+ this License, each Contributor hereby grants to You a perpetual,
74
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
+ (except as stated in this section) patent license to make, have made,
76
+ use, offer to sell, sell, import, and otherwise transfer the Work,
77
+ where such license applies only to those patent claims licensable
78
+ by such Contributor that are necessarily infringed by their
79
+ Contribution(s) alone or by combination of their Contribution(s)
80
+ with the Work to which such Contribution(s) was submitted. If You
81
+ institute patent litigation against any entity (including a
82
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
83
+ or a Contribution incorporated within the Work constitutes direct
84
+ or contributory patent infringement, then any patent licenses
85
+ granted to You under this License for that Work shall terminate
86
+ as of the date such litigation is filed.
87
+
88
+ 4. Redistribution. You may reproduce and distribute copies of the
89
+ Work or Derivative Works thereof in any medium, with or without
90
+ modifications, and in Source or Object form, provided that You
91
+ meet the following conditions:
92
+
93
+ (a) You must give any other recipients of the Work or
94
+ Derivative Works a copy of this License; and
95
+
96
+ (b) You must cause any modified files to carry prominent notices
97
+ stating that You changed the files; and
98
+
99
+ (c) You must retain, in the Source form of any Derivative Works
100
+ that You distribute, all copyright, patent, trademark, and
101
+ attribution notices from the Source form of the Work,
102
+ excluding those notices that do not pertain to any part of
103
+ the Derivative Works; and
104
+
105
+ (d) If the Work includes a "NOTICE" text file as part of its
106
+ distribution, then any Derivative Works that You distribute must
107
+ include a readable copy of the attribution notices contained
108
+ within such NOTICE file, excluding those notices that do not
109
+ pertain to any part of the Derivative Works, in at least one
110
+ of the following places: within a NOTICE text file distributed
111
+ as part of the Derivative Works; within the Source form or
112
+ documentation, if provided along with the Derivative Works; or,
113
+ within a display generated by the Derivative Works, if and
114
+ wherever such third-party notices normally appear. The contents
115
+ of the NOTICE file are for informational purposes only and
116
+ do not modify the License. You may add Your own attribution
117
+ notices within Derivative Works that You distribute, alongside
118
+ or as an addendum to the NOTICE text from the Work, provided
119
+ that such additional attribution notices cannot be construed
120
+ as modifying the License.
121
+
122
+ You may add Your own copyright statement to Your modifications and
123
+ may provide additional or different license terms and conditions
124
+ for use, reproduction, or distribution of Your modifications, or
125
+ for any such Derivative Works as a whole, provided Your use,
126
+ reproduction, and distribution of the Work otherwise complies with
127
+ the conditions stated in this License.
128
+
129
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
130
+ any Contribution intentionally submitted for inclusion in the Work
131
+ by You to the Licensor shall be under the terms and conditions of
132
+ this License, without any additional terms or conditions.
133
+ Notwithstanding the above, nothing herein shall supersede or modify
134
+ the terms of any separate license agreement you may have executed
135
+ with Licensor regarding such Contributions.
136
+
137
+ 6. Trademarks. This License does not grant permission to use the trade
138
+ names, trademarks, service marks, or product names of the Licensor,
139
+ except as required for reasonable and customary use in describing the
140
+ origin of the Work and reproducing the content of the NOTICE file.
141
+
142
+ 7. Disclaimer of Warranty. Unless required by applicable law or
143
+ agreed to in writing, Licensor provides the Work (and each
144
+ Contributor provides its Contributions) on an "AS IS" BASIS,
145
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
146
+ implied, including, without limitation, any warranties or conditions
147
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
148
+ PARTICULAR PURPOSE. You are solely responsible for determining the
149
+ appropriateness of using or redistributing the Work and assume any
150
+ risks associated with Your exercise of permissions under this License.
151
+
152
+ 8. Limitation of Liability. In no event and under no legal theory,
153
+ whether in tort (including negligence), contract, or otherwise,
154
+ unless required by applicable law (such as deliberate and grossly
155
+ negligent acts) or agreed to in writing, shall any Contributor be
156
+ liable to You for damages, including any direct, indirect, special,
157
+ incidental, or consequential damages of any character arising as a
158
+ result of this License or out of the use or inability to use the
159
+ Work (including but not limited to damages for loss of goodwill,
160
+ work stoppage, computer failure or malfunction, or any and all
161
+ other commercial damages or losses), even if such Contributor
162
+ has been advised of the possibility of such damages.
163
+
164
+ 9. Accepting Warranty or Additional Liability. While redistributing
165
+ the Work or Derivative Works thereof, You may choose to offer,
166
+ and charge a fee for, acceptance of support, warranty, indemnity,
167
+ or other liability obligations and/or rights consistent with this
168
+ License. However, in accepting such obligations, You may act only
169
+ on Your own behalf and on Your sole responsibility, not on behalf
170
+ of any other Contributor, and only if You agree to indemnify,
171
+ defend, and hold each Contributor harmless for any liability
172
+ incurred by, or claims asserted against, such Contributor by reason
173
+ of your accepting any such warranty or additional liability.
174
+
175
+ END OF TERMS AND CONDITIONS
176
+
177
+ APPENDIX: How to apply the Apache License to your work.
178
+
179
+ To apply the Apache License to your work, attach the following
180
+ boilerplate notice, with the fields enclosed by brackets "[]"
181
+ replaced with your own identifying information. (Don't include
182
+ the brackets!) The text should be enclosed in the appropriate
183
+ comment syntax for the file format. We also recommend that a
184
+ file or class name and description of purpose be included on the
185
+ same "printed page" as the copyright notice for easier
186
+ identification within third-party archives.
187
+
188
+ Copyright 2023-2026 Haiqu, Inc.
189
+
190
+ Licensed under the Apache License, Version 2.0 (the "License");
191
+ you may not use this file except in compliance with the License.
192
+ You may obtain a copy of the License at
193
+
194
+ http://www.apache.org/licenses/LICENSE-2.0
195
+
196
+ Unless required by applicable law or agreed to in writing, software
197
+ distributed under the License is distributed on an "AS IS" BASIS,
198
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
199
+ See the License for the specific language governing permissions and
200
+ limitations under the License.
@@ -0,0 +1,182 @@
1
+ Metadata-Version: 2.4
2
+ Name: haiqu-sdk
3
+ Version: 1.0.5
4
+ Summary: Python SDK for Haiqu quantum cloud — circuit analytics, error mitigation, and hybrid quantum application execution
5
+ Author-email: "Haiqu, Inc." <info@haiqu.ai>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://haiqu.ai
8
+ Project-URL: Documentation, https://docs.haiqu.ai
9
+ Project-URL: Source, https://github.com/haiqu-ai/haiqu-sdk
10
+ Project-URL: Bug Tracker, https://github.com/haiqu-ai/haiqu-sdk/-/issues
11
+ Keywords: quantum computing,error mitigation,zero-noise extrapolation,hybrid quantum-classical,quantum applications,quantum machine learning,QML,data loading,qiskit,circuit analytics,quantum cloud
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering
22
+ Classifier: Topic :: Scientific/Engineering :: Physics
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.10
25
+ Description-Content-Type: text/markdown; charset=UTF-8
26
+ License-File: LICENSE
27
+ Requires-Dist: pydantic<3.0,>=2.6.0
28
+ Requires-Dist: requests<3,>=2.33.0
29
+ Requires-Dist: qiskit==2.2.*
30
+ Requires-Dist: qiskit_ibm_runtime==0.45.*
31
+ Requires-Dist: qiskit-aer==0.17.*
32
+ Requires-Dist: qiskit_algorithms==0.4.0
33
+ Requires-Dist: qiskit-addon-obp==0.3.0
34
+ Requires-Dist: qiskit-addon-utils==0.3.0
35
+ Requires-Dist: qiskit-qasm3-import==0.6.0
36
+ Requires-Dist: qiskit-optimization[cplex]==0.7.0
37
+ Requires-Dist: cplex
38
+ Requires-Dist: hashable-list==0.2.*
39
+ Requires-Dist: ordered-set==4.1.*
40
+ Requires-Dist: tabulate==0.9.0
41
+ Requires-Dist: plotly==6.0.0
42
+ Requires-Dist: kaleido==0.2.1
43
+ Requires-Dist: pandas==2.3.1
44
+ Requires-Dist: ipywidgets==8.1.8
45
+ Provides-Extra: visualization
46
+ Requires-Dist: matplotlib==3.9.0; extra == "visualization"
47
+ Requires-Dist: pylatexenc==2.10; extra == "visualization"
48
+ Provides-Extra: skqd
49
+ Requires-Dist: ffsim; extra == "skqd"
50
+ Provides-Extra: dev
51
+ Requires-Dist: black==23.7.0; extra == "dev"
52
+ Requires-Dist: isort; extra == "dev"
53
+ Requires-Dist: flake8==6.0.0; extra == "dev"
54
+ Provides-Extra: build
55
+ Dynamic: license-file
56
+
57
+ # Haiqu SDK: Quantum Performance Middleware for Python
58
+
59
+ Haiqu is a middleware platform that bridges the gap between quantum hardware and practical applications. Haiqu SDK gives you programmatic access to the full Haiqu cloud stack: **error mitigation**, **circuit compression**, **hardware integration**, and **experiment tracking** - so you can run quantum circuits that actually work on today's noisy hardware.
60
+
61
+ ![Haiqu Stack](https://raw.githubusercontent.com/haiqu-ai/haiqu-sdk/main/images/image.webp)
62
+
63
+ 📖 **Full documentation**: [docs.haiqu.ai](https://docs.haiqu.ai/)
64
+
65
+ ## What You Can Do with Haiqu
66
+
67
+ - **Error Shield:** automatic noise reduction preserves circuit fidelity without manual calibration
68
+ - **Circuit Compression:** run circuits that would otherwise exceed hardware qubit and gate limits
69
+ - **Data Loading:** linear-depth quantum data loading at practical scale
70
+ - **Hardware Integration:** connect to major quantum processors and cloud platforms through a single API
71
+ - **Experiment Tracking:** monitor job history, circuit measurements, and results across runs
72
+
73
+ For example, using Haiqu SDK for a utility-scale Floquet dynamics simulation of the kicked Ising model on 103 qubits reduces quantum processor runtime from **~3.1 hours** to **~1 minute**, and lowers the estimated quantum cloud bill from **~$17,856** to **~$34**, while preserving accuracy close to the ideal result.
74
+
75
+ ![Kicked Ising Pareto Plot](https://raw.githubusercontent.com/haiqu-ai/haiqu-sdk/main/images/pareto.png)
76
+
77
+ Want to see this in action? **[Book a demo](https://haiqu.ai/demoform)** to get access to this example and more.
78
+
79
+ ### Research results
80
+
81
+ Haiqu's technology is backed by peer-reviewed research:
82
+
83
+ - [Matrix Product States for shallow quantum circuit synthesis](https://arxiv.org/abs/2412.05202)
84
+ - [Hamiltonian simulation via sub-block partitioning and state reconstruction](https://arxiv.org/abs/2412.15804)
85
+ - [Rivet transpiler: caching and reuse for iterative quantum workloads](https://arxiv.org/abs/2508.21342)
86
+ - [Fluid dynamics simulation without increasing circuit complexity](https://arxiv.org/abs/2510.17978)
87
+ - [Large Hamiltonian evolution across multiple quantum processors](https://arxiv.org/abs/2502.03542)
88
+
89
+ See also the [Haiqu Blog](https://blog.haiqu.ai/) for more exciting research from us.
90
+ ## Installation
91
+
92
+ This repository contains the source code for the Haiqu SDK Python package. For users, It is recommended to install it from PyPI via `pip install haiqu-sdk` rather than to build from source. Refer to [Haiqu SDK Docs / Local Installation](https://docs.haiqu.ai/quickstart/qs_local) guide for more details.
93
+
94
+ > [!TIP]
95
+ > Alternatively, you can request access to **Haiqu Lab**: a pre-built, hosted JupyterLab environment with everything
96
+ > pre-installed and no local setup required. This can be done through your Haiqu account after sign-up.
97
+
98
+ **Prerequisites**
99
+ - Python **3.10+** or Conda
100
+
101
+ ### Step 1: Set up a Python environment (recommended)
102
+
103
+ Creating a virtual environment is optional, but highly recommended to avoid system-wide install and update of package dependencies.
104
+
105
+ **Venv** (available by default with Python)
106
+
107
+ ```bash
108
+ python -m venv haiqu-env
109
+ source haiqu-env/bin/activate
110
+ ```
111
+ *Note:* on Windows systems, instead of the shell command on the last line above, run `.\haiqu-env\Scripts\activate.bat` to activate the environment.
112
+
113
+ ---
114
+
115
+ **Conda**
116
+
117
+ ```bash
118
+ conda create -y --name haiqu-sdk python=3.13
119
+ conda activate haiqu-sdk
120
+ ```
121
+
122
+ ---
123
+
124
+ **Virtualenv**
125
+
126
+ ```bash
127
+ virtualenv haiqu-env --python ">=3.10"
128
+ source haiqu-env/bin/activate
129
+ ```
130
+
131
+ ### Step 2: Install the SDK
132
+
133
+ The latest version is available from PyPI
134
+ ```bash
135
+ pip install haiqu-sdk
136
+ ```
137
+
138
+ ## Getting Access
139
+
140
+ To use the Haiqu SDK you need an API key.
141
+
142
+ **Request access here → [haiqu.ai](https://docs.haiqu.ai/quickstart/qs_intro)**
143
+
144
+ After sign-up, your API key and access instructions will be delivered by email.
145
+
146
+ Once you have a key, authenticate in your code:
147
+
148
+ ```python
149
+ from haiqu.sdk import haiqu
150
+
151
+ # Login with your API key
152
+ haiqu.login(api_access_key="ENTER_YOUR_API_KEY_HERE") # or set the HAIQU_API_KEY env variable
153
+
154
+ # Initialize your first experiment
155
+ haiqu.init("My First Quantum Experiment")
156
+ ```
157
+
158
+ On success you will see:
159
+
160
+ ```
161
+ Success: Welcome to the Quantum World, you@example.com!
162
+ ```
163
+
164
+ You're all set. Refer to the [Getting Started](#getting-started) section to learn what you can do with Haiqu SDK.
165
+
166
+ ## Getting Started
167
+
168
+ SDK example notebooks are coming soon — we will be releasing the **[sdk-examples](https://github.com/haiqu-ai/sdk-examples) repository** shortly. It will act as a tutorial for basic Haiqu SDK features with ready-to-run notebooks.
169
+
170
+ In the meantime, see the [Core Features](https://docs.haiqu.ai/core_features/exp_tracking) section of the Haiqu SDK docs for guides, as well as the full [Haiqu SDK Reference](https://docs.haiqu.ai/reference/core/login).
171
+
172
+ ## AI-Assisted Development (MCP)
173
+
174
+ Haiqu exposes MCP (Model Context Protocol) servers so you can use AI assistants like Claude or Cursor to execute circuits, query results, and browse documentation directly from your editor.
175
+
176
+ See [MCP.md](/MCP.md) for configuration instructions for VS Code + Claude Code and Cursor.
177
+
178
+ ## Feedback and Support
179
+
180
+ - **Documentation:** [docs.haiqu.ai](https://docs.haiqu.ai/)
181
+ - **Email:** [info@haiqu.ai](mailto:info@haiqu.ai)
182
+ - **Issues and feature requests:** open an issue in this repository or visit [feedback.haiqu.ai](https://feedback.haiqu.ai/)
@@ -0,0 +1,126 @@
1
+ # Haiqu SDK: Quantum Performance Middleware for Python
2
+
3
+ Haiqu is a middleware platform that bridges the gap between quantum hardware and practical applications. Haiqu SDK gives you programmatic access to the full Haiqu cloud stack: **error mitigation**, **circuit compression**, **hardware integration**, and **experiment tracking** - so you can run quantum circuits that actually work on today's noisy hardware.
4
+
5
+ ![Haiqu Stack](https://raw.githubusercontent.com/haiqu-ai/haiqu-sdk/main/images/image.webp)
6
+
7
+ 📖 **Full documentation**: [docs.haiqu.ai](https://docs.haiqu.ai/)
8
+
9
+ ## What You Can Do with Haiqu
10
+
11
+ - **Error Shield:** automatic noise reduction preserves circuit fidelity without manual calibration
12
+ - **Circuit Compression:** run circuits that would otherwise exceed hardware qubit and gate limits
13
+ - **Data Loading:** linear-depth quantum data loading at practical scale
14
+ - **Hardware Integration:** connect to major quantum processors and cloud platforms through a single API
15
+ - **Experiment Tracking:** monitor job history, circuit measurements, and results across runs
16
+
17
+ For example, using Haiqu SDK for a utility-scale Floquet dynamics simulation of the kicked Ising model on 103 qubits reduces quantum processor runtime from **~3.1 hours** to **~1 minute**, and lowers the estimated quantum cloud bill from **~$17,856** to **~$34**, while preserving accuracy close to the ideal result.
18
+
19
+ ![Kicked Ising Pareto Plot](https://raw.githubusercontent.com/haiqu-ai/haiqu-sdk/main/images/pareto.png)
20
+
21
+ Want to see this in action? **[Book a demo](https://haiqu.ai/demoform)** to get access to this example and more.
22
+
23
+ ### Research results
24
+
25
+ Haiqu's technology is backed by peer-reviewed research:
26
+
27
+ - [Matrix Product States for shallow quantum circuit synthesis](https://arxiv.org/abs/2412.05202)
28
+ - [Hamiltonian simulation via sub-block partitioning and state reconstruction](https://arxiv.org/abs/2412.15804)
29
+ - [Rivet transpiler: caching and reuse for iterative quantum workloads](https://arxiv.org/abs/2508.21342)
30
+ - [Fluid dynamics simulation without increasing circuit complexity](https://arxiv.org/abs/2510.17978)
31
+ - [Large Hamiltonian evolution across multiple quantum processors](https://arxiv.org/abs/2502.03542)
32
+
33
+ See also the [Haiqu Blog](https://blog.haiqu.ai/) for more exciting research from us.
34
+ ## Installation
35
+
36
+ This repository contains the source code for the Haiqu SDK Python package. For users, It is recommended to install it from PyPI via `pip install haiqu-sdk` rather than to build from source. Refer to [Haiqu SDK Docs / Local Installation](https://docs.haiqu.ai/quickstart/qs_local) guide for more details.
37
+
38
+ > [!TIP]
39
+ > Alternatively, you can request access to **Haiqu Lab**: a pre-built, hosted JupyterLab environment with everything
40
+ > pre-installed and no local setup required. This can be done through your Haiqu account after sign-up.
41
+
42
+ **Prerequisites**
43
+ - Python **3.10+** or Conda
44
+
45
+ ### Step 1: Set up a Python environment (recommended)
46
+
47
+ Creating a virtual environment is optional, but highly recommended to avoid system-wide install and update of package dependencies.
48
+
49
+ **Venv** (available by default with Python)
50
+
51
+ ```bash
52
+ python -m venv haiqu-env
53
+ source haiqu-env/bin/activate
54
+ ```
55
+ *Note:* on Windows systems, instead of the shell command on the last line above, run `.\haiqu-env\Scripts\activate.bat` to activate the environment.
56
+
57
+ ---
58
+
59
+ **Conda**
60
+
61
+ ```bash
62
+ conda create -y --name haiqu-sdk python=3.13
63
+ conda activate haiqu-sdk
64
+ ```
65
+
66
+ ---
67
+
68
+ **Virtualenv**
69
+
70
+ ```bash
71
+ virtualenv haiqu-env --python ">=3.10"
72
+ source haiqu-env/bin/activate
73
+ ```
74
+
75
+ ### Step 2: Install the SDK
76
+
77
+ The latest version is available from PyPI
78
+ ```bash
79
+ pip install haiqu-sdk
80
+ ```
81
+
82
+ ## Getting Access
83
+
84
+ To use the Haiqu SDK you need an API key.
85
+
86
+ **Request access here → [haiqu.ai](https://docs.haiqu.ai/quickstart/qs_intro)**
87
+
88
+ After sign-up, your API key and access instructions will be delivered by email.
89
+
90
+ Once you have a key, authenticate in your code:
91
+
92
+ ```python
93
+ from haiqu.sdk import haiqu
94
+
95
+ # Login with your API key
96
+ haiqu.login(api_access_key="ENTER_YOUR_API_KEY_HERE") # or set the HAIQU_API_KEY env variable
97
+
98
+ # Initialize your first experiment
99
+ haiqu.init("My First Quantum Experiment")
100
+ ```
101
+
102
+ On success you will see:
103
+
104
+ ```
105
+ Success: Welcome to the Quantum World, you@example.com!
106
+ ```
107
+
108
+ You're all set. Refer to the [Getting Started](#getting-started) section to learn what you can do with Haiqu SDK.
109
+
110
+ ## Getting Started
111
+
112
+ SDK example notebooks are coming soon — we will be releasing the **[sdk-examples](https://github.com/haiqu-ai/sdk-examples) repository** shortly. It will act as a tutorial for basic Haiqu SDK features with ready-to-run notebooks.
113
+
114
+ In the meantime, see the [Core Features](https://docs.haiqu.ai/core_features/exp_tracking) section of the Haiqu SDK docs for guides, as well as the full [Haiqu SDK Reference](https://docs.haiqu.ai/reference/core/login).
115
+
116
+ ## AI-Assisted Development (MCP)
117
+
118
+ Haiqu exposes MCP (Model Context Protocol) servers so you can use AI assistants like Claude or Cursor to execute circuits, query results, and browse documentation directly from your editor.
119
+
120
+ See [MCP.md](/MCP.md) for configuration instructions for VS Code + Claude Code and Cursor.
121
+
122
+ ## Feedback and Support
123
+
124
+ - **Documentation:** [docs.haiqu.ai](https://docs.haiqu.ai/)
125
+ - **Email:** [info@haiqu.ai](mailto:info@haiqu.ai)
126
+ - **Issues and feature requests:** open an issue in this repository or visit [feedback.haiqu.ai](https://feedback.haiqu.ai/)
@@ -0,0 +1,22 @@
1
+ """Haiqu SDK.
2
+
3
+ The SDK provides programmatic access to Haiqu API service: log experiments,
4
+ circuits, jobs and other user data.
5
+ """
6
+
7
+ import importlib.metadata
8
+ from .mpl_style import set_haiqu_mpl_style, unset_haiqu_mpl_style
9
+ from .quantum_haiqu import Haiqu, haiqu
10
+ from .utils import get_ibmq_temporary_token
11
+ from .version import get_version
12
+
13
+ __all__ = (
14
+ "get_version",
15
+ "get_ibmq_temporary_token",
16
+ "haiqu",
17
+ "Haiqu",
18
+ "set_haiqu_mpl_style",
19
+ "unset_haiqu_mpl_style",
20
+ )
21
+
22
+ __version__ = importlib.metadata.version("haiqu-sdk")