-
Notifications
You must be signed in to change notification settings - Fork 233
Open
Description
Hello,
It seems that the qnn.py
script in chapter 9 is broken for Cirq versions v0.11.0 and further, as per the release notes here, notably:
If you have old gate implementations with
_resolve_parameter
that doesn't support therecursive
parameter, you will get an error message:TypeError: _resolve_parameters_() takes 2 positional arguments but 3 were given
, you will need to add support for therecursive:bool
parameter
Solution
The script can be solved by:
- line 36 -- adding
recursive=True
as an argument todef _resolve_parameters_(self, param_resolver):
- line 79 -- replacing
wf = result.final_state
withwf = result.final_state_vector
I can submit a pull request unless you have specified somewhere you're using a Cirq version older than the v0.11.0.
Best regards,
Quentin
Metadata
Metadata
Assignees
Labels
No labels