Closed bqth29 closed 11 months ago
Patch coverage is 100.00%
of modified lines.
Files Changed | Coverage |
---|---|
...furcation/polynomial/ising_polynomial_interface.py | 100.00% |
src/tests/test_spin_polynomial.py | 100.00% |
:loudspeaker: Thoughts on this report? Let us know!.
PR Description
Inspired by PyTorch API, the
IsingPolynomialInterface
, and thus all the polynomials (spin, binary, integer) provided by the package have ato(device: torch.device, dtype: torch.dtype)
method to convert its tensors dtype and change the computation device in place.New features
IsingPolynomialInterface.to(device: torch.device, dtype: torch.dtype)
method to change the dtype and computation device in place (both arguments are optional)