Skip to content

Commit

Permalink
add tests to check obs_sharing_wires and id are empty when not initia…
Browse files Browse the repository at this point in the history
…lized
  • Loading branch information
EmilianoG-byte committed May 17, 2024
1 parent 94bff85 commit 6fb4498
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/tape/test_qscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ def test_no_update_empty_initialization(self):
assert qs.batch_size is None
assert qs._obs_sharing_wires is None
assert qs._obs_sharing_wires_id is None
assert qs.obs_sharing_wires == []
assert qs.obs_sharing_wires_id == []
assert qs.wires == qml.wires.Wires([])
assert qs.num_wires == 0
assert qs.samples_computational_basis is False
assert len(qs.obs_sharing_wires) == 0
assert len(qs.obs_sharing_wires_id) == 0

def test_empty_sharing_wires(self):
"""Test public sharing wires and id are empty lists if nothing is provided"""
qs = QuantumScript()
assert qs.obs_sharing_wires == []

qs = QuantumScript()
assert qs.obs_sharing_wires_id == []

@pytest.mark.parametrize(
"ops",
Expand Down

0 comments on commit 6fb4498

Please sign in to comment.