sandialabs / pyGSTi

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

Add support for non-standard POVMs and qudits to write_empty_protocol_data #370

Closed coreyostrove closed 10 months ago

coreyostrove commented 10 months ago

This PR patches the bug reported in #321. Previously the function pygsti.io.write_empty_protocol_data had the assumptions of qubits and that the readout was done in the standard basis hardcoded in. This lead to unexpected behavior when using models (really processor specs) with non-standard readout or even qudits with standard readout for dim>2. This PR adds in support for both of these things. For qudits this includes support for mismatching dimensions on the subsystems. This currently doesn't support multiple POVMs, and for non-standard POVMs if there were more than one we currently simply take the first in the list.

Let me know if you have any questions or concerns.