-
Notifications
You must be signed in to change notification settings - Fork 603
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix - conversions in _copy_and_shift_params (#4477)
* Comment qml.math.cast_like. * Cast to float64 _copy_and_shift_params. * convert/cast new_params[p_idx] * Cast new_params to float64. * Add test for qml.gradients.param_shift when inputting integer parameters. * Fix import_should_record_backprop. * Fix cast and update _copy_and_shift_params. * Unwrap before casting. * Skip autograd astype. * Revert general_shift_rules.py to master. * Skip conversion for integral types. * Test more types in test_integer_parameters. * Update changelog. * Update tests/gradients/parameter_shift/test_parameter_shift.py Co-authored-by: Christina Lee <christina@xanadu.ai> * Update pennylane/gradients/general_shift_rules.py Co-authored-by: Christina Lee <christina@xanadu.ai> * Reformat * Fix TF test. * Revert to numbers.Integral solution. * no cover import_should_record_backprop --------- Co-authored-by: Christina Lee <christina@xanadu.ai>
- Loading branch information
Showing
4 changed files
with
45 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters