HABQT: Hierarchical adaptive Bayesian quantum tomography for quantum bits

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.


Extends adaptive Bayesian quantum tomography as described in https://doi.org/10.1103/PhysRevA.85.052120 by using a hierarchical distribution over density matrices of all possible ranks.


Please refer to HABQT-simulation --help for executable usage instructions, README on Github for installation instructions and shared library C ABI description, accompanying Haddock documentation for Haskell API.

[Skip to ReadMe]


Change logChangeLog.md
Dependenciesbase (==4.10.*), HABQT, hmatrix (>=0.18.2 && <0.19), hmatrix-gsl (>=0.18 && <0.20), mtl (>=2.2.2 && <2.3), mwc-random (>=0.13.6 && <0.14), newtype-generics (>=0.5.3 && <0.6), optparse-applicative (>=0.14.2 && <0.15), streaming (>=0.2.1 && <0.3), utility-ht (>=0.0.14 && <0.1), validation (>=1 && <1.1), vector (>=0.12.0 && <0.13) [details]
CopyrightCopyright (c) 2018 Leonid Belinsky
AuthorLeonid Belinsky
CategoryMath, Quantum
Home pagehttps://github.com/Belinsky-L-V/HABQT#readme
Bug trackerhttps://github.com/Belinsky-L-V/HABQT/issues
Source repositoryhead: git clone https://github.com/Belinsky-L-V/HABQT
UploadedSun Jul 1 18:11:22 UTC 2018 by LeonidBelinsky



Maintainers' corner

For package maintainers and hackage trustees

Readme for HABQT-

[back to package description]


Aim of the project is to extend adaptive Bayesian quantum tomography as described in 2012 paper by Huszár and Houlsby by using a hierarchical distribution over density matrices of all possible ranks.


Please refer to HABQT-simulation --help for executable usage instructions, accompanying Haddock documentation for Haskell API, and libHABQT header file for shared library C ABI description.

Installation instructions


No special setup should be necessary. Simply make sure GSL, BLAS and LAPACK are installed on your system and install normally using stack, cabal or Setup.hs.


Making the necessary shared libraries and tools available on windows can be a bit tricky. One way to do this is install them inside MSYS2 that comes with stack on windows (on x86_64 can be found under %LOCALAPPDATA%\Programs\stack\x86_64-windows):

  1. MSYS may not be present, in which case execute stack build in HABQT directory. The build will fail due to missing libraries/tools, but MSYS should be installed after it, and you will be able to add them.
  2. Launch msys2.exe
  3. (Optional) Update MSYS2 with pacman -Syu. It may be necessary to restart the shell: follow the instructions displayed in it.
  4. Install the appropriate mingw toolchain, which includes necessary tools like pkg-config. E.g.
    pacman -S mingw-w64-x86_64-toolchain
  5. Install GSL for the appropriate mingw toolchain (the 64-bit one this case):
    pacman -S mingw64/mingw-w64-x86_64-gsl
  6. Install openblas for appropriate mingw toolchain:
    pacman -S mingw64/mingw-w64-x86_64-openblas
  7. The versions/naming conventions hmatrix expects differ from what is used in modern MSYS2, so it's necessary to either link of create renamed copies of two libraries from the appropriate mingw toolchain (in my case found under %LOCALAPPDATA%\Programs\stack\x86_64-windows\msys2-20150512\mingw64\bin): libgfortran-4.dll to libgfortran.dll and libgslcblas-0.dll to gsl-0.dll. I recommend placing links/copies in some directory that isn't normally on PATH (neither windows nor MSYS) and explicitly pointing stack to them during installation with --extra-lib-dirs (example follows in next step).
  8. Outside MSYS2 open a normal windows shell, navigate to HABQT folder and build/install with stack, passing appropriate flags and library dirs:
    stack build --flag hmatrix:openblas --extra-lib-dirs=D:\lib
    where D:\lib contains libgfortran.dll and gsl-0.dll.

To use the shared library or executable, you’ll need to have several mingw libraries on PATH or in the same directory: libgcc_s_seh-1.dll, libgfortran-4.dll, libgsl-23.dll, libgslcblas-0.dll, libopenblas.dll, libquadmath-0.dll and libwinpthread-1.dll.