Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains functions for performing and simulating HABQT in Haskell.
Note: functions in this module simply call API from HABQTlib.UnsafeAPI after validating inputs.
- type TomState = StateT (ParticleHierarchy, [PureStateVector]) IO
- type TomFun = PureStateVector -> TomState (DensityMatrix, PurePOVM)
- tomographyFun :: QBitNum -> MHMCiter -> OptIter -> OutputVerb -> GenIO -> Validation [String] TomFun
- simulatedTomography :: DensityMatrix -> QBitNum -> MHMCiter -> OptIter -> OutputVerb -> GenIO -> Validation [String] (StateT PurePOVM TomState Double)
- streamResults :: QBitNum -> Rank -> NumberOfParticles -> MHMCiter -> OptIter -> OutputVerb -> Validation [String] (Stream (Of Double) IO ())
Documentation
type TomState = StateT (ParticleHierarchy, [PureStateVector]) IO Source #
Tomography keeps track of the particle hierarchy and list of previous measurement results, IO is used for verbose output and assorted random state generation.
type TomFun = PureStateVector -> TomState (DensityMatrix, PurePOVM) Source #
Tomography function takes a measurement result and returns state-dependent Bayesian mean estimate of state and the optimal next POVM to perform.
:: QBitNum | Number of quantum bits under tomography |
-> MHMCiter | Number of MHMC iterations to perform when resampling |
-> OptIter | Number of POVM optimisation steps to perform |
-> OutputVerb | Verbosity of stdout output |
-> GenIO | IO generator for variates from System.Random.MWC |
-> Validation [String] TomFun |
Given parameters such as output verbosity level and number of quantum bits, set up the tomography function.
:: DensityMatrix | True state's density matrix |
-> QBitNum | Number of quantum bits under tomography |
-> MHMCiter | Number of MHMC iterations to perform when resampling |
-> OptIter | Number of POVM optimisation steps to perform |
-> OutputVerb | Verbosity of stdout output |
-> GenIO | IO generator for variates from System.Random.MWC |
-> Validation [String] (StateT PurePOVM TomState Double) |
Given a true state's density matrix and parameters, set up a simulation of quantum tomography that outputs infidelity between mean estimates and true state.
:: QBitNum | Number of quantum bits under tomography |
-> Rank | Rank of true state |
-> NumberOfParticles | Number of particles (per rank) to use for tomography |
-> MHMCiter | Number of MHMC iterations to perform when resampling |
-> OptIter | Number of POVM optimisation steps to perform |
-> OutputVerb | Verbosity of stdout output |
-> Validation [String] (Stream (Of Double) IO ()) |
Stream simulated tomography results.