Skip to content

Commit

Permalink
[testing] Update passing tests (NVIDIA#2444)
Browse files Browse the repository at this point in the history
Multiple qubit and qvector allocations and measurements are supported on the `braket` target with changes from PR# 2416. Hence, two of the tests work without raising error(s) - mark them as such.

Signed-off-by: Pradnya Khalate <[email protected]>
  • Loading branch information
khalatepradnya authored Dec 3, 2024
1 parent c9d0e4c commit 3e931d8
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions python/tests/backends/test_braket.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def kernel():
mz(q0)
mz(q1)

with pytest.raises(RuntimeError) as e:
cudaq.sample(kernel, shots_count=100)
assert "cannot declare a qubit register. Only 1 qubit register(s) is/are supported" in repr(
e)
counts = cudaq.sample(kernel, shots_count=100)
assert len(counts) == 2
assert "00" in counts
assert "11" in counts


def test_qvector_kernel():
Expand Down Expand Up @@ -129,10 +129,8 @@ def kernel():
h(ancilla)
mz(ancilla)

with pytest.raises(RuntimeError) as e:
cudaq.sample(kernel, shots_count=100)
assert "cannot declare a qubit register. Only 1 qubit register(s) is/are supported" in repr(
e)
# Test here is that this runs
cudaq.sample(kernel, shots_count=100).dump()


def test_control_modifier():
Expand Down

0 comments on commit 3e931d8

Please sign in to comment.