Tested on ubuntu 20.04.
- Install anaconda: https://www.anaconda.com/products/individual
- Install direnv: https://direnv.net/
- Initialize shell for usage with conda
$ conda init
- Clone this repo
$ git clone https://github.com/artgromov/quantum-lab.git
- Create and setup env
$ cd quantum
$ direnv allow
- Install conda env jupyter-lab kernel
$ ipython kernel install --name quantum-lab --display-name 'Quantum Lab' --user
You can change to quantum-lab dir to activate env and run any code directly.
$ cd quantum-lab
direnv: loading ~/quantum-lab/.envrc
direnv: export +CONDA_PREFIX_1 ~CONDA_DEFAULT_ENV ~CONDA_PREFIX ~CONDA_SHLVL ~PATH
Or just start jupyter-lab and run notebook files with "Quantum Lab" kernel.
- Create account on https://quantum-computing.ibm.com/
- Create
~/.qiskit directory
if not present. - Add
ibmq
section to~/.qiskit/qiskitrc
file
[ibmq]
token = <your token here>
url = https://auth.quantum-computing.ibm.com/api
verify = True
replace string with your actual API token from https://quantum-computing.ibm.com/
- Done. Now you can use following code to access IBMQ:
import helpers
provider = helpers.get_ibmq_provider()