Skip to content

Commit 2047148

Browse files
authored
Fix chemistry mypy error (#938)
* Fix mypy error. * Fix type error?
1 parent 49fe6b8 commit 2047148

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

qualtran/bloqs/chemistry/sparse/sparse_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ def keep_qrom(bloq):
7676
if isinstance(k, SelectSwapQROM):
7777
qrom_bloq = k
7878
break
79-
return qrom_bloq.call_graph()[1][TGate()]
79+
if qrom_bloq is None:
80+
return 0
81+
return int(qrom_bloq.call_graph()[1].get(TGate(), 0))
8082

8183

8284
@pytest.mark.slow

0 commit comments

Comments
 (0)