Qiskit AQT provider 1.7.0 documentation#

The Qiskit AQT package provides access to AQT systems for Qiskit. It enables users to target and run circuits on AQT’s simulators and hardware.

Quick start#

Install the latest release from the PyPI:

pip install qiskit-aqt-provider

Warning

Some dependencies might be pinned or tightly constrained to ensure optimal performance. If you encounter conflicts for your use case, please open an issue.

Define a circuit that generates 2-qubit Bell state and sample it on a simulator backend running on the local machine:

from qiskit import QuantumCircuit

from qiskit_aqt_provider import AQTProvider
from qiskit_aqt_provider.primitives import AQTSampler

# Define a circuit.
circuit = QuantumCircuit(2)
circuit.h(0)
circuit.cx(0, 1)
circuit.measure_all()

# Select an execution backend.
# Any token (even invalid) gives access to the offline simulation backends.
provider = AQTProvider("ACCESS_TOKEN")
backend = provider.get_backend("offline_simulator_no_noise")

# Instantiate a sampler on the execution backend.
sampler = AQTSampler(backend)

# Optional: set the transpiler's optimization level.
# Optimization level 3 typically provides the best results.
sampler.set_transpile_options(optimization_level=3)

# Sample the circuit on the execution backend.
result = sampler.run(circuit).result()

quasi_dist = result.quasi_dists[0]
print(quasi_dist)
{3: 0.46, 0: 0.54}

For more details see the user guide, a selection of examples, or the reference documentation.