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

do_stdpractice_gst() only runs single-2QUR for Target mode #91

Closed
dnadlinger opened this issue Sep 13, 2019 · 5 comments
Closed

do_stdpractice_gst() only runs single-2QUR for Target mode #91

dnadlinger opened this issue Sep 13, 2019 · 5 comments
Assignees
Labels
bug A bug or regression inactive Progress on this issue is temporarily on hold

Comments

@dnadlinger
Copy link
Contributor

dnadlinger commented Sep 13, 2019

I am using do_stdpractice_gst() on two-qubit GST data, and with default parameters, the single-2QUR gauge optimisation is only run on the Target model data, not on the results of the TP/CPTP modes.

Only the "-- Performing 'single' gauge optimization" message is printed for the TP/CPTP steps, and indeed the generated report is missing the single-2QUR data for all but the Target model.

Environment (please complete the following information):

  • pyGSTi version: master (v0.9.8.2, f143ca1)
  • python version: 3.5, 3.7
  • OS: macOS, Linux

(This sounds like a trivial bug that would be easier to fix for me than to write up, but then, you couldn't accept a PR from me unless the legal situation has changed in the meantime.)

@dnadlinger dnadlinger added the bug A bug or regression label Sep 13, 2019
@robpkelly
Copy link
Contributor

You're correct that we still can't accept PRs -- sorry about that!

@dnadlinger
Copy link
Contributor Author

Apologies, this might just be user error/a documentation problem: I hadn't realised that gaugeopt_suite_to_dictionary hard-codes a list of two-qubit gate names rather than inspecting the target model. In the if isinstance(gg, _objs.TrivialGaugeGroup): branch, the optimisation is added unconditionally – that's why it is executed for the target model.

@dnadlinger
Copy link
Contributor Author

(A warning if no gate in unreliableOps is found would help make this more discoverable.)

@enielse
Copy link
Collaborator

enielse commented Sep 17, 2019

I've just added a fix for this in 15e8f45. It should avoid having 'single-2QUR' present for just the target mode ('single-2QUR' should either be there for all or none of the modes) and, as was suggested, a warning is now generated when no gate in unreliableOps is found.

As an aside, the reason why it's difficult to perform this discovery automatically is that within PyGSTi all of the gates in a 2-qubit model are seen as 2-qubit gates, and represented by 16x16 matrices. We could test whether a gate is entangling, and choose only those gates as the default unreliableOps in the future, but we haven't done this yet.

Finally, note that this fix is only on the beta branch, and not on master (or available via pip). Because this doesn't seem like a critical issue to fix immediately, my preference would be to just wait until our normal develop cycle produces a new release and then this fix will be included on the master branch. Please feel free to argue this point. Let's leave this issue open until the fix reaches a release.

@enielse enielse assigned robpkelly and unassigned enielse Sep 17, 2019
@dnadlinger
Copy link
Contributor Author

dnadlinger commented Sep 18, 2019

Great, thanks, this is perfect – feel free to close this whenever most convenient for you. Automatic detection probably isn't worth it, I was just taken by surprise by the fact that it did seem to auto-detect it for Target (when in actuality the entire option was just added since the last version I had used).

@robpkelly robpkelly added the inactive Progress on this issue is temporarily on hold label Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug or regression inactive Progress on this issue is temporarily on hold
Projects
None yet
Development

No branches or pull requests

3 participants