Tomographer  v5.3
Tomographer C++ Framework Documentation
Tomographer::DenseDM::TSpace::LLHMHWalkerLight< DenseLLHType_, RngType_, LoggerType_ > Class Template Reference

A random walk in the density matrix space of a Hilbert state space of a quantum system (elementary rotation jumps; faster) More...

#include <tomographer/densedm/tspacellhwalker.h>

+ Inheritance diagram for Tomographer::DenseDM::TSpace::LLHMHWalkerLight< DenseLLHType_, RngType_, LoggerType_ >:
+ Collaboration diagram for Tomographer::DenseDM::TSpace::LLHMHWalkerLight< DenseLLHType_, RngType_, LoggerType_ >:

Public Types

enum  
 see MHWalker Interface More...
 
typedef DenseLLHType_ DenseLLHType
 The DenseLLH interface object type.
 
typedef RngType_ RngType
 The random number generator type.
 
typedef LoggerType_ LoggerType
 The logger type.
 
typedef DenseLLHType::DMTypes DMTypes
 The data types of our problem.
 
typedef DenseLLHType::LLHValueType LLHValueType
 The loglikelihood function value type (see DenseLLH Interface e.g. IndepMeasLLH)
 
typedef DMTypes::MatrixType MatrixType
 The matrix type for a density operator on our quantum system.
 
typedef DMTypes::VectorParamType VectorParamType
 Type of an X-parameterization of a density operator (see X Parameterization)
 
typedef DMTypes::RealScalar RealScalar
 The real scalar corresponding to our data types. Usually a double.
 
typedef DMTypes::ComplexScalar ComplexScalar
 The complex real scalar corresponding to our data types. Usually a std::complex<double>.
 
typedef LLHMHWalkerLightParams< RealScalarWalkerParams
 The real scalar type for the step size — this scalar type is the only parameter we need (see MHWalker Interface)
 
typedef MatrixType PointType
 Provided for MHRandomWalk. A point in our random walk = a density matrix.
 
typedef LLHValueType FnValueType
 Provided for MHRandomWalk. The function value type is the loglikelihood value type.
 

Public Member Functions

 LLHMHWalkerLight (const MatrixType &startpt, const DenseLLHType &llh, RngType &rng, LoggerType &baselogger)
 Constructor which just initializes the given fields. More...
 
void init ()
 Provided for MHRandomWalk. Initializes some fields and prepares for a random walk. More...
 
const MatrixTypestartPoint ()
 Return the starting point given in the constructor, or a random start point.
 
void thermalizingDone ()
 Callback for after thermalizing is done. No-op.
 
void done ()
 Callback for after random walk is finished. No-op.
 
LLHValueType fnLogVal (const MatrixType &T) const
 Calculate the logarithm of the Metropolis-Hastings function value. More...
 
MatrixType jumpFn (const MatrixType &cur_T, WalkerParams params)
 Decides of a new point to jump to for the random walk.
 

Detailed Description

template<typename DenseLLHType_, typename RngType_, typename LoggerType_>
class Tomographer::DenseDM::TSpace::LLHMHWalkerLight< DenseLLHType_, RngType_, LoggerType_ >

A random walk in the density matrix space of a Hilbert state space of a quantum system (elementary rotation jumps; faster)

The random walk explores the density operators on a Hilbert space of a given dimension, according to the distribution given by the likelihood function on the Hilbert-schmidt uniform prior.

In contrast to LLHMHWalker, the random jumps of this MHWalker is not a uniform random unitary jump, rather, it is a jump in a random elementary direction. The stationary distribution of the Markov chain is the same, so the same distribution is explored, but because less calculations are involved this method can be much faster.

Since
Added in Tomographer 5.0
Template Parameters
DenseLLHTypeA type satisfying the DenseLLH Interface
RngTypeA std::random random number generator (such as std::mt19937)
LoggerTypeA logger type (see Logging and Loggers)

Definition at line 342 of file tspacellhwalker.h.

Member Enumeration Documentation

§ anonymous enum

template<typename DenseLLHType_ , typename RngType_ , typename LoggerType_ >
anonymous enum

see MHWalker Interface

Enumerator
UseFnSyntaxType 

We will calculate the log-likelihood function, which is the logarithm of the Metropolis-Hastings function we should be calculating.

Definition at line 379 of file tspacellhwalker.h.

Constructor & Destructor Documentation

§ LLHMHWalkerLight()

template<typename DenseLLHType_ , typename RngType_ , typename LoggerType_ >
Tomographer::DenseDM::TSpace::LLHMHWalkerLight< DenseLLHType_, RngType_, LoggerType_ >::LLHMHWalkerLight ( const MatrixType startpt,
const DenseLLHType llh,
RngType rng,
LoggerType baselogger 
)
inline

Constructor which just initializes the given fields.

The llh object is responsible for calculating the log-likelihood function of the tomography experiment (see class documentation).

The startpt argument specifies the starting point for the random walk (matrix in T Parameterization). If you provide a zero startpt here, then a random starting point will be chosen using the rng random number generator to generate a random point on the sphere.

Definition at line 411 of file tspacellhwalker.h.

Member Function Documentation

§ fnLogVal()

template<typename DenseLLHType_ , typename RngType_ , typename LoggerType_ >
LLHValueType Tomographer::DenseDM::TSpace::LLHMHWalkerLight< DenseLLHType_, RngType_, LoggerType_ >::fnLogVal ( const MatrixType T) const
inline

Calculate the logarithm of the Metropolis-Hastings function value.

Returns
the log-likelihood, which is computed via the DenseLLH object.

Definition at line 480 of file tspacellhwalker.h.

§ init()

template<typename DenseLLHType_ , typename RngType_ , typename LoggerType_ >
void Tomographer::DenseDM::TSpace::LLHMHWalkerLight< DenseLLHType_, RngType_, LoggerType_ >::init ( )
inline

Provided for MHRandomWalk. Initializes some fields and prepares for a random walk.

Note
If the startpt given to the constructor is zero (or has very small norm), then a uniformly random starting point is chosen. The starting point is chosen randomly according to the Haar-invariant measure on the state space. This corresponds to choosing a uniform point on the sphere corresponding to the T-parameterization of the density matrices.

Definition at line 433 of file tspacellhwalker.h.


The documentation for this class was generated from the following file: