Derive quantum error bars for quantum processes in terms of the diamond norm to a reference quantum channel.
Theory: see arXiv:1808.00358.
See detailed installation instructions here: https://QPtomographer.readthedocs.io/en/latest/install
Basically:
-
you need to download & compile SCS ≥ 2.0;
-
you need to have the
tomographer
package installed as described here; -
you can install
QPtomographer
viapip
.
Here are quick-and-easy steps for some common setups:
Download & compile SCS ≥ 2.0:
> sudo apt-get install liblapack-dev
> cd $HOME/Downloads
> curl -L https://github.com/cvxgrp/scs/archive/v2.0.2.tar.gz -o scs-2.0.2.tar.gz
> tar xvfz scs-2.0.2.tar.gz && cd scs-2.0.2
> make CTRLC=0 USE_OPENMP=0 USE_LAPACK=1
Download & compile tomographer ≥ 5.4
and other prerequisites:
# If you are using *pip* (or if you're not sure):
> pip install numpy scipy pybind11 qutip
> pip install tomographer
# If you are using *anaconda/conda*:
> conda install numpy scipy gcc libgcc
> conda install -c conda-forge pybind11 qutip
> pip install tomographer
Install QPtomographer
via pip
:
> SCS_ROOT=$HOME/Downloads/scs-2.0.2 pip install QPtomographer
Download & compile SCS ≥ 2.0:
> cd $HOME/Downloads
> curl -L https://github.com/cvxgrp/scs/archive/v2.0.2.tar.gz -o scs-2.0.2.tar.gz
> tar xvfz scs-2.0.2.tar.gz && cd scs-2.0.2
> make CTRLC=0 USE_OPENMP=0 USE_LAPACK=1 BLASLDFLAGS="-framework Accelerate"
Download & compile tomographer
and other prerequisites:
# If you are using *pip* (or if you're not sure):
> pip install numpy pybind11 qutip
> pip install tomographer
# If you are using *anaconda/conda*:
> conda install numpy scipy gcc libgcc
> conda install -c conda-forge pybind11 qutip
> pip install tomographer
Install QPtomographer
via pip
:
> SCS_ROOT=$HOME/Downloads/scs-2.0.2 pip install QPtomographer
After installing all the prerequisites, you should only have to run
> SCS_ROOT=$HOME/Downloads/scs python setup.py install
specifying the path where you compiled SCS using the environment variable
SCS_ROOT
. Or, to install as administrator,
> sudo -H SCS_ROOT=$HOME/Downloads/scs python setup.py install
The good news is that QPtomographer
's setup script automatically picks up all
the C++ flags set for tomographer
itself, and uses those same flags. Thus, if
tomographer
compiled, QPtomographer
should compile as well (just make sure
you use the same compiler).
The examples/
folder contains examples using QPtomographer
.
The examples are provided as jupyter notebooks (*.ipynb
files).
Jupyter is a convenient environment for running code interactively, inspired by
Mathematica and powered by Python.
To run an example, first install jupyter. Then, in a terminal, enter
the examples/
directory in QPtomographer
sources and launch jupyter:
> cd QPtomographer/examples
> jupyter notebook
This should open your browser with a jupyter session. Click on the directory
corresponding to the example you wish to run, and then open the corresponding
notebook file (run.ipynb
file).
Full documentation of what QPtomographer
does, how to call the code, and
everything you always wanted to know about QPtomographer
but didn't dare to
ask, can be found at:
https://QPtomographer.readthedocs.io/en/latest/install
QPtomographer
is released under the MIT License (see LICENSE.txt
).