Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR covers two bugfixes. The first is in the method for adding cirq trials to pygsti datasets which did not behave as expected for 2+ qubits. The default behavior of the histogram method of the cirq
Result
object, which is used for gathering aggregated counts for each measurement results is to index these results using integers corresponding to the binary string for an outcome. In pygsti we more commonly use the binary strings themselves as the key. To address this we have added new options toadd_cirq_trial_result
which controls conversion back to a bit string before adding it to the count dictionary.The second bugfix was to the LGST routine in order to patch in support for datasets with sparse formats wherein we only include outcomes with non-zero counts in the count dict for a circuit. Previously the implementation assumed that the data set was in a dense format with zero entries listed.