PennyLaneAI / catalyst

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

Improve API for third party compilers. #519

Open erick-xanadu opened 5 months ago

erick-xanadu commented 5 months ago

In order to implement CUDA, I had to override some functionality in Catalyst.

        with Patcher(
            (catalyst.pennylane_extensions.QFunc, "extract_backend_info", cudaq_backend_info),
            (qml.QNode, "__call__", QFunc.__call__),
        ):

I think third party compilers might have to do something similar if they follow a similar approach to CUDA-quantum's implementation.

dime10 commented 5 months ago

I'm not sure this actually concerns Catalyst, but is something to look at for PennyLane's compiler API.