sandialabs / pyGSTi

A python implementation of Gate Set Tomography
http://www.pygsti.info
Apache License 2.0
132 stars 55 forks source link

Update/New Cirq Parsing Capabilities #411

Closed coreyostrove closed 3 months ago

coreyostrove commented 3 months ago

This PR updates the existing parser for conversion of pyGSTi Circuit objects to Cirq Circuit objects. Also introduced is a new parser for converting from Cirq Circuits objects into pyGSTi Circuit objects. A few other minor changes include:

  1. Updates to pyGSTi's built-in gate definitions to include the following:
  1. Updated the function unitary_to_standard_gatename in tools.internalgates to allow the option for checking for equivalence of unitaries to a built-in gate up to an overall global phase.

  2. New unit tests (including one for qasm conversion, which was previously not unit tested) and updates to the cirq integration demo notebook to include the new functionality.

Note: I branched this off of #403, which is why there is so much testing update stuff in the commit log (once that gets merged in it should go away from this PR), stuff relevant to this update begins 3/13/24 w/ 185a59ad759bbb2d7a494e7f48f8ab36773aaa52.

coreyostrove commented 3 months ago

Thanks for the feedback, @sserita. I have just pushed some updates which rename the kwargs of implied and global idle handling to remove_implied_idles and global_idle_replacement_label, respectively, which should hopefully be more self explanatory for end users. I have also changed the default behavior for the global idle (implied handling behavior is the same, but the default value is now instead True to match the renaming of the kwarg) so that they are replaced. Let me know if you have any other concerns.