Skip to content

Commit

Permalink
test batchsize and reshape necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles MOUSSA committed Nov 15, 2024
1 parent 64fa4ed commit 7f4adb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyqtorch/hamiltonians/evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def Ht(t: torch.Tensor) -> torch.Tensor:
options={"use_sparse": self.use_sparse},
)
# Retrieve the last density matrix
state = sol.states[-1]
state = sol.states[-1].reshape(state.shape)
return state

def forward(
Expand Down
1 change: 1 addition & 0 deletions tests/test_analog.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@ def test_timedependent(
"batchsize",
[
1,
3,
],
)
def test_timedependent_with_noise(
Expand Down

0 comments on commit 7f4adb3

Please sign in to comment.