Open KetpuntoG opened 2 months ago
@KetpuntoG have you tried with master? Might. have different behavior with the new device interface.
@albi3ro This happens because lightning.qubit
and default.qubit
use different stopping conditions. DQ decomposes until all ops have a matrix. In contrast, LQ decomposes until all decomposed ops are in the list of supported ops, so AmplitudeEmbedding
decomposes to StatePrep
, and does not get decomposed again. We need to update the decomposition logic to accommodate state prep ops in the middle of a circuit, but the stopping conditions do not currently account for operation index. I can add a new decomposition transform to lightning.qubit
to use during preprocessing which does this, but it's going to be almost identical to pennylane.qubit.preprocess.decompose
(which is what we were originally using with LQ) so there will be some code smell.
Expected behavior
This code should give the same output than default.qubit.
Actual behavior
Additional information
No response
Source code
No response
Tracebacks
No response
System information
Existing GitHub issues