Skip to content

Commit 8b42865

Browse files
committed
fixed a bug related to passing on the ctrl_method keyword through custom_control
1 parent f0125d3 commit 8b42865

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/qrisp/environments/custom_control_environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def adaptive_control_function(*args, **kwargs):
167167

168168
# Check whether the function supports the ctrl_method kwarg and adjust
169169
# the kwargs accordingly
170-
if "ctrl_method" in list(inspect.getargspec(func))[0]:
170+
if "ctrl_method" in list(inspect.getargspec(func))[0] and isinstance(env, ControlEnvironment):
171171
kwargs.update({"ctrl_method" : env.ctrl_method})
172172

173173

0 commit comments

Comments
 (0)