Skip to content

Conversation

@kipawaa
Copy link
Contributor

@kipawaa kipawaa commented Nov 17, 2025

Before submitting

Please complete the following checklist when submitting a PR:

  • All new functions and code must be clearly commented and documented.

  • Ensure that code is properly formatted by running make format.
    The latest version of black and clang-format-20 are used in CI/CD to check formatting.

  • All new features must include a unit test.
    Integration and frontend tests should be added to frontend/test,
    Quantum dialect and MLIR tests should be added to mlir/test, and
    Runtime tests should be added to runtime/tests.

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


Context:
Changes in keyword arguments do not trigger function re-compilation with qjit. This leads to unexpected results.

Description of the Change:
This change adds keyword arguments to the generation of the qjit cache key, which is used to determine if a function needs to be recompiled. This triggers a change in the cache key when keywords are changed, which triggers re-compilation.

Benefits:
Compiled functions now behave as expected with respect to changes in keyword arguments.

Possible Drawbacks:
N/A

Related GitHub Issues:
Closes #2182, related to #814?

[sc-103586]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not detecting need for recompilation triggered by keyword arguments

2 participants