deltakit.explorer.codes.RotatedPlanarCode.overwrite_logicals#
- RotatedPlanarCode.overwrite_logicals(new_x_logicals: Sequence[Collection[PauliGate]], new_z_logicals: Sequence[Collection[PauliGate]])#
Method to allow for updating both X and Z logicals simultaneously. For instance, the user may want to define a new logical that does not anti-commute with the current other type logical, but that will anti-commute with the new logical to be specified. Trying to do this in sequence will raise an error, so this method allows both to be updated simultaneously. Validation is performed on all the new logical operators.
- Parameters:
new_x_logicals (Sequence[Collection[PauliGate]]) – New X-logicals, to be validated and set if valid.
new_z_logicals (Sequence[Collection[PauliGate]]) – New Z-logicals, to be validated and set if valid.