David Ittah

Results 274 comments of David Ittah

The error in this example is due to the use of lambda functions which return the quantum gates. Normally we only construct quantum gate objects without ever using the "return...

> Hey @dime10, what's the status on this PR? I've been writing some test cases to make sure everything is correct, but I'm still investing what the correct behaviour should...

Actually I think the issue considered here is closely tied to #2296, and the solution attempt does not adequately resolve the issue. Using the following circuit to contrast computed gradients...

> Also, wouldn't it be nice if, for example, CNOT, Toffoli, MultiControlledX were just aliases for C(PauliX)? This way we would not need special treatment for all these gates. 100%,...

> @dime10 Yes you are right about the wires binding, I think. I can try and refine this PR to respect those special settings of split wires. Alternatively, we could...

> Thanks @dime10! Would you mind linking the associated SC story? Sure thing! This is just one possible way forward for the following story: [[sc-62096](https://app.shortcut.com/xanaduai/story/62096)]

> in Catalyst currently, _any_ quantum transformation in MLIR has to manually do this separation, apply the transform to the quantum part, and then glue the hybrid program back together...

> > Looks good! > > I didn't see anything about the "capture.measure" (not the mcm) operation in the code, has been shelved for now? > > @dime10 Decided to...

TODOs can be removed in the following files once this is fixed: https://github.com/PennyLaneAI/pennylane/blob/ce941f345bee6cd1d89d50753cd68cdb51982ad5/tests/transforms/test_metric_tensor.py#L634 https://github.com/PennyLaneAI/pennylane/blob/ce941f345bee6cd1d89d50753cd68cdb51982ad5/tests/gradients/test_finite_difference.py#L214 https://github.com/PennyLaneAI/pennylane/blob/ce941f345bee6cd1d89d50753cd68cdb51982ad5/tests/gradients/test_param_shift_hessian.py#L535 https://github.com/PennyLaneAI/pennylane/blob/ce941f345bee6cd1d89d50753cd68cdb51982ad5/tests/gradients/test_parameter_shift.py#L231 https://github.com/PennyLaneAI/pennylane/blob/ce941f345bee6cd1d89d50753cd68cdb51982ad5/tests/gradients/test_parameter_shift_cv.py#L305