Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ wheels/
*.egg-info

# Virtual environments
.venv
/.venv

# Models
/models
Expand All @@ -17,3 +17,6 @@ wheels/

# Worktrees
/worktree

# IDE
/.vscode
8 changes: 0 additions & 8 deletions qmp/hamiltonian/hamiltonian.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"""

import os
import typing
import platformdirs
import torch
import torch.utils.cpp_extension
Expand Down Expand Up @@ -153,9 +152,6 @@ def apply_within(
A tensor of shape [batch_size_j] representing the output amplitudes on the given configurations.
"""
self._prepare_data(configs_i.device)
_apply_within: typing.Callable[
[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor], torch.Tensor
]
_apply_within = getattr(
self._load_module(configs_i.device.type, configs_i.size(1), self.particle_cut),
"apply_within",
Expand Down Expand Up @@ -195,9 +191,6 @@ def find_relative(
if configs_exclude is None:
configs_exclude = configs_i
self._prepare_data(configs_i.device)
_find_relative: typing.Callable[
[torch.Tensor, torch.Tensor, int, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor], torch.Tensor
]
_find_relative = getattr(
self._load_module(configs_i.device.type, configs_i.size(1), self.particle_cut),
"find_relative",
Expand Down Expand Up @@ -258,7 +251,6 @@ def diagonal_term(self, configs: torch.Tensor) -> torch.Tensor:
A complex64 tensor of shape [batch_size] representing the diagonal term of the Hamiltonian for the given configurations.
"""
self._prepare_data(configs.device)
_diagonal_term: typing.Callable[[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor], torch.Tensor]
_diagonal_term = getattr(
self._load_module(configs.device.type, configs.size(1), self.particle_cut),
"diagonal_term",
Expand Down