expand_invalid_trainable_hadamard_gradient(tape, depth=10, **kwargs)¶
Expand out a tape so that it supports differentiation of requested operations with the Hadamard test gradient.
This is achieved by decomposing all trainable operations that are not in the Hadamard compatible list until all resulting operations are in the list 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