Skip to content

Commit

Permalink
updated HamiltonianModel tests to not look for off diagonal warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DanPuzzuoli committed Jan 30, 2020
1 parent a9ece89 commit 2ac0f02
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions test/terra/openpulse/test_system_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,7 @@ def test_eigen_sorting(self):
'vars': {'a': 100, 'b': 32.1, 'c' : 0.12},
'qub': {'0': 2}}

# construc the model, verify the off-diagonal warning is thrown
# test that it gives a warning when a key has no corresponding control channel
with warnings.catch_warnings(record=True) as w:
# Cause all warnings to always be triggered.
warnings.simplefilter("always")

ham_model = HamiltonianModel.from_dict(simple_ham)

self.assertEqual(len(w), 1)
self.assertTrue('minimum overlap' in str(w[-1].message))
ham_model = HamiltonianModel.from_dict(simple_ham)

# check norm
for estate in ham_model._estates:
Expand Down

0 comments on commit 2ac0f02

Please sign in to comment.