pauxy.walkers package

Submodules

pauxy.walkers.handler module

class pauxy.walkers.handler.Walkers(walker_opts, system, trial, qmc, verbose=False, comm=None, nprop_tot=None, nbp=None)[source]

Bases: object

Container for groups of walkers which make up a wavefunction.

Parameters:
  • system (object) – System object.
  • trial (object) – Trial wavefunction object.
  • nwalkers (int) – Number of walkers to initialise.
  • nprop_tot (int) – Total number of propagators to store for back propagation + itcf.
  • nbp (int) – Number of back propagation steps.
add_field_config(nprop_tot, nbp, system, dtype)[source]

Add FieldConfig object to walker object.

Parameters:
  • nprop_tot (int) – Total number of propagators to store for back propagation + itcf.
  • nbp (int) – Number of back propagation steps.
  • nfields (int) – Number of fields to store for each back propagation step.
  • dtype (type) – Field configuration type.
comb(comm, weights)[source]

Apply the comb method of population control / branching.

See Booth & Gubernatis PRE 80, 046704 (2009).

Parameters:comm (MPI communicator) –
copy_bp_wfn(phi_bp)[source]

Copy back propagated wavefunction.

Parameters:phi_bp (object) – list of walker objects containing back propagated walkers.
copy_historic_wfn()[source]

Copy current wavefunction to psi_n for next back propagation step.

copy_init_wfn()[source]

Copy current wavefunction to initial wavefunction.

The definition of the initial wavefunction depends on whether we are calculating an ITCF or not.

get_write_buffer(i)[source]
orthogonalise(trial, free_projection)[source]

Orthogonalise all walkers.

Parameters:
  • trial (object) – Trial wavefunction object.
  • free_projection (bool) – True if doing free projection.
pair_branch(comm)[source]
pop_control(comm)[source]
read_walkers(comm)[source]
recompute_greens_function(trial, time_slice=None)[source]
reset(trial)[source]
set_total_weight(total_weight)[source]
set_walker_from_buffer(i, buff)[source]
write_walkers(comm)[source]

pauxy.walkers.multi_ghf module

class pauxy.walkers.multi_ghf.MultiGHFWalker(walker_opts, system, trial, index=0, weights='zeros', wfn0='init')[source]

Bases: object

Multi-GHF style walker.

Parameters:
  • weight (int) – Walker weight.
  • system (object) – System object.
  • trial (object) – Trial wavefunction object.
  • index (int) – Element of trial wavefunction to initalise walker to.
  • weights (string) – Initialise weights to zeros or ones.
  • wfn0 (string) – Initial wavefunction.
calc_otrial(trial)[source]

Caculate overlap with trial wavefunction.

Parameters:trial (object) – Trial wavefunction object.
Returns:ot – Overlap.
Return type:float / complex
greens_function(trial)[source]

Compute walker’s green’s function.

Parameters:trial (object) – Trial wavefunction object.
inverse_overlap(trial)[source]

Compute inverse overlap matrix from scratch.

Parameters:trial (numpy.ndarray) – Trial wavefunction.
local_energy(system, two_rdm=None)[source]

Compute walkers local energy

Parameters:system (object) – System object.
Returns:(E, T, V) – Mixed estimates for walker’s energy components.
Return type:tuple
reortho(trial)[source]

Update overlap.

Parameters:
  • probs (numpy.ndarray) – Probabilities for chosing particular field configuration.
  • xi (int) – Chosen field configuration.
  • coeffs (numpy.ndarray) – Trial wavefunction coefficients. For interface consistency.
update_inverse_overlap(trial, vtup, vtdown, i)[source]

Update inverse overlap matrix given a single row update of walker.

Parameters:
  • trial (object) – Trial wavefunction object.
  • vtup (numpy.ndarray) – Update vector for spin up sector.
  • vtdown (numpy.ndarray) – Update vector for spin down sector.
  • i (int) – Basis index.
update_overlap(probs, xi, coeffs)[source]

Update overlap.

Parameters:
  • probs (numpy.ndarray) – Probabilities for chosing particular field configuration.
  • xi (int) – Chosen field configuration.
  • coeffs (numpy.ndarray) – Trial wavefunction coefficients. For interface consistency.

pauxy.walkers.single_det module

class pauxy.walkers.single_det.SingleDetWalker(walker_opts, system, trial, index=0, nprop_tot=None, nbp=None)[source]

Bases: object

UHF style walker.

Parameters:
  • weight (int) – Walker weight.
  • system (object) – System object.
  • trial (object) – Trial wavefunction object.
  • index (int) – Element of trial wavefunction to initalise walker to.
calc_otrial(trial)[source]

Caculate overlap with trial wavefunction.

Parameters:trial (object) – Trial wavefunction object.
Returns:ot – Overlap.
Return type:float / complex
get_buffer()[source]

Get walker buffer for MPI communication

Returns:buff – Relevant walker information for population control.
Return type:dict
greens_function(trial)[source]

Compute walker’s green’s function.

Also updates walker’s inverse overlap.

Parameters:trial (object) – Trial wavefunction object.
inverse_overlap(trial)[source]

Compute inverse overlap matrix from scratch.

Parameters:trial (numpy.ndarray) – Trial wavefunction.
local_energy(system, two_rdm=None)[source]

Compute walkers local energy

Parameters:system (object) – System object.
Returns:(E, T, V) – Mixed estimates for walker’s energy components.
Return type:tuple
reortho(trial)[source]

reorthogonalise walker.

Parameters:trial (object) – trial wavefunction object. for interface consistency.
reortho_excite(trial)[source]

reorthogonalise walker.

Parameters:trial (object) – trial wavefunction object. for interface consistency.
rotated_greens_function()[source]

Compute “rotated” walker’s green’s function.

Green’s function without trial wavefunction multiplication.

Parameters:trial (object) – Trial wavefunction object.
set_buffer(buff)[source]

Set walker buffer following MPI communication

Parameters:buff (dict) – Relevant walker information for population control.
update_inverse_overlap(trial, vtup, vtdown, i)[source]

Update inverse overlap matrix given a single row update of walker.

Parameters:
  • trial (object) – Trial wavefunction object.
  • vtup (numpy.ndarray) – Update vector for spin up sector.
  • vtdown (numpy.ndarray) – Update vector for spin down sector.
  • i (int) – Basis index.
update_overlap(probs, xi, coeffs)[source]

Update overlap.

Parameters:
  • probs (numpy.ndarray) – Probabilities for chosing particular field configuration.
  • xi (int) – Chosen field configuration.
  • coeffs (numpy.ndarray) – Trial wavefunction coefficients. For interface consistency.

Module contents