Skip to content


Qiskit is an open-source toolkit for useful quantum computing. It allows the creation and execution of Quantum circuits. They can be run in a local simulator or on a remote Quantum Computer. Additional information can be found at

Install directions

You will need an existing Conda install.

  1. conda create --name qiskit python=3.9
  2. conda activate qiskit
  3. conda install -c conda-forge qiskit-ibm-runtime

Example usage

Run a simple quantum circuit on a remote Quantum computer. This is based on the example at and adapted to run at CCI. You will need an existing account and auth token from .

  1. Create a script that sets up a simple quantum circuit and runs it.
import os
from qiskit_ibm_runtime import QiskitRuntimeService, Session, Options, Sampler
from qiskit import QuantumCircuit

#Reads auth token from env variable QISKIT_IBM_TOKEN
service = QiskitRuntimeService(channel="ibm_quantum", instance="ibm-q/open/main" , token=os.getenv('QISKIT_IBM_TOKEN') )

options = Options(optimization_level=1)
options.execution.shots = 1024  # Options can be set using auto-complete.

bell = QuantumCircuit(2)
bell.h(0), 1)

with Session(service=service, backend="ibmq_qasm_simulator") as session:
    sampler = Sampler(session=session, options=options)
    job =
    print(f"Job ID is {job.job_id()}")
    print(f"Job result is {job.result()}")
  1. Run these commands to setup the execution environment and run our script
#Prior to execution of our script we need to setup the proxy so we can reach the IBM Quantum Cloud to submit our job.
export http_proxy=http://proxy:8888
export https_proxy=$http_proxy

#Activate conda
conda activate qiskit  

#Set IBM Quantum Cloud token
export QISKIT_IBM_TOKEN="MY_IBM_CLOUD_API_KEY...f43242342sfsf"

#execute our script

Last update: July 14, 2023