Skip to content

Commit

Permalink
use @no_type_check
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Jun 10, 2024
1 parent b3e341a commit 8089014
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tket2-py/test/test_guppy.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import no_type_check
from tket2.circuit import Tk2Circuit

import math
Expand All @@ -14,17 +15,18 @@ def test_load_compiled_module():
module.load(quantum)

@guppy(module)
@no_type_check
def my_func(
q0: qubit,
q1: qubit,
) -> tuple[bool,]:
q0 = phased_x(q0, py(math.pi / 2), py(-math.pi / 2)) # type: ignore
q0 = rz(q0, py(math.pi)) # type: ignore
q1 = phased_x(q1, py(math.pi / 2), py(-math.pi / 2)) # type: ignore
q1 = rz(q1, py(math.pi)) # type: ignore
q0, q1 = zz_max(q0, q1) # type: ignore
_ = measure(q0) # type: ignore
return (measure(q1),) # type: ignore
q0 = phased_x(q0, py(math.pi / 2), py(-math.pi / 2))
q0 = rz(q0, py(math.pi))
q1 = phased_x(q1, py(math.pi / 2), py(-math.pi / 2))
q1 = rz(q1, py(math.pi))
q0, q1 = zz_max(q0, q1)
_ = measure(q0)
return (measure(q1),)

Check warning on line 29 in tket2-py/test/test_guppy.py

View check run for this annotation

Codecov / codecov/patch

tket2-py/test/test_guppy.py#L23-L29

Added lines #L23 - L29 were not covered by tests

# Compile the module, and convert it to a JSON string
hugr = module.compile()
Expand Down

0 comments on commit 8089014

Please sign in to comment.