Implementation of time evolution with recycling etc. using Krylov subspaces. More...
Classes | |
class | AlwaysHeuristic |
Heuristic which always recycles. More... | |
class | ConcaveHeuristic |
Concavity assumption: Number of vectors needed for the next step is at most as large as the number of vectors needed for the previous step. More... | |
struct | Conf |
The Conf struct stores info on how to evolve the state. More... | |
struct | Evolver |
Base class from which different heuristics inherit. More... | |
class | ExtrapolatingHeuristic |
The ExtrapolatingHeuristic class tries to extrapolate the number of timesteps that can be taken with one more Krylov vector and the runtime for adding this vector, and compares both to building a new Krylov space from scratch. More... | |
class | GreedyHeuristic |
Heuristic which takes into account the time to build a new Krylov vector compared to the time to build an entire new subspace. More... | |
class | NearlyAlwaysRecycleHeuristic |
Recycles unless we reached the maximal Krylov subspace. More... | |
Functions | |
bool | exploitable (IterativeExitReason r) |
Returns true if the reason r allows for a potential recycling of the space. More... | |
template<typename Matrix , typename Vec , typename Ortho , class SolverPolicy > | |
auto | fwd_continue_evolution (Standard< Matrix, Vec, Ortho, SolverPolicy > &k, Vec &s, IterativeConfig &conf, SDef dt) |
template-matched forwarder to the Standard solver: use already existing Krylov space to do one time step More... | |
template<typename Matrix , typename Vec , class Ortho , typename Expectation , class SolverPolicy , class ApplicationPolicy > | |
auto | fwd_continue_evolution (TensorNetworks< Matrix, Vec, Ortho, Expectation, SolverPolicy, ApplicationPolicy > &k, Vec &s, IterativeConfig &conf, SDef dt) |
template-matched forwarder to the TensorNetworks solver: use already existing Krylov space to do one time step More... | |
template<typename Matrix , typename Vec , typename Ortho , class SolverPolicy > | |
auto | fwd_evolve (Standard< Matrix, Vec, Ortho, SolverPolicy > &k, Vec &s, IterativeConfig &conf, SDef dt) |
template-matched forwarder to the Standard solver: Builds up a new Krylov space and evolve one time step More... | |
template<typename Matrix , typename Vec , class Ortho , class Expectation , class SolverPolicy , class ApplicationPolicy > | |
auto | fwd_evolve (TensorNetworks< Matrix, Vec, Ortho, Expectation, SolverPolicy, ApplicationPolicy > &k, Vec &s, IterativeConfig &conf, SDef dt) |
template-matched forwarder to the TensorNetworks solver: Builds up a new Krylov space and evolve one time step More... | |
template<typename Matrix , typename Vec , typename Ortho , class SolverPolicy > | |
std::tuple< IterativeExit, std::vector< Vec >, DenseTensor< 2, SDef > > | fwd_evolve_kss (Standard< Matrix, Vec, Ortho, SolverPolicy > &k, Vec &s, IterativeConfig &conf, SDef dt) |
template-matched forwarder to the Standard solver: Builds up a new Krylov space and evolve one time step More... | |
template<typename Matrix , typename Vec , class Ortho , class Expectation , class SolverPolicy , class ApplicationPolicy > | |
std::tuple< IterativeExit, std::vector< Vec >, DenseTensor< 2, SDef > > | fwd_evolve_kss (TensorNetworks< Matrix, Vec, Ortho, Expectation, SolverPolicy, ApplicationPolicy > &k, Vec &s, IterativeConfig &conf, SDef dt) |
template-matched forwarder to the TensorNetworks solver: Builds up a new Krylov space and evolve one time step More... | |
template<typename Matrix , typename Vec , typename Ortho , class SolverPolicy > | |
auto | fwd_solve (Standard< Matrix, Vec, Ortho, SolverPolicy > &k, Vec &s, IterativeConfig &conf, SDef dt, IterativeExit &) |
template-matched forwarder to the Standard solver: solve the problem once. More... | |
template<typename Matrix , typename Vec , class Ortho , typename Expectation , class SolverPolicy , class ApplicationPolicy > | |
auto | fwd_solve (TensorNetworks< Matrix, Vec, Ortho, Expectation, SolverPolicy, ApplicationPolicy > &k, Vec &s, IterativeConfig &, SDef dt, IterativeExit &) |
template-matched forwarder to the Tensor networks solver: solve the problem once. More... | |
template<typename Solver > | |
std::unique_ptr< Evolver< Solver > > | make_evolver (Conf &conf) |
Creates a heuristic object based on the configuration supplied. More... | |
template<typename SolverPolicy , typename Op , typename SType , typename... Params> | |
void | run_evolution (Op &&op, SType &state, Conf conf, Params &&... params) |
evolve krylov evolution of state wrt operator op. More... | |
Implementation of time evolution with recycling etc. using Krylov subspaces.
The namespace contains the following ingredients:
run_evolution
is the main entry point. It constructs the state wrappers and the Evolver
object (depending on the user configuration) and then calls the loop_evolve()
function on that. The Evolver
object is created by the make_evolve
function which takes most of the configuration from template policy classes and uses the appropriate subclass of Evolver
to implement the configured recycling heuristic.Evolver::loop_evolve
repeatedly calls Evolver::evolve()
until the end of the time evolution is reached.Evolver::evolve()
first calls init_evolve()
and then repeatedly the member functions virt_evolution()
, virt_evolve()
, wrapupstep()
etc. to do a time evolution within a single Krylov subspace. All of these functions may be overridden by the recycling policy class, typically to implement further bookkeeping.Evolver::virt_*()
and also Evolver::evolve()
call Evolution
namespace functions fwd_*()
. Thse are template-matched to the specific solver used (Standard
or TensorNetworks
).fwd_*()
then call the member functions of the solver to implement the evolution etc.sp_*()
, orthogonalise()
, orthonormalise()
etc.)Evolver
class calls wrapupstep()
which forwards to the Solver’s wrapup()
functions which in turn forwards to the SolverPolicy’s sp_wrapup()
to do any final calculations.Yes it is complicated.