Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support further Python Interop for callables in .estimate(), .compile(), .run() and .circuit() #2091

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Jan 6, 2025

This follows up on #2054 by adding the enhanced support for Q# callables exposed into Python and Python argument arrays in resource estimation, QIR compilation, running multiple shots, and circuit generation.

…mpilation

This follows up on #2054 by adding the enhanced support for Q# callables exposed into Python and Python argument arrays in resource estimation and QIR compilation.
pip/tests/test_qsharp.py Dismissed Show dismissed Hide dismissed
pip/tests/test_qsharp.py Dismissed Show dismissed Hide dismissed
pip/tests/test_re.py Dismissed Show dismissed Hide dismissed
pip/tests/test_re.py Dismissed Show dismissed Hide dismissed
Copy link
Member

Choose a reason for hiding this comment

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

What about the third sibling, .run() ? I think it would make sense to allow that to take a callable, as well.

And of course, there's .circuit(), which can already take a callable, but uses a different pattern... which is unfortunate, because this new pattern is better. I wouldn't be opposed to updating .circuit() to allow the new pattern as well, but I understand if you don't want to touch it in this PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it's worth updating both of those. I'll get that added and see how it looks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've added the support for .run() and .circuit(), let me know what you think!

pip/tests/test_qsharp.py Dismissed Show dismissed Hide dismissed
pip/tests/test_qsharp.py Dismissed Show dismissed Hide dismissed
pip/tests/test_qsharp.py Dismissed Show dismissed Hide dismissed
pip/tests/test_qsharp.py Dismissed Show dismissed Hide dismissed
@swernli swernli changed the title Support further Python Interop for callables in Estimation and QIR Compilation Support further Python Interop for callables in .estimate(), .compile(), .run() and .circuit() Jan 13, 2025
@idavis idavis requested review from minestarks and idavis January 14, 2025 15:02
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.

3 participants