Cirq AQT
raw JSON → 1.6.1 verified Mon Apr 27 auth: no python
A Cirq package to simulate and connect to Alpine Quantum Technologies (AQT) quantum computers. Version 1.6.1 is the current stable release, part of Cirq v1.6.1. Released as needed alongside Cirq core.
pip install cirq-aqt Common errors
error ModuleNotFoundError: No module named 'cirq_aqt' ↓
cause The cirq-aqt package is not installed or imported incorrectly.
fix
Install cirq-aqt: pip install cirq-aqt. Then import using 'from cirq_aqt import ...'.
error AttributeError: module 'cirq' has no attribute 'AQTSimulator' ↓
cause Importing from cirq instead of cirq_aqt.
fix
Use 'from cirq_aqt import AQTSimulator' instead of 'from cirq import AQTSimulator'.
Warnings
deprecated AQTSimulator is deprecated in favor of cirq.Simulator (from cirq-core) for local simulation. AQTSimulator may be removed in a future release. ↓
fix Use cirq.Simulator() for local simulation instead of AQTSimulator().
gotcha AQTSampler requires valid API credentials (host, access_token) to connect to AQT hardware. Without proper auth, it raises an authentication error. ↓
fix Provide host and access_token parameters or set environment variables AQT_HOST and AQT_ACCESS_TOKEN.
breaking Cirq v1.6.0 dropped support for Python <3.11. Make sure your environment is using Python 3.11 or later. ↓
fix Upgrade Python to 3.11+ or use an older version of cirq-aqt (e.g., pip install cirq-aqt==1.5.0).
Install
pip install cirq-aqt==1.6.1 Imports
- AQTSimulator wrong
from cirq.aqt import AQTSimulatorcorrectfrom cirq_aqt import AQTSimulator - AQTSampler wrong
from cirq import AQTSamplercorrectfrom cirq_aqt import AQTSampler - get_aqt_device
from cirq_aqt import get_aqt_device - AQTFuture
from cirq_aqt import AQTFuture
Quickstart
import cirq
from cirq_aqt import AQTSimulator
# Create a simple circuit
q0, q1 = cirq.LineQubit.range(2)
circuit = cirq.Circuit([
cirq.H(q0),
cirq.CNOT(q0, q1),
cirq.measure(q0, q1, key='result')
])
# Simulate
sim = AQTSimulator()
result = sim.simulate(circuit)
print(result)