HABQT: Hierarchical adaptive Bayesian quantum tomography for quantum bits

[ bsd3, library, math, program, quantum ] [ Propose Tags ] [ Report a vulnerability ]

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.

Includes:

  • a Haskell library

  • a shared library which provides a C interface to the tomography function

  • an executable that simulates tomography of random states and outputs infidelity between true states and mean Bayesian estimates to a file

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]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0
Change log ChangeLog.md
Dependencies base (>=4.10 && <4.11), 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]
License BSD-3-Clause
Copyright Copyright (c) 2018 Leonid Belinsky
Author Leonid Belinsky
Maintainer belinsky.leonid@gmail.com
Category Math, Quantum
Home page https://github.com/Belinsky-L-V/HABQT#readme
Bug tracker https://github.com/Belinsky-L-V/HABQT/issues
Source repo head: git clone https://github.com/Belinsky-L-V/HABQT
Uploaded by LeonidBelinsky at 2018-07-01T18:18:23Z
Distributions
Executables HABQT-simulation
Downloads 709 total (2 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user [build log]
All reported builds failed as of 2018-07-01 [all 2 reports]

Readme for HABQT-0.1.0.0

[back to package description]

HABQT

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.

Includes:

  • a Haskell library
  • a shared library which provides a C interface to the tomography function
  • an executable that simulates tomography of random states and outputs infidelity between true states and mean Bayesian estimates to a file

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

Linux

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.

Windows

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.