HABQT-0.1.0.0: Hierarchical adaptive Bayesian quantum tomography for quantum bits

Safe HaskellNone
LanguageHaskell2010

HABQTlib.Data

Description

This module contains data types and helper functions for working with quantum state vectors and density matrices.

Synopsis

Documentation

type Dim = Int Source #

Dimension of Hilbert space.

type Rank = Int Source #

Rank of mixed state.

type NumberOfParticles = Int Source #

Number of particles per rank.

type QBitNum = Int Source #

Number of quantum bits.

type Weight = Double Source #

Weight associated with a particle.

type MHMCiter = Int Source #

Number of MHMC iterations to perform when resampling.

type OptIter = Int Source #

Number of optimisation steps to perform when searching for optimal measurment.

data OutputVerb Source #

Output verbosity settings.

Constructors

NoOutput

No stdout output

FidOutput

Only output fidelities and weights of hierarchical mean estimates

FullOutput

Full output, including resampling diagnostic information

newtype DensityMatrix Source #

Density matrix are stored as hmatrix matrices of complex doubles.

truncateRank :: Rank -> WeighedDensityMatrix -> WeighedDensityMatrix Source #

Set smallest eigenvalues of a weighed density matrix to zero until specified rank is reached.

newtype PureStateVector Source #

Pure state vectors are stored as hmatrix matrices of complex doubles. Such matrices only have one column.

pureStateLikelihood :: PureStateVector -> DensityMatrix -> Double Source #

Probability of obtaining a measurement result when projecting a system in mixed state determined by a density matrix onto a pure state.

svToDM :: PureStateVector -> DensityMatrix Source #

Calculate the density matrix of a given pure state.

mkWDM :: Weight -> DensityMatrix -> WeighedDensityMatrix Source #

A shorter alias for curried WeighedDensityMatrix constructor.

(<+>) :: WeighedDensityMatrix -> WeighedDensityMatrix -> WeighedDensityMatrix infix 8 Source #

Given two weighed density matrixes, compute their mixture. Associative operation.

fidelity :: PureStateVector -> PureStateVector -> Double Source #

Fidelity (probability of measurement) between pure states.

fidelityDM :: DensityMatrix -> DensityMatrix -> Double Source #

Fidelity (probability of measurement) between mixed states.

validSV :: PureStateVector -> Validation [String] PureStateVector Source #

Check whether a pure state vector is properly normed.

validDM :: DensityMatrix -> Validation [String] DensityMatrix Source #

Verify that density matrix is Hermitian and has trace 1.

validPartNum :: NumberOfParticles -> Validation [String] NumberOfParticles Source #

Verify that particle number is a positive integer.

validRank :: Rank -> Validation [String] Rank Source #

Verify that rank is a positive integer. Setting rank to be higher than the dimension of space creates poinless performance overhead, but isn't prevented by validation.

validMHMCiter :: MHMCiter -> Validation [String] MHMCiter Source #

Verify that number of MHMC iterations is a positive integer.

validOptIter :: OptIter -> Validation [String] OptIter Source #

Verify that number of POVM optimisation iterations is positive.

validQBitN :: QBitNum -> Validation [String] QBitNum Source #

Verify that number of quantum bits is positive.