::: AQT Qiskit Tutorial

AQT supports Qiskit which is an open-source framework for working with noisy intermediate-scale quantum computers (NISQ). You can find more information and documentation on Qiskit API documentation.

Qiskit is hosted on Github

License Build Status Downloads

Installation

For a full installation of Qiskit execute the following on the command line:

pip install qiskit

For more detailed information on how to install Qiskit please visit Installing Qiskit.

Next, you need to install the Qiskit AQT provider using the pip tool by:

pip install qiskit-aqt-provider

After the installation has finished successfully, you are ready to use different backends supported by the AQT provider using Qiskit.

Use your AQT credentials

You can initialize an AQT provider using your token with the following Python code:

from qiskit_aqt_provider import AQTProvider
aqt = AQTProvider('MY_TOKEN')

Where MY_TOKEN is your access token for a specific AQT device. You need to subscribe to an AQT backend at the AQT Gateway Portal and retreive your token. Then you can access the backends from the AQT provider by:

print(aqt.backends())
sim_backend = aqt.backends.aqt_qasm_simulator

Alternatively you can access a real-hardware backend by e.g. using aqt_innsbruck and the corresponding access token.

Execute a quantum circuit

You can then use that backend in Qiskit. For example, executing a quantum circuit that prepares the Bell state

\[ \ket{\psi}=\frac{1}{\sqrt{2}}(\ket{00}+\ket{11}) \]

by writing

from qiskit import *
qc = QuantumCircuit(2, 2)
qc.h(0)
qc.cx(0, 1)
qc.measure([0,1], [0,1])
result = execute(qc, sim_backend, shots=200).result()
print(result.get_counts(qc))

AQT Simulators

The AQT simulators are capable of running ideal simulations (without a noise model) and real simulations (with a noise model) of a quantum circuit. Using a simulator with noise model allows you to estimate the performance of running a circuit on the real hardware. Switching between the two simulation types is done by using the respective backend in above example.

For running a simulation without noise model use

sim_backend = aqt.backends.aqt_qasm_simulator

whereas for a simulation with noise model use

sim_backend = aqt.backends.aqt_qasm_simulator_noise_1

We will provide different noise models in the future, which will be added as new backends to the Qiskit AQT provider. Available backends can be listed by running

from qiskit_aqt_provider import AQTProvider
aqt = AQTProvider('MY_TOKEN')
print(aqt.backends())

License

The Qiskit AQT provider is licensed under the Apache License 2.0.