Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains data types and helper functions for working with quantum state vectors and density matrices.
- type Dim = Int
- type Rank = Int
- type NumberOfParticles = Int
- type QBitNum = Int
- type Weight = Double
- type MHMCiter = Int
- type OptIter = Int
- data OutputVerb
- newtype DensityMatrix = DensityMatrix {}
- truncateRank :: Rank -> WeighedDensityMatrix -> WeighedDensityMatrix
- newtype PureStateVector = PureStateVector {}
- pureStateLikelihood :: PureStateVector -> DensityMatrix -> Double
- svToDM :: PureStateVector -> DensityMatrix
- newtype WeighedDensityMatrix = WeighedDensityMatrix {
- getWDM :: (Weight, DensityMatrix)
- mkWDM :: Weight -> DensityMatrix -> WeighedDensityMatrix
- mkWDM1 :: DensityMatrix -> WeighedDensityMatrix
- newtype WeighedPureStateVector = WeighedPureStateVector {
- getWSV :: (Weight, PureStateVector)
- (<+>) :: WeighedDensityMatrix -> WeighedDensityMatrix -> WeighedDensityMatrix
- fidelity :: PureStateVector -> PureStateVector -> Double
- fidelityDM :: DensityMatrix -> DensityMatrix -> Double
- validSV :: PureStateVector -> Validation [String] PureStateVector
- validDM :: DensityMatrix -> Validation [String] DensityMatrix
- validPartNum :: NumberOfParticles -> Validation [String] NumberOfParticles
- validRank :: Rank -> Validation [String] Rank
- validMHMCiter :: MHMCiter -> Validation [String] MHMCiter
- validOptIter :: OptIter -> Validation [String] OptIter
- validQBitN :: QBitNum -> Validation [String] QBitNum
Documentation
type NumberOfParticles = Int Source #
Number of particles per rank.
Number of optimisation steps to perform when searching for optimal measurment.
data OutputVerb Source #
Output verbosity settings.
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.
newtype WeighedDensityMatrix Source #
Weighed density matrix where weight is stored separately as first coordinate of a tuple.
mkWDM :: Weight -> DensityMatrix -> WeighedDensityMatrix Source #
A shorter alias for curried WeighedDensityMatrix
constructor.
mkWDM1 :: DensityMatrix -> WeighedDensityMatrix Source #
Alias for
.mkWDM
1
newtype WeighedPureStateVector Source #
Weighed state vector where weight is stored separately as first coordinate of a tuple.
(<+>) :: 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.