Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxiLi committed Aug 1, 2021
1 parent 9533b8d commit 4b88585
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,3 +361,11 @@ def test_pulse_dict(self):
processor = Processor(1)
processor.add_control(sigmax(), 0, label="test")
assert("test" in processor.get_pulse_dict())

def test_repeated_use_of_processor(self):
processor = Processor(1, t1=1.)
processor.add_pulse(
Pulse(sigmax(), targets=0, coeff=True))
result1 = processor.run_state(basis(2, 0), tlist=np.linspace(0, 1, 10))
result2 = processor.run_state(basis(2, 0), tlist=np.linspace(0, 1, 10))
assert_allclose(result1.states[-1].full(), result2.states[-1].full())

0 comments on commit 4b88585

Please sign in to comment.