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
Traceback (most recent call last):
File "/home/chae-yeun/work/Xanadu/pennylane-tests/test_qubit_unitary.py", line 20, in <module>
print(grad(params))
File "/home/chae-yeun/work/Xanadu/pennylane/pennylane/_grad.py", line 115, in __call__
grad_value, ans = grad_fn(*args, **kwargs)
File "/home/chae-yeun/work/Xanadu/devel/lib/python3.10/site-packages/autograd/wrap_util.py", line 20, in nary_f
return unary_operator(unary_f, x, *nary_op_args, **nary_op_kwargs)
File "/home/chae-yeun/work/Xanadu/pennylane/pennylane/_grad.py", line 133, in _grad_with_forward
vjp, ans = _make_vjp(fun, x)
File "/home/chae-yeun/work/Xanadu/devel/lib/python3.10/site-packages/autograd/core.py", line 10, in make_vjp
end_value, end_node = trace(start_node, fun, x)
File "/home/chae-yeun/work/Xanadu/devel/lib/python3.10/site-packages/autograd/tracer.py", line 10, in trace
end_box = fun(start_box)
File "/home/chae-yeun/work/Xanadu/devel/lib/python3.10/site-packages/autograd/wrap_util.py", line 15, in unary_f
return fun(*subargs, **kwargs)
File "/home/chae-yeun/work/Xanadu/pennylane/pennylane/qnode.py", line 867, in __call__
res = qml.execute(
File "/home/chae-yeun/work/Xanadu/pennylane/pennylane/interfaces/execution.py", line 483, in execute
res = _execute(
File "/home/chae-yeun/work/Xanadu/pennylane/pennylane/interfaces/autograd.py", line 326, in execute
return _execute(
File "/home/chae-yeun/work/Xanadu/devel/lib/python3.10/site-packages/autograd/tracer.py", line 44, in f_wrapped
ans = f_wrapped(*argvals, **kwargs)
File "/home/chae-yeun/work/Xanadu/devel/lib/python3.10/site-packages/autograd/tracer.py", line 48, in f_wrapped
return f_raw(*args, **kwargs)
File "/home/chae-yeun/work/Xanadu/pennylane/pennylane/interfaces/autograd.py", line 370, in _execute
res, jacs = execute_fn(unwrapped_tapes, **gradient_kwargs)
File "/usr/lib/python3.10/contextlib.py", line 79, in inner
return func(*args, **kwds)
File "/home/chae-yeun/work/Xanadu/pennylane/pennylane/_device.py", line 571, in execute_and_gradients
jacs.append(gradient_method(circuit, **kwargs))
File "/home/chae-yeun/work/Xanadu/pennylane-lightning/pennylane_lightning/lightning_qubit.py", line 603, in adjoint_jacobian
jac = adjoint_diff.adjoint_jacobian(
IndexError: _Map_base::at
Partially, the problem is that 3-qubit QubitUnitary does not have proper decomposition. Still, it is also possible to support (non-trainable) QubitUnitary in Lightning as we anyway support it in the forward path (by obtaining the matrix and apply it using e.g. applyMultiQubitOp defined in the LM kernel).
Thus I think we need to decide whether we want to support those operations in adjoint-diff path in Lightning or raise a proper error in the Python layer.
The text was updated successfully, but these errors were encountered:
The following code now raises an error from C++ layer:
Here's the full output:
Partially, the problem is that 3-qubit
QubitUnitary
does not have proper decomposition. Still, it is also possible to support (non-trainable)QubitUnitary
in Lightning as we anyway support it in the forward path (by obtaining the matrix and apply it using e.g.applyMultiQubitOp
defined in the LM kernel).Thus I think we need to decide whether we want to support those operations in adjoint-diff path in Lightning or raise a proper error in the Python layer.
The text was updated successfully, but these errors were encountered: