Astral Cai
Astral Cai
Similar to https://github.com/PennyLaneAI/pennylane/pull/3290, the entanglement entropy measurement is temporarily removed from this PR, to be implemented once the refactor of the measurement module is complete.
Hi, I have opened a pull request for this feature (https://github.com/PennyLaneAI/pennylane/pull/3271).
The original pull request was discarded because the new commit to master which re-organized the measurements module conflicts with my commit, and then I accidentally reset my forked master. I...
In the current master of pennylane, all controlled operations inherit from `Controlled`, so you should be able to replace all string comparisons here with `isinstance` checks. For `CNOT`, `Toffoli`, and...
Actually this produces an `SProd`, not a `Sum` > ``` > coeffs = pnp.array([0.5], requires_grad=True) > op = qml.dot(coeffs, [X(0)]) > ```
@KetpuntoG Would you be able to provide more context regarding when this causes an issue?
> I'm creating the template qml.Qubitization that takes as input a Hamiltonian. In [this line](https://github.com/PennyLaneAI/pennylane/blob/64969112cd73837e574a2dc1f45d88271d943424/pennylane/templates/subroutines/qubitization.py#L35) I wrote: > > `coeffs, ops = hamiltonian.terms()` > > If the Hamiltonian is a...
> I'm creating the template qml.Qubitization that takes as input a Hamiltonian. In [this line](https://github.com/PennyLaneAI/pennylane/blob/64969112cd73837e574a2dc1f45d88271d943424/pennylane/templates/subroutines/qubitization.py#L35) I wrote: > > `coeffs, ops = hamiltonian.terms()` > > If the Hamiltonian is a...
> Nice! This is what I was looking for! Thanks! @KetpuntoG you can use that in your code when you call `terms` to re-package the `coeffs`, but we should add...