Skip to content

refactor(schemes): type execute_function with ExecuteFunction protocol#51

Open
dlyongemallo wants to merge 1 commit into
moth-quantum:mainfrom
dlyongemallo:refactor_execute_function_type
Open

refactor(schemes): type execute_function with ExecuteFunction protocol#51
dlyongemallo wants to merge 1 commit into
moth-quantum:mainfrom
dlyongemallo:refactor_execute_function_type

Conversation

@dlyongemallo
Copy link
Copy Markdown

No description provided.

Copilot AI review requested due to automatic review settings April 29, 2026 13:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors scheme decode() APIs to use a shared ExecuteFunction protocol for the execute_function callback, and updates the default execution utilities to accept extra keyword arguments for decoder compatibility.

Changes:

  • Introduces utils.ExecuteFunction (Protocol) to standardize typing for execution backends passed into scheme decoders.
  • Updates scheme decoders (qsm, qpam, sqpam, mqsm, msqpam) to type execute_function as utils.ExecuteFunction (and cleans up unused typing imports).
  • Updates utils.execute and utils.execute_with_sampler to accept **kwargs (ignored) to remain compatible with forwarded decoder kwargs.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
quantumaudio/utils/execute.py Adds ExecuteFunction protocol; makes execution helpers accept **kwargs for decoder forwarding compatibility.
quantumaudio/schemes/sqpam.py Types execute_function as utils.ExecuteFunction; removes unused typing imports.
quantumaudio/schemes/qsm.py Types execute_function as utils.ExecuteFunction; removes unused typing imports.
quantumaudio/schemes/qpam.py Types execute_function as utils.ExecuteFunction; removes unused typing imports.
quantumaudio/schemes/msqpam.py Types execute_function as utils.ExecuteFunction; corrects keep_padding tuple element types to bool.
quantumaudio/schemes/mqsm.py Types execute_function as utils.ExecuteFunction; corrects keep_padding tuple element types to bool.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread quantumaudio/schemes/msqpam.py
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.

2 participants