Skip to content

Commit

Permalink
added num_executions testcase (#197)
Browse files Browse the repository at this point in the history
* added testcase

* Update tests/test_qiskit_device.py

Co-authored-by: antalszava <[email protected]>

Co-authored-by: antalszava <[email protected]>
  • Loading branch information
puzzleshark and antalszava authored Mar 14, 2022
1 parent 544d27a commit 1a61ba1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_qiskit_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,10 @@ def test_result_empty_tape(self, device, tol):
dev.reset()
assert len(res) == 3
assert np.allclose(res[0], dev.execute(empty_tape), atol=0)

def test_num_executions_recorded(self, device):
"""Tests that the number of exeuctions are recorded correctly.."""
dev = device(2)
tapes = [self.tape1, self.tape2]
res = dev.batch_execute(tapes)
assert dev.num_executions == 2

0 comments on commit 1a61ba1

Please sign in to comment.