pauxy.propagation package

Submodules

pauxy.propagation.generic module

class pauxy.propagation.generic.GenericContinuous(system, trial, qmc, options={}, verbose=False)[source]

Bases: object

Propagator for generic many-electron Hamiltonian.

Uses continuous HS transformation for exponential of two body operator.

Parameters:
  • options (dict) – Propagator input options.
  • qmc (pauxy.qmc.options.QMCOpts) – QMC options.
  • system (pauxy.system.System) – System object.
  • trial (pauxy.trial_wavefunctioin.Trial) – Trial wavefunction object.
  • verbose (bool) – If true print out more information during setup.
construct_VHS_fast(system, xshifted)[source]

Construct the one body potential from the HS transformation :param system: system class :param xshifted: shifited auxiliary field :type xshifted: numpy array

Returns:VHS – the HS potential
Return type:numpy array
construct_VHS_slow(system, shifted)[source]
construct_force_bias_fast(system, walker, trial)[source]

Compute optimal force bias.

Uses rotated Green’s function.

Parameters:Gmod (numpy.ndarray) – Half-rotated walker’s Green’s function.
Returns:xbar – Force bias.
Return type:numpy.ndarray
construct_force_bias_multi_det(system, walker, trial)[source]
construct_force_bias_slow(system, walker, trial)[source]

Compute optimal force bias.

Uses explicit expression.

Parameters:G (numpy.ndarray) – Walker’s Green’s function.
Returns:xbar – Force bias.
Return type:numpy.ndarray
construct_mean_field_shift(system, trial)[source]

Compute mean field shift.

\[ar{v}_n = \sum_{ik\sigma} v_{(ik),n} G_{ik\sigma}\]
construct_mean_field_shift_multi_det(system, trial)[source]
construct_one_body_propagator(system, dt)[source]

Construct mean-field shifted one-body propagator.

\[H1\]
ightarrow H1 - v0
v0_{ik} = sum_n v_{(ik),n} ar{v}_n
system : system class.
Generic system object.
dt : float
Timestep.
pauxy.propagation.generic.back_propagate_generic(phi, configs, system, nstblz, BT2, dt, store=False)[source]

Perform back propagation for RHF/UHF style wavefunction.

For use with generic system hamiltonian.

Parameters:
  • system (system object in general.) – Container for model input options.
  • psi (pauxy.walkers.Walkers object) – CPMC wavefunction.
  • trial (:class:`pauxy.trial_wavefunction.X’ object) – Trial wavefunction class.
  • nstblz (int) – Number of steps between GS orthogonalisation.
  • BT2 (numpy.ndarray) – One body propagator.
  • dt (float) – Timestep.
Returns:

psi_bp – Back propagated list of walkers.

Return type:

list of pauxy.walker.Walker objects

pauxy.propagation.generic.back_propagate_generic_bmat(system, psi, trial, nstblz)[source]

Perform back propagation for RHF/UHF style wavefunction.

pauxy.propagation.generic.construct_propagator_matrix_generic(system, BT2, config, dt, conjt=False)[source]

Construct the full projector from a configuration of auxiliary fields.

For use with generic system object.

Parameters:
  • system (class) – System class.
  • BT2 (numpy.ndarray) – One body propagator.
  • config (numpy array) – Auxiliary field configuration.
  • conjt (bool) – If true return Hermitian conjugate of matrix.
Returns:

B – Full propagator matrix.

Return type:

numpy.ndarray

pauxy.propagation.hubbard module

class pauxy.propagation.hubbard.HirschSpin(system, trial, qmc, options={}, verbose=False)[source]

Bases: object

Propagator for discrete HS transformation.

Parameters:
  • options (dict) – Propagator input options.
  • qmc (pauxy.qmc.options.QMCOpts) – QMC options.
  • system (pauxy.system.System) – System object.
  • trial (pauxy.trial_wavefunctioin.Trial) – Trial wavefunction object.
  • verbose (bool) – If true print out more information during setup.
kinetic_importance_sampling(walker, system, trial)[source]

Propagate by the kinetic term by direct matrix multiplication.

Parameters:
  • walker (pauxy.walker) – Walker object to be updated. On output we have acted on phi by B_{T/2} and updated the weight appropriately. Updates inplace.
  • system (pauxy.system.System) – System object.
  • trial (pauxy.trial_wavefunctioin.Trial) – Trial wavefunction object.
propagate_walker_constrained(walker, system, trial, eshift)[source]

Wrapper function for propagation using discrete transformation

The discrete transformation allows us to split the application of the projector up a bit more, which allows up to make use of fast matrix update routines since only a row might change.

Parameters:
  • walker (pauxy.walker object) – Walker object to be updated. On output we have acted on phi by B_V(x) and updated the weight appropriately. Updates inplace.
  • system (pauxy.system.System) – System object.
  • trial (pauxy.trial_wavefunctioin.Trial) – Trial wavefunction object.
propagate_walker_free(walker, system, trial)[source]

Propagate walker without imposing constraint.

Uses single-site updates for potential term.

Parameters:
  • walker (pauxy.walker object) – Walker object to be updated. On output we have acted on phi by B_V(x) and updated the weight appropriately. Updates inplace.
  • system (pauxy.system.System) – System object.
  • trial (pauxy.trial_wavefunctioin.Trial) – Trial wavefunction object.
two_body(walker, system, trial)[source]

Propagate by potential term using discrete HS transform.

Parameters:
  • walker (pauxy.walker object) – Walker object to be updated. On output we have acted on phi by B_V(x) and updated the weight appropriately. Updates inplace.
  • system (pauxy.system.System) – System object.
  • trial (pauxy.trial_wavefunctioin.Trial) – Trial wavefunction object.
update_greens_function_ghf(walker, trial, i, nup)[source]

Update of walker’s Green’s function for UHF walker.

Parameters:
  • walker (pauxy.walkers.SingleDet) – Walker’s wavefunction.
  • trial (pauxy.trial_wavefunction) – Trial wavefunction.
  • i (int) – Basis index.
  • nup (int) – Number of up electrons.
update_greens_function_uhf(walker, trial, i, nup)[source]

Fast update of walker’s Green’s function for RHF/UHF walker.

Parameters:
  • walker (pauxy.walkers.SingleDet) – Walker’s wavefunction.
  • trial (pauxy.trial_wavefunction) – Trial wavefunction.
  • i (int) – Basis index.
  • nup (int) – Number of up electrons.
class pauxy.propagation.hubbard.HubbardContinuous(system, trial, qmc, options={}, verbose=False)[source]

Bases: object

Propagator for continuous HS transformation, specialised for Hubbard model.

Parameters:
  • options (dict) – Propagator input options.
  • qmc (pauxy.qmc.options.QMCOpts) – QMC options.
  • system (pauxy.system.System) – System object.
  • trial (pauxy.trial_wavefunctioin.Trial) – Trial wavefunction object.
  • verbose (bool) – If true print out more information during setup.
construct_VHS(system, shifted)[source]
construct_force_bias(system, walker, trial)[source]
construct_mean_field_shift(system, trial)[source]
construct_one_body_propagator(system, dt)[source]
pauxy.propagation.hubbard.back_propagate(system, psi, trial, nstblz, BT2, dt)[source]

Perform back propagation for UHF style wavefunction.

Parameters:
  • system (system object in general.) – Container for model input options.
  • psi (pauxy.walkers.Walkers object) – CPMC wavefunction.
  • trial (:class:`pauxy.trial_wavefunction.X’ object) – Trial wavefunction class.
  • nstblz (int) – Number of steps between GS orthogonalisation.
  • BT2 (numpy.ndarray) – One body propagator.
  • dt (float) – Timestep.
