Skip to content

Commit

Permalink
Even more print statements
Browse files Browse the repository at this point in the history
  • Loading branch information
pmenczel committed Nov 26, 2024
1 parent 3bc96ad commit 51436d2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os: []
# Test other versions of Python in special cases to avoid exploding the
# matrix size; make sure to test all supported versions in some form.
python-version: ["3.11"]
Expand Down
5 changes: 5 additions & 0 deletions qutip/solver/integrator/scipy_integrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ def set_state(self, t, state0):
state0.to_array().ravel().view(np.float64),
t
)
print(self._ode_solver._y)
print(self._ode_solver.y)
print(' --- --- ')

Expand Down Expand Up @@ -447,7 +448,11 @@ def _one_step(self, t):
if t > self._front and t_ode >= self._front:
# The state is at self._front, do a step
self._back = self.get_state()
print(' --- THERE --- ')
print(self._ode_solver._y)
print(self._ode_solver.y)
self._ode_solver.integrate(min(self._front + safe_delta, t))
print(' --- --- ')
self._front = self._ode_solver._integrator.rwork[12]
# We asked for a fraction of a step, now complete it.
self._ode_solver.integrate(min(self._front, t))
Expand Down
2 changes: 2 additions & 0 deletions qutip/tests/solver/test_mcsolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,9 @@ def test_MCSolver_stepping():
H = qutip.num(size)
solver = MCSolver(H, a)
solver.start(qutip.basis(size, size-1), 0, seed=0)
print('a', solver.integrator._ode_solver._y)
solver.options = {'method': 'lsoda'}
print('b', solver.integrator._ode_solver._y)
state = solver.step(1)
assert qutip.expect(qutip.qeye(size), state) == pytest.approx(1)
assert qutip.expect(qutip.num(size), state) == pytest.approx(size - 1)
Expand Down

0 comments on commit 51436d2

Please sign in to comment.