Skip to content

Commit

Permalink
Merge pull request #2419 from Ericgig/misc.better_stoc_test
Browse files Browse the repository at this point in the history
More stable run_from_experiment test
  • Loading branch information
Ericgig committed May 8, 2024
2 parents e92f82b + 8304a3a commit d8c6584
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qutip/tests/solver/test_stochastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ def func(t, A, W):
)]
psi0 = basis(N, N-3)

times = np.linspace(0, 10, 101)
options = {"map": "serial", "dt": 0.001}
times = np.linspace(0, 2, 101)
options = {"map": "serial", "dt": 0.0005}

solver = SMESolver(H, sc_ops=sc_ops, heterodyne=False, options=options)
results = solver.run(psi0, times, e_ops=[num(N)], ntraj=ntraj)
Expand Down Expand Up @@ -419,13 +419,13 @@ def test_small_step_warnings(method):
@pytest.mark.parametrize("method", ["euler", "platen"])
@pytest.mark.parametrize("heterodyne", [True, False])
def test_run_from_experiment_close(method, heterodyne):
N = 10
N = 5

H = num(N)
a = destroy(N)
sc_ops = [a, a @ a + (a @ a).dag()]
psi0 = basis(N, N-1)
tlist = np.linspace(0, 0.1, 251)
tlist = np.linspace(0, 0.1, 501)
options = {
"store_measurement": "start",
"dt": tlist[1],
Expand Down

0 comments on commit d8c6584

Please sign in to comment.