NVIDIA / cuda-quantum

C++ and Python support for the CUDA Quantum programming model for heterogeneous quantum-classical workflows
https://nvidia.github.io/cuda-quantum/
Other
486 stars 179 forks source link

FuseWithConstantArray on ExtractValueOp always returns success() #2196

Open amccaskey opened 3 weeks ago

amccaskey commented 3 weeks ago

FuseWithConstantArray::matchAndRewrite is returning success even if no canonicalization is applied. I'm not 100% sure, but I think that final return statement should be a return failure();. I noticed this when I tried to add more canonicalization patterns for ExtractValueOp and they would not run, and my guess was that it was because the first pass, FuseWithConstantArray was always returning success.