Tomographer  v1.0a
Tomographer C++ Framework Documentation
Tomographer::DMStateSpaceLLHMHWalker< TomoProblem, Rng, Log > Class Template Reference

A random walk in the density matrix space of a Hilbert state space of a quantum system. More...

#include <tomographer/dmmhrw.h>

Public Types

enum  
 
typedef TomoProblem::MatrQ MatrQ
 The data types of our problem.
 
typedef TomoProblem::LLHValueType LLHValueType
 The loglikelihood function value type (see IndepMeasTomoProblem)
 
typedef MatrQ::MatrixType MatrixType
 The matrix type for a density operator on our quantum system.
 
typedef MatrQ::VectorParamType VectorParamType
 Type of an X-parameterization of a density operator (see param_x_to_herm())
 
typedef MatrQ::RealScalar RealScalar
 The real scalar corresponding to our data types. Usually a double.
 
typedef MatrQ::ComplexScalar ComplexScalar
 The complex real scalar corresponding to our data types. Usually a std::complex<double>.
 
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

 DMStateSpaceLLHMHWalker (const MatrixType &startpt, const TomoProblem &tomo, Rng &rng, Log &log_)
 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 thermalizing_done ()
 Callback for after thermalizing is done. No-op.
 
void done ()
 Callback for after random walk is finished. No-op.
 
LLHValueType fnlogval (const MatrixType &T)
 Calculate the logarithm of the Metropolis-Hastings function value. More...
 
MatrixType jump_fn (const MatrixType &cur_T, RealScalar step_size)
 Decides of a new point to jump to for the random walk.
 

Detailed Description

template<typename TomoProblem, typename Rng, typename Log>
class Tomographer::DMStateSpaceLLHMHWalker< TomoProblem, Rng, Log >

A random walk in the density matrix space of a Hilbert state space of a quantum system.

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.

Template Parameters
TomoProblemthe tomography data, expected to be a priori a IndepMeasTomoProblem
Rnga std::random random number generator (such as std::mt19937)
MHRWStatsCollectora type implementing a StatsCollector interface (MHRWStatsCollector Interface)

Definition at line 70 of file dmmhrw.h.

Member Enumeration Documentation

template<typename TomoProblem , typename Rng , typename Log >
anonymous enum
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 90 of file dmmhrw.h.

Constructor & Destructor Documentation

template<typename TomoProblem , typename Rng , typename Log >
Tomographer::DMStateSpaceLLHMHWalker< TomoProblem, Rng, Log >::DMStateSpaceLLHMHWalker ( const MatrixType startpt,
const TomoProblem &  tomo,
Rng &  rng,
Log &  log_ 
)
inline

Constructor which just initializes the given fields.

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 114 of file dmmhrw.h.

Member Function Documentation

template<typename TomoProblem , typename Rng , typename Log >
LLHValueType Tomographer::DMStateSpaceLLHMHWalker< TomoProblem, Rng, Log >::fnlogval ( const MatrixType T)
inline

Calculate the logarithm of the Metropolis-Hastings function value.

Returns
-0.5 * (-2-log-likelihood), where the -2-log-likelihood is computed using IndepMeasTomoProblem::calc_llh()

Definition at line 177 of file dmmhrw.h.

template<typename TomoProblem , typename Rng , typename Log >
void Tomographer::DMStateSpaceLLHMHWalker< TomoProblem, Rng, Log >::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 133 of file dmmhrw.h.


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