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

@SimulatableIntrinsic not treated as intrinsic for circuit diagram #1904

Open
swernli opened this issue Sep 6, 2024 · 0 comments
Open

@SimulatableIntrinsic not treated as intrinsic for circuit diagram #1904

swernli opened this issue Sep 6, 2024 · 0 comments
Labels
bug Something isn't working design needed low-priority backlog items with low priority

Comments

@swernli
Copy link
Collaborator

swernli commented Sep 6, 2024

A normal intrinsic like this:

image

will fail to run but show a circuit diagram as I expected. Meanwhile, a simulatable intrinsic like this:

image

will successfully simulate but shows the simulated gates in the diagram rather than the intrinsic.

I'm not sure if there is a reasonable way to fix this, as the point of simulatable intrinsics is to execute the body in simulation, and the backend chaining used for circuit diagrams is itself just simulation. On some level, this asks the question: is the circuit diagram meant to show what is run in simulation or to visualize what would be produced in QIR codegen? If the former, then this behavior is expected and not really a bug. If the latter, then we'd need to find a way to have the chaining backend differentiate between normal simulation and simulatable intrinsic, which the infrastructure doesn't really accommodate.

@swernli swernli added bug Something isn't working needs triage labels Sep 6, 2024
@sezna sezna added low-priority backlog items with low priority design needed and removed needs triage labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working design needed low-priority backlog items with low priority
Projects
None yet
Development

No branches or pull requests

2 participants