Metadata-Version: 2.4
Name: haiqu-sdk
Version: 1.0.5
Summary: Python SDK for Haiqu quantum cloud — circuit analytics, error mitigation, and hybrid quantum application execution
Author-email: "Haiqu, Inc." <info@haiqu.ai>
License-Expression: Apache-2.0
Project-URL: Homepage, https://haiqu.ai
Project-URL: Documentation, https://docs.haiqu.ai
Project-URL: Source, https://github.com/haiqu-ai/haiqu-sdk
Project-URL: Bug Tracker, https://github.com/haiqu-ai/haiqu-sdk/-/issues
Keywords: quantum computing,error mitigation,zero-noise extrapolation,hybrid quantum-classical,quantum applications,quantum machine learning,QML,data loading,qiskit,circuit analytics,quantum cloud
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown; charset=UTF-8
License-File: LICENSE
Requires-Dist: pydantic<3.0,>=2.6.0
Requires-Dist: requests<3,>=2.33.0
Requires-Dist: qiskit==2.2.*
Requires-Dist: qiskit_ibm_runtime==0.45.*
Requires-Dist: qiskit-aer==0.17.*
Requires-Dist: qiskit_algorithms==0.4.0
Requires-Dist: qiskit-addon-obp==0.3.0
Requires-Dist: qiskit-addon-utils==0.3.0
Requires-Dist: qiskit-qasm3-import==0.6.0
Requires-Dist: qiskit-optimization[cplex]==0.7.0
Requires-Dist: cplex
Requires-Dist: hashable-list==0.2.*
Requires-Dist: ordered-set==4.1.*
Requires-Dist: tabulate==0.9.0
Requires-Dist: plotly==6.0.0
Requires-Dist: kaleido==0.2.1
Requires-Dist: pandas==2.3.1
Requires-Dist: ipywidgets==8.1.8
Provides-Extra: visualization
Requires-Dist: matplotlib==3.9.0; extra == "visualization"
Requires-Dist: pylatexenc==2.10; extra == "visualization"
Provides-Extra: skqd
Requires-Dist: ffsim; extra == "skqd"
Provides-Extra: dev
Requires-Dist: black==23.7.0; extra == "dev"
Requires-Dist: isort; extra == "dev"
Requires-Dist: flake8==6.0.0; extra == "dev"
Provides-Extra: build
Dynamic: license-file

# Haiqu SDK: Quantum Performance Middleware for Python

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.

![Haiqu Stack](https://raw.githubusercontent.com/haiqu-ai/haiqu-sdk/main/images/image.webp)

📖 **Full documentation**: [docs.haiqu.ai](https://docs.haiqu.ai/)

## What You Can Do with Haiqu

- **Error Shield:** automatic noise reduction preserves circuit fidelity without manual calibration
- **Circuit Compression:** run circuits that would otherwise exceed hardware qubit and gate limits
- **Data Loading:** linear-depth quantum data loading at practical scale
- **Hardware Integration:** connect to major quantum processors and cloud platforms through a single API
- **Experiment Tracking:** monitor job history, circuit measurements, and results across runs

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.

![Kicked Ising Pareto Plot](https://raw.githubusercontent.com/haiqu-ai/haiqu-sdk/main/images/pareto.png)

Want to see this in action? **[Book a demo](https://haiqu.ai/demoform)** to get access to this example and more.

### Research results

Haiqu's technology is backed by peer-reviewed research:

- [Matrix Product States for shallow quantum circuit synthesis](https://arxiv.org/abs/2412.05202)
- [Hamiltonian simulation via sub-block partitioning and state reconstruction](https://arxiv.org/abs/2412.15804)
- [Rivet transpiler: caching and reuse for iterative quantum workloads](https://arxiv.org/abs/2508.21342)
- [Fluid dynamics simulation without increasing circuit complexity](https://arxiv.org/abs/2510.17978)
- [Large Hamiltonian evolution across multiple quantum processors](https://arxiv.org/abs/2502.03542)

See also the [Haiqu Blog](https://blog.haiqu.ai/) for more exciting research from us.
## Installation

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. 

> [!TIP]
> Alternatively, you can request access to **Haiqu Lab**: a pre-built, hosted JupyterLab environment with everything
> pre-installed and no local setup required. This can be done through your Haiqu account after sign-up.

**Prerequisites** 
- Python **3.10+** or Conda

### Step 1: Set up a Python environment (recommended)

Creating a virtual environment is optional, but highly recommended to avoid system-wide install and update of package dependencies. 

**Venv** (available by default with Python)

```bash
python -m venv haiqu-env
source haiqu-env/bin/activate
```
*Note:* on Windows systems, instead of the shell command on the last line above, run `.\haiqu-env\Scripts\activate.bat` to activate the environment.

---

**Conda**

```bash
conda create -y --name haiqu-sdk python=3.13
conda activate haiqu-sdk
```

---

**Virtualenv**

```bash
virtualenv haiqu-env --python ">=3.10"
source haiqu-env/bin/activate
```

### Step 2: Install the SDK

The latest version is available from PyPI
```bash
pip install haiqu-sdk
```

## Getting Access

To use the Haiqu SDK you need an API key.

**Request access here → [haiqu.ai](https://docs.haiqu.ai/quickstart/qs_intro)**

After sign-up, your API key and access instructions will be delivered by email.

Once you have a key, authenticate in your code:

```python
from haiqu.sdk import haiqu
  
# Login with your API key
haiqu.login(api_access_key="ENTER_YOUR_API_KEY_HERE")  # or set the HAIQU_API_KEY env variable
  
# Initialize your first experiment
haiqu.init("My First Quantum Experiment")
```

On success you will see:

```
Success: Welcome to the Quantum World, you@example.com!
```

You're all set. Refer to the [Getting Started](#getting-started) section to learn what you can do with Haiqu SDK.

## Getting Started

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.

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).

## AI-Assisted Development (MCP)

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.

See [MCP.md](/MCP.md) for configuration instructions for VS Code + Claude Code and Cursor.

## Feedback and Support

- **Documentation:** [docs.haiqu.ai](https://docs.haiqu.ai/)
- **Email:** [info@haiqu.ai](mailto:info@haiqu.ai)
- **Issues and feature requests:** open an issue in this repository or visit [feedback.haiqu.ai](https://feedback.haiqu.ai/)
