Needs more investigation. It would be good to remove measurements before QIR codegen, I think. But there may be a reason not to. _Originally posted by @schweitzpgi in https://github.com/NVIDIA/cuda-quantum/pull/3423#discussion_r2334472251_