Skip to content
Merged
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
10 changes: 0 additions & 10 deletions opensquirrel/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,6 @@ def wrapper(*args: Any, **kwargs: Any) -> Gate:
all_args = []
arg_index = 0
for par in inspect.signature(gate_generator).parameters.values():
if isinstance(par.annotation, str):
subclass_names = [subclass.__name__ for subclass in Expression.__subclasses__()]
if par.annotation not in subclass_names:
raise TypeError("Gate argument types must be expressions")
elif not issubclass(par.annotation, Expression):
raise TypeError("Gate argument types must be expressions")

if par.name in kwargs:
all_args.append(kwargs[par.name])
else:
Expand All @@ -323,9 +316,6 @@ def wrapper(*args: Any, **kwargs: Any) -> Measure:
all_args = []
arg_index = 0
for par in inspect.signature(measurement_generator).parameters.values():
if not issubclass(par.annotation, Expression):
raise TypeError("Measurement argument types must be expressions")

if par.name in kwargs:
all_args.append(kwargs[par.name])
else:
Expand Down