PennyLaneAI / catalyst

A JIT compiler for hybrid quantum programs in PennyLane
https://docs.pennylane.ai/projects/catalyst
Apache License 2.0
142 stars 36 forks source link

Add support for shot vectors to other measurement processes #1253

Open joeycarter opened 1 month ago

joeycarter commented 1 month ago

Catalyst recently added support for specifying shot-vectors when used with qml.sample measurements on the lightning.qubit device (#1051). However, other measurement types, such as expval and probs, currently do not support shot-vectors. We should add support for these other measurement processes. Moreover, it should be efficient, meaning that there should only be one circuit execution.

This issue was prompted by @josh146's comment here: https://github.com/PennyLaneAI/catalyst/pull/1239#discussion_r1820341706.