-
Notifications
You must be signed in to change notification settings - Fork 936
IQuantumProcessor sample for qpic output #379
Conversation
cgranade
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good to me, thanks for doing this! I left a few comments here and there that may be helpful, but otherwise I think this is going to be a great sample!
Co-authored-by: Chris Granade <chgranad@microsoft.com>
|
@cgranade Thanks for your helpful comments. I have incorporated them and answered to some comments. |
cgranade
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks pretty good, though I'd strongly recommend adding a README first so that this sample can be onboarded to the Samples Browser. Please ping me if I can help with that. Thanks!
tcNickolas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall to me - I'm still a bit hazy on the things related to classical control, but I'm assuming it's because it will be explained in the 2nd part of the blog post :-)
I agree that this sample would benefit from a README, maybe slightly more extended than other READMEs in the Samples - I would definitely add an example of what this simulator does (a simple Q# code and a picture of the generated circuit).
For visualization of the parameterized gates, I don't recall whether the blog posts refer to them? I understand this simulator is not intended to be our primary circuit visualization tool, but rather an illustration of an approach that can be taken? If this is true and the blog posts don't rely on fractional rotations, we might want to skip implementing them altogether in the interest of keeping the sample concise.
Thank you for working on this!
| // we are using a color coding for some angles according to the visualizations in | ||
| // [arXiv:1808.02892](https://arxiv.org/abs/1808.02892) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to add this information as text? Carrying info in colors only seems so fragile, regardless of the encoding used - once my laptop switches to night mode the circuit changes.
Co-authored-by: Mariia Mykhailova <mamykhai@microsoft.com>
… into msoeken/qpic-simulator
|
Thanks to everyone for your suggestions, I tried incorporating them all. Regarding a README and sample implementations, I am planning to add them in a separate PR into the same feature branch. This was just to add the library projects to support this functionality. |
tcNickolas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I didn't realize this is a PR to a branch!
This PR implements a C# library containing a custom
IQuantumProcessor-based Q# simulator to dump Q# program execution traces into qpic files. It does not support all intrinsic operations and is used as accompanying sample to the 3rd Q# blog post on custom simulators. It also contains anintrinsicsproject with custom Q# operations for the simulator.There is a lot of code this time, so I created a feature branch. Two upcoming PRs will add (i) a Q# test project with sample code to create qpic pictures and (ii) README and meta data for the sample.