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

Support cell magics %%simulate and %%trace #596

Open
guenp opened this issue Feb 22, 2022 · 1 comment
Open

Support cell magics %%simulate and %%trace #596

guenp opened this issue Feb 22, 2022 · 1 comment
Labels
Area-Kernel Issue relates to the IQ# kernel. Kind-Enhancement New feature or request

Comments

@guenp
Copy link
Contributor

guenp commented Feb 22, 2022

Is your feature request related to a problem? Please describe.
Currently, running %simulate for diagnostics or %trace for visualization requires on an operation that acts on a qubit register creating a boilerplate operation that either runs DumpRegister or DumpOperation (for %simulate) or allocates qubits (for %trace).

Describe the solution you'd like
It would be great if there were a way to pass Q# code to either of those magics directly. We could achieve that by supporting cell magics.

Describe alternatives you've considered

Additional context
Screenshots:
Screen Shot 2022-02-22 at 9 56 24 AM

Screen Shot 2022-02-22 at 9 56 06 AM

@cgranade
Copy link
Contributor

Definitely and wholly agreed; this would be a significant investment, however, due to the fact that jupyter-core itself currently only supports line-magics, so that we don't have a good API to plug into yet. We should consider making that investment, since this would eliminate a bunch of stub operations that serve only as shims for calling %simulate immediately.

@cgranade cgranade added Area-Kernel Issue relates to the IQ# kernel. Kind-Enhancement New feature or request labels Feb 22, 2022
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-Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants