You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File [/pennylane/ops/functions/bind_new_parameters.py:221](/pennylane/ops/functions/bind_new_parameters.py#line=220), in bind_new_parameters_sprod(op, params)
218 @bind_new_parameters.register
219 def bind_new_parameters_sprod(op: SProd, params: Sequence[TensorLike]):
220 # Separate dispatch for `SProd` since its constructor has a different interface
--> 221 new_scalar = params[0]
222 params = params[1:]
223 new_base = bind_new_parameters(op.base, params)
IndexError: tuple index out of range
The above failure could be fixed by simply adding a registration to bind_new_parameters for the special Evolution behavior.
But we end up in a situation where not all numerical data can be updated and changed by bind_new_parameters. For example, bind_new_parameters is often used to convert all numerical data to numpy so it can be used with devices that can't handle interface data. If the coefficient is not considered by bind_new_parameters, we might send interface data to a device that can't handle it.
The coefficient of the generator could also be trainable. If we simply ignore the coefficient of the generator, we might not properly calculate any derivatives for it.
The text was updated successfully, but these errors were encountered:
For an
Evolution
operator where the generator has data, likeop = qml.evolve(0.5 * qml.X(0), 1.2)
, the terminal leavesWhile on its own, this violation of expectations seems relatively harmless, it causes errors when used with
bind_new_parameters
.User examples include:
The above failure could be fixed by simply adding a registration to
bind_new_parameters
for the specialEvolution
behavior.But we end up in a situation where not all numerical data can be updated and changed by
bind_new_parameters
. For example,bind_new_parameters
is often used to convert all numerical data to numpy so it can be used with devices that can't handle interface data. If the coefficient is not considered bybind_new_parameters
, we might send interface data to a device that can't handle it.The coefficient of the generator could also be trainable. If we simply ignore the coefficient of the generator, we might not properly calculate any derivatives for it.
The text was updated successfully, but these errors were encountered: