Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions python/tests/backends/test_tii.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,21 @@ def kernel():
assert '00' in counts


def test_toffoli():

@cudaq.kernel
def kernel():
q = cudaq.qvector(3)
x(q)
x.ctrl([q[0], q[1]], q[2])
mz(q)

counts = cudaq.sample(kernel, shots_count=SHOTS)
counts.dump()
assert '110' in counts
assert len(counts) == 1


# leave for gdb debugging
if __name__ == "__main__":
loc = os.path.abspath(__file__)
Expand Down
Loading