Skip to content

Commit 0a96bd6

Browse files
committed
rename euler integrator
1 parent 77b45f0 commit 0a96bd6

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Symplectic Integrator
22

33
```{eval-rst}
4-
.. autoclass:: simulated_bifurcation.optimizer.SymplecticIntegrator
4+
.. autoclass:: simulated_bifurcation.optimizer.EulerSymplecticIntegrator
55
:members:
66
```

src/simulated_bifurcation/optimizer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""
1616

1717
from .environment import get_env, reset_env, set_env
18-
from .integrator import SymplecticIntegrator
18+
from .integrator import EulerSymplecticIntegrator
1919
from .simulated_bifurcation_engine import SimulatedBifurcationEngine
2020
from .simulated_bifurcation_optimizer import (
2121
ConvergenceWarning,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .symplectic_integrator import SymplecticIntegrator
1+
from .euler_symplectic_integrator import EulerSymplecticIntegrator

src/simulated_bifurcation/optimizer/integrator/symplectic_integrator.py renamed to src/simulated_bifurcation/optimizer/integrator/euler_symplectic_integrator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from .abc_symplectic_integrator import ABCSymplecticIntegrator
77

88

9-
class SymplecticIntegrator(ABCSymplecticIntegrator):
9+
class EulerSymplecticIntegrator(ABCSymplecticIntegrator):
1010
"""
1111
Simulates the evolution of spins' momentum and position following the Hamiltonian quantum mechanics equations that
1212
drive the Simulated Bifurcation (SB) algorithm.

src/simulated_bifurcation/optimizer/simulated_bifurcation_optimizer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from ..core.tensor_bearer import TensorBearer
99
from .environment import ENVIRONMENT
10-
from .integrator import SymplecticIntegrator
10+
from .integrator import EulerSymplecticIntegrator
1111
from .simulated_bifurcation_engine import SimulatedBifurcationEngine
1212
from .stop_window import StopWindow
1313

@@ -130,7 +130,7 @@ def __init_window(self, matrix: torch.Tensor, early_stopping: bool) -> None:
130130
)
131131

132132
def __init_symplectic_integrator(self, matrix: torch.Tensor) -> None:
133-
self.symplectic_integrator = SymplecticIntegrator(
133+
self.symplectic_integrator = EulerSymplecticIntegrator(
134134
self.agents,
135135
self.time_step,
136136
self.pressure_slope,

tests/optimizer/test_symplectic_integrator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import pytest
44
import torch
55

6-
from src.simulated_bifurcation.optimizer import SymplecticIntegrator
6+
from src.simulated_bifurcation.optimizer import EulerSymplecticIntegrator
77

88
from ..test_utils import DEVICES, DTYPES
99

@@ -17,8 +17,8 @@ def init_integrator(
1717
device: torch.device,
1818
activation_function: Callable[[torch.Tensor], torch.Tensor],
1919
heat: bool,
20-
) -> SymplecticIntegrator:
21-
symplectic_integrator = SymplecticIntegrator(
20+
) -> EulerSymplecticIntegrator:
21+
symplectic_integrator = EulerSymplecticIntegrator(
2222
2,
2323
0.1,
2424
0.01,

0 commit comments

Comments
 (0)