Skip to content

Commit

Permalink
Attempt at completed error generator commutators
Browse files Browse the repository at this point in the history
My initial (complete) attempt at updating the implementation of the error generator commutator psuedocode to get it working. Next up is testing.
  • Loading branch information
Corey Ostrove committed Oct 28, 2024
1 parent 7561277 commit 896bb9e
Show file tree
Hide file tree
Showing 2 changed files with 299 additions and 107 deletions.
11 changes: 8 additions & 3 deletions pygsti/errorgenpropagation/errorpropagator_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,12 @@ def _propagate_errorgen_layers_bch(self, errorgen_layers, propagation_layers, bc
Returns
-------
fully_propagated_layers : list of lists of dicts
A list of list of dicts with the same structure as errorgen_layers corresponding
to the results of having propagated each of the error generator layers through
the circuit to the end while combining the layers in a layerwise fashion using the
BCH approximation. As a result of this combination, this list should have a length
of one.
"""

#Add temporary errors when trying to do BCH beyond 1st order while the details of the 2nd order
Expand Down Expand Up @@ -604,8 +609,8 @@ def _propagate_errorgen_layers_bch(self, errorgen_layers, propagation_layers, bc
#next use BCH to combine new_err_layer with the now adjacent layer of errorgen_layers[i+1]
combined_err_layer = _eprop.bch_approximation(new_err_layer, errorgen_layers[i+1], bch_order=1)

#If we are including spam then there will be one last error generator which we don't propagate
#through which needs to be combined using BCH.
#If we are including spam then there will be one last error generator which we doesn't have an associated propagation
#which needs to be combined using BCH.
if include_spam:
combined_err_layer = _eprop.bch_approximation(combined_err_layer, errorgen_layers[-1], bch_order=1)

Expand Down
Loading

0 comments on commit 896bb9e

Please sign in to comment.