Returns:

psi_bp – Back propagated list of walkers.

Return type:

list of pauxy.walker.Walker objects

pauxy.propagation.hubbard.back_propagate_ghf(system, psi, trial, nstblz, BT2, dt)[source]

Perform back propagation for GHF style wavefunction.

Parameters:
  • system (system object in general.) – Container for model input options.
  • psi (pauxy.walkers.Walkers object) – CPMC wavefunction.
  • trial (:class:`pauxy.trial_wavefunction.X’ object) – Trial wavefunction class.
  • nstblz (int) – Number of steps between GS orthogonalisation.
  • BT2 (numpy.ndarray) – One body propagator.
  • dt (float) – Timestep.
Returns:

psi_bp – Back propagated list of walkers.

Return type:

list of pauxy.walker.Walker objects

pauxy.propagation.hubbard.back_propagate_single(phi_in, configs, weights, system, nstblz, BT2, store=False)[source]

Perform back propagation for single walker.

Parameters:
  • phi_in (pauxy.walkers.Walker object) – Walker.
  • configs (numpy.ndarray) – Auxilliary field configurations.
  • weights (numpy.ndarray) – Not used. For interface consistency.
  • system (system object in general.) – Container for model input options.
  • nstblz (int) – Number of steps between GS orthogonalisation.
  • BT2 (numpy.ndarray) – One body propagator.
  • store (bool) – If true the the back propagated wavefunctions are stored along the back propagation path.
Returns:

psi_store – Back propagated list of walkers.

Return type:

list of pauxy.walker.Walker objects

pauxy.propagation.hubbard.back_propagate_single_ghf(phi, configs, weights, system, nstblz, BT2, store=False)[source]

Perform back propagation for single walker.

Parameters:
  • phi (pauxy.walkers.MultiGHFWalker object) – Walker.
  • configs (numpy.ndarray) – Auxilliary field configurations.
  • weights (numpy.ndarray) – Not used. For interface consistency.
  • system (system object in general.) – Container for model input options.
  • nstblz (int) – Number of steps between GS orthogonalisation.
  • BT2 (numpy.ndarray) – One body propagator.
  • store (bool) – If true the the back propagated wavefunctions are stored along the back propagation path.
Returns:

psi_store – Back propagated list of walkers.

Return type:

list of pauxy.walker.Walker objects

pauxy.propagation.hubbard.calculate_overlap_ratio_multi_det(walker, delta, trial, i)[source]

Calculate overlap ratio for single site update with multi-det trial.

Parameters:
  • walker (walker object) – Walker to be updated.
  • delta (numpy.ndarray) – Delta updates for single spin flip.
  • trial (trial wavefunctio object) – Trial wavefunction.
  • i (int) – Basis index.
pauxy.propagation.hubbard.calculate_overlap_ratio_multi_ghf(walker, delta, trial, i)[source]

Calculate overlap ratio for single site update with GHF trial.

Parameters:
  • walker (walker object) – Walker to be updated.
  • delta (numpy.ndarray) – Delta updates for single spin flip.
  • trial (trial wavefunctio object) – Trial wavefunction.
  • i (int) – Basis index.
pauxy.propagation.hubbard.calculate_overlap_ratio_single_det(walker, delta, trial, i)[source]

Calculate overlap ratio for single site update with UHF trial.

Parameters:
  • walker (walker object) – Walker to be updated.
  • delta (numpy.ndarray) – Delta updates for single spin flip.
  • trial (trial wavefunctio object) – Trial wavefunction.
  • i (int) – Basis index.
pauxy.propagation.hubbard.construct_propagator_matrix(system, BT2, config, conjt=False)[source]

Construct the full projector from a configuration of auxiliary fields.

For use with discrete transformation.

Parameters:
  • system (class) – System class.
  • BT2 (numpy.ndarray) – One body propagator.
  • config (numpy array) – Auxiliary field configuration.
  • conjt (bool) – If true return Hermitian conjugate of matrix.
Returns:

B – Full projector matrix.

Return type:

numpy.ndarray

pauxy.propagation.hubbard.construct_propagator_matrix_ghf(system, BT2, config, conjt=False)[source]

Construct the full projector from a configuration of auxiliary fields.

For use with GHF trial wavefunction.

Parameters:
  • system (class) – System class.
  • BT2 (numpy.ndarray) – One body propagator.
  • config (numpy array) – Auxiliary field configuration.
  • conjt (bool) – If true return Hermitian conjugate of matrix.
Returns:

B – Full projector matrix.

Return type:

numpy.ndarray

pauxy.propagation.hubbard.kinetic_kspace(phi, system, btk)[source]

Apply the kinetic energy projector in kspace.

May be faster for very large dilute lattices.

Parameters:
  • phi (pauxy.walkers.MultiGHFWalker object) – Walker.
  • system (system object in general.) – Container for model input options.
  • B (numpy.ndarray) – One body propagator.

pauxy.propagation.operations module

pauxy.propagation.operations.kinetic_ghf(phi, system, bt2)[source]

Propagate by the kinetic term by direct matrix multiplication.

For use with the GHF trial wavefunction.

Parameters:
  • walker (pauxy.walker.Walker) – Walker object to be updated. on output we have acted on \(|\phi_i\rangle\) by \(B_{T/2}\) and updated the weight appropriately. updates inplace.
  • state (pauxy.state.State) – Simulation state.
pauxy.propagation.operations.kinetic_real(phi, system, bt2, H1diag=False)[source]

Propagate by the kinetic term by direct matrix multiplication.

For use with the continuus algorithm and free propagation.

todo : this is the same a propagating by an arbitrary matrix, remove.

Parameters:
  • walker (pauxy.walker.Walker) – Walker object to be updated. on output we have acted on \(|\phi_i\rangle\) by \(B_{T/2}\) and updated the weight appropriately. updates inplace.
  • state (pauxy.state.State) – Simulation state.
pauxy.propagation.operations.local_energy_bound(local_energy, mean, threshold)[source]

Try to suppress rare population events by imposing local energy bound.

See: Purwanto et al., Phys. Rev. B 80, 214116 (2009).

Parameters:
  • local_energy (float) – Local energy of current walker
  • mean (float) – Mean value of local energy about which we impose the threshold / bound.
  • threshold (float) – Amount of lee-way for energy fluctuations about the mean.
pauxy.propagation.operations.propagate_potential_auxf(phi, state, field_config)[source]

Propagate walker given a fixed set of auxiliary fields.

Useful for debugging.

Parameters:
  • phi (numpy.ndarray) – Walker’s slater determinant to be updated.
  • state (pauxy.state.State) – Simulation state.
  • field_config (numpy array) – Auxiliary field configurations to apply to walker.
pauxy.propagation.operations.propagate_single(psi, system, B)[source]

Perform backpropagation for single configuration.

Deals with GHF and RHF/UHF walkers.

Parameters:
  • phi (walker object) – Walker.
  • system (system object in general.) – Container for model input options.
  • B (numpy.ndarray) – Propagator matrix.

pauxy.propagation.utils module

Routines for performing propagation of a walker

pauxy.propagation.utils.get_discrete_propagator(options, qmc, system, trial, verbose=False)[source]

Wrapper to select propagator class.

Parameters:
  • options (dict) – Propagator input options.
  • qmc (pauxy.qmc.QMCOpts class) – Trial wavefunction input options.
  • system (class) – System class.
  • trial (class) – Trial wavefunction object.
Returns:

propagator – Propagator object.

Return type:

class or None

pauxy.propagation.utils.get_propagator_driver(system, trial, qmc, options={}, verbose=False)[source]

Module contents