Skip to content

Example job

A minimal Bell pair circuit, run on a quantum computer. Replace <CORTEX_URL> and <QUANTUM_COMPUTER_ID> with the values from Runtime identifiers on your device's page. <CORTEX_URL> is the name of an environment variable set by the fiqci-vtt-* module.

Get the backend

VLQ backend

The syntax for fetching the VLQ backend is different. See the VLQ page for instructions.

Load the module with module load fiqci-vtt-qiskit.

import os
from iqm.qiskit_iqm import IQMProvider

cortex_url = os.getenv("<CORTEX_URL>")
provider = IQMProvider(cortex_url, quantum_computer="<QUANTUM_COMPUTER_ID>")
backend = provider.get_backend()

Load the module with module load fiqci-vtt-cirq.

import os
from iqm.cirq_iqm.iqm_sampler import IQMSampler

cortex_url = os.getenv("<CORTEX_URL>")
sampler = IQMSampler(cortex_url, quantum_computer="<QUANTUM_COMPUTER_ID>")

Define and run your circuit

from qiskit import QuantumCircuit, QuantumRegister, transpile

shots = 1000

qreg = QuantumRegister(2, "QB")
circuit = QuantumCircuit(qreg, name="Bell pair circuit")
circuit.h(qreg[0])
circuit.cx(qreg[0], qreg[1])
circuit.measure_all()

transpiled_circuit = transpile(circuit, backend=backend)

job = backend.run(transpiled_circuit, shots=shots)
print("Job ID:", job.job_id())

print(job.result().get_counts())
import cirq

shots = 1000

qubits = cirq.NamedQubit.range(2, prefix="QB")
circuit = cirq.Circuit(
    cirq.H(qubits[0]),
    cirq.CNOT(qubits[0], qubits[1]),
    cirq.measure(*qubits, key="m"),
)

result = sampler.run(circuit, repetitions=shots)
print("Job ID:", result.metadata.job_id)

print(result.histogram(key="m"))

Save your Job ID!

There is currently no way to list previous job IDs, so always print your job ID after submission and save it somewhere. The same applies to the calibration set ID.

Submitting through LUMI

For submitting jobs see Running quantum jobs.

Further reading

Do you find this page useful?
Thank you for your feedback!
Thank you! Your feedback is appreciated.

Please let us know how we could improve this page by contacting us or by creating an issue in GitHub. You can also edit this page yourself and contribute your improvements by creating a pull request.

November 5, 2026