pauxy.qmc package

Submodules

pauxy.qmc.afqmc module

Driver to perform AFQMC calculation

class pauxy.qmc.afqmc.AFQMC(comm, options=None, system=None, trial=None, parallel=False, verbose=False)[source]

Bases: object

AFQMC driver.

Zero temperature AFQMC using open ended random walk.

This object contains all the instances of the classes which parse input options.

Parameters:
  • model (dict) – Input parameters for model system.
  • qmc_opts (dict) – Input options relating to qmc parameters.
  • estimates (dict) – Input options relating to what estimator to calculate.
  • trial (dict) – Input options relating to trial wavefunction.
  • propagator (dict) – Input options relating to propagator.
  • parallel (bool) – If true we are running in parallel.
  • verbose (bool) – If true we print out additional setup information.
uuid

Simulation state uuid.

Type:string
sha1

Git hash.

Type:string
seed

RNG seed. This is set during initialisation in calc.

Type:int
root

If true we are on the root / master processor.

Type:bool
nprocs

Number of processors.

Type:int
rank

Processor id.

Type:int
cplx

If true then most numpy arrays are complex valued.

Type:bool
system

Container for model input options.

Type:system object.
qmc

Container for qmc input options.

Type:pauxy.state.QMCOpts object.
trial

Trial wavefunction class.

Type::class:`pauxy.trial_wavefunction.X’ object
propagators

Container for system specific propagation routines.

Type:pauxy.propagation.Projectors object
estimators

Estimator handler.

Type:pauxy.estimators.Estimators object
psi

Walker handler. Stores the AFQMC wavefunction.

Type:pauxy.walkers.Walkers object
determine_dtype(propagator, system)[source]

Determine dtype for trial wavefunction and walkers.

Parameters:
  • propagator (dict) – Propagator input options.
  • system (object) – System object.
finalise(verbose=False)[source]

Tidy up.

Parameters:verbose (bool) – If true print out some information to stdout.
get_energy(skip=0)[source]

Get mixed estimate for the energy.

Returns:(energy, error) – Mixed estimate for the energy and standard error.
Return type:tuple
get_one_rdm(skip=0)[source]

Get back-propagated estimate for the one RDM.

Returns:
run(psi=None, comm=None, verbose=True)[source]

Perform AFQMC simulation on state object using open-ended random walk.

Parameters:
  • psi (pauxy.walker.Walkers object) – Initial wavefunction / distribution of walkers.
  • comm (MPI communicator) –
setup_timers()[source]

pauxy.qmc.calc module

Helper Routines for setting up a calculation

pauxy.qmc.calc.get_driver(options, comm)[source]
pauxy.qmc.calc.init_communicator()[source]
pauxy.qmc.calc.read_input(input_file, comm, verbose=False)[source]

Helper function to parse input file and setup parallel calculation.

Parameters:
  • input_file (string) – Input filename.
  • verbose (bool) – If true print out set up information.
Returns:

  • options (dict) – Python dict of input options.
  • comm (MPI communicator) – Communicator object. If mpi4py is not installed then we return a fake communicator.

pauxy.qmc.calc.set_rng_seed(seed, comm)[source]
pauxy.qmc.calc.setup_calculation(input_options)[source]
pauxy.qmc.calc.setup_parallel(options, comm=None, verbose=False)[source]

Wrapper routine for initialising simulation

Parameters:
  • options (dict) – Input options.
  • comm (MPI communicator) – MPI communicator object.
  • verbose (bool) – If true print out set up information.
Returns:

afqmc – CPMC driver.

Return type:

pauxy.afqmc.CPMC

pauxy.qmc.options module

class pauxy.qmc.options.QMCOpts(inputs, system, verbose=False)[source]

Bases: object

Input options and certain constants / parameters derived from them.

Initialised from a dict containing the following options, not all of which are required.

Parameters:
  • method (string) – Which auxiliary field method are we using? Currently only CPMC is implemented.
  • nwalkers (int) – Number of walkers to propagate in a simulation.
  • dt (float) – Timestep.
  • nsteps (int) – Number of steps per block.
  • nmeasure (int) – Frequency of energy measurements.
  • nstblz (int) – Frequency of Gram-Schmidt orthogonalisation steps.
  • npop_control (int) – Frequency of population control.
  • temp (float) – Temperature. Currently not used.
  • nequilibrate (int) – Number of steps used for equilibration phase. Only used to fix local energy bound when using phaseless approximation.
  • importance_sampling (boolean) – Are we using importance sampling. Default True.
  • hubbard_statonovich (string) –

    Which hubbard stratonovich transformation are we using. Currently the options are:

    • discrete : Use the discrete Hirsch spin transformation.
    • opt_continuous : Use the continuous transformation for the Hubbard model.
    • generic : Use the generic transformation. To be used with Generic system class.
  • ffts (boolean) – Use FFTS to diagonalise the kinetic energy propagator? Default False. This may speed things up for larger lattices.
cplx

Do we require complex wavefunctions?

Type:boolean
mf_shift

Mean field shift for continuous Hubbard-Stratonovich transformation.

Type:float
iut_fac

Stores i*(U*dt)**0.5 for continuous Hubbard-Stratonovich transformation.

Type:complex float
ut_fac

Stores (U*dt) for continuous Hubbard-Stratonovich transformation.

Type:float
mf_nsq

Stores M * mf_shift for continuous Hubbard-Stratonovich transformation.

Type:float
local_energy_bound

Energy pound for continuous Hubbard-Stratonovich transformation.

Type:float
mean_local_energy

Estimate for mean energy for continuous Hubbard-Stratonovich transformation.

Type:float
pauxy.qmc.options.convert_from_reduced_unit(system, qmc_opts, verbose=False)[source]

Module contents