Skip to main content

AI Agents Orientation

If you drive the Haiqu SDK from an AI coding assistant (Claude Code, Cursor, Copilot, or any agent that reads repository context), point it at the bundled agent orientation. It is a compact, task-focused brief that teaches an agent the canonical login → init → build → transpile → run workflow, the import that actually works (from haiqu.sdk import haiqu — plain import haiqu resolves to an empty namespace package), and the traps that local Qiskit intuition gets wrong (for example, that every device_id dispatches to the cloud, that data-loading results are opaque HaiquCircuitGate handles, and that run(...).result() returns probability distributions rather than integer counts). The orientation is installed alongside the package at haiqu/sdk/AGENTS.md and is also published at https://github.com/haiqu-ai/haiqu-sdk/blob/main/haiqu/sdk/AGENTS.md. Most agents automatically discover an AGENTS.mdfile. To load it explicitly, feed this prompt to your AI agent:
Keeping the orientation in the agent’s context measurably reduces the most common failure modes — attempts at local execution, calling qc.depth() on opaque cloud gates, or expecting shot counts from result().

Accessing Common Workflows via Haiqu MCP

Get up and running with Haiqu MCP (Model Context Protocol) tools in your favourite IDE or AI chat.
1

Prompt Claude to add the Haiqu MCP server

Claude will respond “I’ll add that MCP server to your local config.” and do the hard lifting for you. Restart Claude Code (or reconnect via /mcp) to pick up the new server.
2

or open Claude settings

Create a ~/.claude.json file if it does not exist.
3

and configure the Haiqu MCP server

In ~/.claude.json, add:
4

Test the connection

In Claude’s chat, ask “What Haiqu tools do you have available?” Claude should show the Haiqu MCP server as an available tool. The example output from the Claude chat:
The Haiqu documentation automatically generates llms.txt file to help AI tools index and understand the SDK and API documentation.

Use this documentation with AI tools

This documentation page generates an MCP server from guides and the SDK reference. It exposes a search tool for AI applications to query this documentation. To connect this documentation to AI tools do the following:
1

Open Claude settings

Open ~/.claude.json file.
2

Configure the Documentation MCP server

In ~/.claude.json, add:
To test, in AI chat, ask “What HaiquDocumentation guides do you have available?” It should show the HaiquDocumentation server as an available tool.

Example vibe-quantum coding

In AI chat, ask “Show me the typical workflow with a simple quantum circuit.” The AI assistant should show the the complete workflow with creating a new experiment, quantum circuit, and running it on the simulator:
1

Step 1 — List devices

Identified aer_simulator as the best target: available, 0 pending jobs, 1024 qubits.
2

Step 2 — Create experiment

3

Step 3 — Submit circuit (via QASM)

Circuits can be provided as QASM (auto-saved to the DB) or by existing circuit_id.
4

Step 4 — Poll results

The ~50/50 split between |00⟩ and |11⟩ is exactly what a Bell state (|Φ+⟩ = (|00⟩ + |11⟩)/√2) should produce. The near-perfect fidelity confirms the simulation is clean.