Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Lambdas lifted by Q# compiler appear in output from Q# code cells #644

Open
cgranade opened this issue Apr 5, 2022 · 3 comments
Open

Lambdas lifted by Q# compiler appear in output from Q# code cells #644

cgranade opened this issue Apr 5, 2022 · 3 comments
Labels
Area-Kernel Issue relates to the IQ# kernel. Kind-Bug Something isn't working tracking This label will trigger gh-sync to create or update a mirror internal ADO issue.

Comments

@cgranade
Copy link
Contributor

cgranade commented Apr 5, 2022

Describe the bug
When running a Q# code cell in a Q# notebook, operations and functions lifted from lambda expressions appear in user-facing output as part of the contents of that cell.

To Reproduce
image

Expected behavior
The lifted lambda operation _0f141307913a4d19bd95bb7f235180d5_ApplyWithDistributedControlled should not appear in the user-facing output.

System information
image

Additional context
@samarsha: Do you know if there's any property set on the AST representation of lifted lambdas that could be used to filter them out from the IQ# kernel side? Thanks!

@cgranade cgranade added Kind-Bug Something isn't working Area-Kernel Issue relates to the IQ# kernel. tracking This label will trigger gh-sync to create or update a mirror internal ADO issue. labels Apr 5, 2022
@bamarsha
Copy link
Contributor

@ScottCarda-MS worked on the lambda lifting, do you know if there's a way to identify a lifted lambda?

@ScottCarda-MS
Copy link
Contributor

ScottCarda-MS commented Apr 11, 2022

The lifted lambdas are meant to not be any different from if the callables were written manually. Maybe we could add an internal attribute that we could add to all generated callables to identify them as generated?

@cgranade
Copy link
Contributor Author

I think such an attribute would be really helpful for interop with Python hosts, yeah. It's a bit confusing to list automatically lifted callables next to callables that the user intended to define and make available directly to other code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area-Kernel Issue relates to the IQ# kernel. Kind-Bug Something isn't working tracking This label will trigger gh-sync to create or update a mirror internal ADO issue.
Projects
None yet
Development

No branches or pull requests

3 participants