deltakit.explorer.codes.UnrotatedPlanarCode.get_shifted_logicals#
- UnrotatedPlanarCode.get_shifted_logicals(shift_z: bool, delta: Coord2DDelta) tuple[frozenset[PauliGate], ...]#
Given a boolean specifying whether to modify X or Z logicals, and a Coord2DDelta, modify the relevant logical(s) by adding the Coord2DDelta to the coordinates of each qubit making up the logical. A check is performed to ensure the shifted logical still lies on the data qubits of the patch. If this is not the case, a ValueError is thrown.
- Parameters:
shift_z (bool) – Boolean specifying whether to shift the Z-logicals (True) or X-logicals (False).
delta (Coord2DDelta) – The delta to add to each qubit coordinate.
- Returns:
A tuple of frozensets of PauliX or PauliZ operators, depending on the value of shift_z being False or True respectively, which will be the logicals of the code modified by adding the delta vector to each qubit coordinate.
- Return type:
tuple[frozenset[PauliGate], …]