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

Conversation

@guenp
Copy link

@guenp guenp commented Aug 10, 2020

Add PseudoSyndrome sample based on @apaetz's version in the private repo. Modified to use a Python script as application layer and CLI script instead of C#.

This is still a Draft PR - one way to enrich this sample would be to introduce random errors and show how this affects the auxiliary qubit. @cgranade @rmshaffer @msoeken I'm curious to hear your thoughts on this, based on how we know these samples are being used and by whom, it may or may not be useful.

@guenp guenp force-pushed the guenp/18375-Syndrome branch from 70b64c2 to cf2573b Compare August 10, 2020 23:37
Copy link
Contributor

@rmshaffer rmshaffer left a comment

Choose a reason for hiding this comment

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

I know this PR is still a draft; just a handful of quick comments! Of course I defer to you, @cgranade, and @msoeken on all things samples-related...

Copy link
Contributor

@cgranade cgranade left a comment

Choose a reason for hiding this comment

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

This is still a Draft PR…

Makes sense, I've provided some preliminary feedback keeping that in mind, then. Thanks for opening this early, looks great so far!

…one way to enrich this sample would be to introduce random errors and show how this affects the auxiliary qubit. @cgranade @rmshaffer @msoeken I'm curious to hear your thoughts on this, based on how we know these samples are being used and by whom, it may or may not be useful.

This is one place where an open systems simulator would be really nice to have, as that would allow for demonstrating the sample locally without running on hardware. Similarly, a noise injection simulator that randomly performs operations on the pure-state simulator would also be able to model random overrotations such as those described in your comments.

@bettinaheim may know more about plans from the runtime, but at the moment, all of our simulators simulate noiseless systems such that this sample should always return trivial syndromes when simulated locally. In other samples (e.g. the tomography sample used for Python interop), we've moved that randomness into Q#, but that then has the undesirable side-effect of making Q# programs do something even more noisy when run on noisy hardware.

In general, the discussion of noise in simulation is likely beyond the scope of this sample, such that I think that's a great discussion to have but not one that I want to block your progress here over.

Copy link
Member

@msoeken msoeken left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just left some suggestions.

@efratshabtai
Copy link

Can this sample run on IonQ or Honeywell?
What will be the result in that case?

@guenp guenp force-pushed the guenp/18375-Syndrome branch from 5b23d8c to 9c840a4 Compare August 12, 2020 00:18
@guenp guenp force-pushed the guenp/18375-Syndrome branch from 9c840a4 to 9f8ebbf Compare August 12, 2020 00:19
@guenp
Copy link
Author

guenp commented Aug 12, 2020

Thanks @cgranade @msoeken @efratshabtai @rmshaffer for the thorough code review! The purpose of the draft was really to discuss if we need to extend the sample to include random simulated errors (as to make the Syndrome usage more clear), however it looks like we prefer to leave the sample as-is and revisit after we make a decision on implementing noisy simulators. I'll convert this to a PR now, would appreciate a final pass from one of you.
@cgranade based on your comments it looks like there are some additions to make to the standard libraries. Where do you suggest to follow up on this? would this be a topic for our api review meeting or shall I just create a GH issue?

@guenp guenp marked this pull request as ready for review August 12, 2020 00:24
@guenp
Copy link
Author

guenp commented Aug 12, 2020

Can this sample run on IonQ or Honeywell?
What will be the result in that case?

@efratshabtai yes we should be able to run this on hardware (see details in DM). The expected result is a measurable error on the syndrome, depending on the noise in the system.

Copy link
Contributor

@cgranade cgranade left a comment

Choose a reason for hiding this comment

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

I think this is looking pretty close! I've left a few comments, but I think the only other thing I'd suggest is to have a README specific to this sample so that it can be onboarded to docs.microsoft.com/samples. Please let me know if I can help with that. Thank you!

Guen Prawiroatmodjo and others added 5 commits August 13, 2020 21:04
@guenp
Copy link
Author

guenp commented Aug 13, 2020

Thanks, @cgranade ! I've implemented your suggestions. I would appreciate a read of the README when you have a moment.

Copy link
Contributor

@cgranade cgranade left a comment

Choose a reason for hiding this comment

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

Looks good, just a few more suggestions on the README. Thanks!

Guen P and others added 2 commits August 13, 2020 17:42
README review edits

Co-authored-by: Chris Granade <chgranad@microsoft.com>
@guenp guenp merged commit ba5e78a into master Aug 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants