Skip to content

Commit

Permalink
[test] Fix evolve test repeatability issue (NVIDIA#2496)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmhowe23 authored Jan 8, 2025
1 parent 0ed9251 commit c5c9361
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/tests/operator/test_evolve_simulators.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,9 @@ def do_something():


def test_evolve():
# Set random seed for shots-based observe test.
cudaq.set_random_seed(13)

# Qubit Hamiltonian
hamiltonian = 2 * np.pi * 0.1 * spin.x(0)

Expand Down Expand Up @@ -242,6 +245,9 @@ def test_evolve():


def test_evolve_async():
# Set random seed for shots-based observe test.
cudaq.set_random_seed(13)

# Qubit Hamiltonian
hamiltonian = 2 * np.pi * 0.1 * spin.x(0)

Expand Down

0 comments on commit c5c9361

Please sign in to comment.