qmctorch.wavefunction.orbitals.backflow package

Subpackages

Submodules

qmctorch.wavefunction.orbitals.backflow.backflow_transformation module

class qmctorch.wavefunction.orbitals.backflow.backflow_transformation.BackFlowTransformation(*args: Any, **kwargs: Any)[source]

Bases: Module

Transform the electorn coordinates into backflow coordinates.

see : Orbital-dependent backflow wave functions for real-space quantum Monte Carlo https://arxiv.org/abs/1910.07167

eq i} eta(r_{ij})(bold{r}_i - bold{r}_j)

forward(pos: torch.Tensor, derivative: int | None = 0) torch.Tensor[source]
fit_kernel(lambda_func: Callable, xmin: float = 0.01, xmax: float = 1.0, npts: int = 100, lr: float = 0.001, num_epochs: int = 1000) Tuple[torch.Tensor, torch.Tensor, torch.Tensor][source]

Fit the backflow kernel to a given function.

Parameters:
  • lambda_func (Callable) – function to be fit

  • xmin (float) – minimum x value

  • xmax (float) – maximum x value

  • npts (int) – number of points to sample in the interval [xmin, xmax]

  • lr (float) – learning rate

  • num_epochs (int) – number of epochs to run the optimization

Returns:

x values used for fitting ground_truth (torch.tensor): y values of the given function fit_values (torch.tensor): y values of the fit function

Return type:

xpts (torch.tensor)

Module contents

class qmctorch.wavefunction.orbitals.backflow.BackFlowTransformation(*args: Any, **kwargs: Any)[source]

Bases: Module

Transform the electorn coordinates into backflow coordinates.

see : Orbital-dependent backflow wave functions for real-space quantum Monte Carlo https://arxiv.org/abs/1910.07167

eq i} eta(r_{ij})(bold{r}_i - bold{r}_j)

forward(pos: torch.Tensor, derivative: int | None = 0) torch.Tensor[source]
fit_kernel(lambda_func: Callable, xmin: float = 0.01, xmax: float = 1.0, npts: int = 100, lr: float = 0.001, num_epochs: int = 1000) Tuple[torch.Tensor, torch.Tensor, torch.Tensor][source]

Fit the backflow kernel to a given function.

Parameters:
  • lambda_func (Callable) – function to be fit

  • xmin (float) – minimum x value

  • xmax (float) – maximum x value

  • npts (int) – number of points to sample in the interval [xmin, xmax]

  • lr (float) – learning rate

  • num_epochs (int) – number of epochs to run the optimization

Returns:

x values used for fitting ground_truth (torch.tensor): y values of the given function fit_values (torch.tensor): y values of the fit function

Return type:

xpts (torch.tensor)

class qmctorch.wavefunction.orbitals.backflow.BackFlowKernelBase(*args: Any, **kwargs: Any)[source]

Bases: Module

Compute the back flow kernel, i.e. the function f(rij) where rij is the distance between electron i and j This kernel is used in the backflow transformation .. math:

q_i = r_i + sum_{jneq i} f(r_{ij}) (r_i-r_j)

forward(ree: torch.Tensor, derivative: int = 0) torch.Tensor[source]
Computes the desired values of the kernel
Args:

ree (torch.tensor): e-e distance Nbatch x Nelec x Nelec derivative (int): derivative requried 0, 1, 2

Returns:

f(r) Nbatch x Nelec x Nelec

Return type:

torch.tensor

class qmctorch.wavefunction.orbitals.backflow.BackFlowKernelAutoInverse(*args: Any, **kwargs: Any)[source]

Bases: BackFlowKernelBase

Compute the back flow kernel, i.e. the function f(rij) where rij is the distance between electron i and j This kernel is used in the backflow transformation .. math:

q_i = r_i + sum_{jneq i} f(r_{ij}) (r_i-r_j)

class qmctorch.wavefunction.orbitals.backflow.BackFlowKernelFullyConnected(*args: Any, **kwargs: Any)[source]

Bases: BackFlowKernelBase

Compute the back flow kernel, i.e. the function f(rij) where rij is the distance between electron i and j This kernel is used in the backflow transformation .. math:

q_i = r_i + sum_{jneq i} f(r_{ij}) (r_i-r_j)

class qmctorch.wavefunction.orbitals.backflow.BackFlowKernelInverse(*args: Any, **kwargs: Any)[source]

Bases: BackFlowKernelBase

Compute the back flow kernel, i.e. the function f(rij) where rij is the distance between electron i and j This kernel is used in the backflow transformation .. math:

q_i = r_i + sum_{jneq i} f(r_{ij}) (r_i-r_j)

with here :

class qmctorch.wavefunction.orbitals.backflow.BackFlowKernelPowerSum(*args: Any, **kwargs: Any)[source]

Bases: BackFlowKernelBase

Compute the back flow kernel, i.e. the function f(rij) where rij is the distance between electron i and j This kernel is used in the backflow transformation .. math:

q_i = r_i + sum_{jneq i} f(r_{ij}) (r_i-r_j)

class qmctorch.wavefunction.orbitals.backflow.BackFlowKernelSquare(*args: Any, **kwargs: Any)[source]

Bases: BackFlowKernelBase

Define a generic kernel to test the auto diff features.