expand_invalid_trainable(tape, depth=10, **kwargs)¶
Expand out a tape so that it supports differentiation of requested operations.
This is achieved by decomposing all trainable operations that have
Operation.grad_method=Noneuntil all resulting operations have a defined gradient method, up to maximum depth
depth. Note that this might not be possible, in which case the gradient rule will fail to apply.
- What is PennyLane?
- Quantum circuits
- Gradients and training
- Quantum operators
- Inspecting circuits
- Compiling circuits
- Quantum Chemistry
- Quantum Datasets
- QNode returns
- Decorators and utility functions
- Transforms for error mitigation
- Transforms core