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 `**kwargs` to pipeline `_decorator` call signature #1259

Closed joeycarter closed 4 weeks ago

joeycarter commented 4 weeks ago

Context: The main and v0.9.0-rc branches became out of sync: main currently has a **kwargs argument in the pipeline _decorator call signature, but v0.9.0-rc does not. The function argument is needed because it's referenced in the function body:

def _decorator(fn=None):  # <- **kwargs should be in the call signature
    if fn is None:
        return functools.partial(pipeline, **kwargs)
    ...

Note that we don't have good testing coverage for this particular branch of the code since all tests pass with or without the **kwargs argument in the call signature. However, we should add it in for the sake of internal consistency.

Description of the Change: Add **kwargs to pipeline _decorator call signature

github-actions[bot] commented 4 weeks ago

Hello. You may have forgotten to update the changelog! Please edit doc/releases/changelog-dev.md on your branch with: