def shift_decoder(decoder, shift_constant):
    ' Shifts the indices of a decoder by a constant.\n\n    Args:\n        decoder (iterable): list of BinaryPolynomial; the decoder\n        shift_constant (int): the qubit index that corresponds to the offset.\n\n    Returns (list): list of BinaryPolynomial shifted decoder\n    '
    decode_shifted = []
    if (not isinstance(shift_constant, (numpy.int64, numpy.int32, int))):
        raise TypeError('the shift to the decoder must be integer. got {}of type {}'.format(shift_constant, type(shift_constant)))
    for entry in decoder:
        tmp_entry = copy.deepcopy(entry)
        tmp_entry.shift(shift_constant)
        decode_shifted.append(tmp_entry)
    return decode_shifted
Shifts the indices of a decoder by a constant.

Args:
    decoder (iterable): list of BinaryPolynomial; the decoder
    shift_constant (int): the qubit index that corresponds to the offset.

Returns (list): list of BinaryPolynomial shifted decoder
def shift_decoder(decoder, shift_constant):
    ' Shifts the indices of a decoder by a constant.\n\n    Args:\n        decoder (iterable): list of BinaryPolynomial; the decoder\n        shift_constant (int): the qubit index that corresponds to the offset.\n\n    Returns (list): list of BinaryPolynomial shifted decoder\n    '
    decode_shifted = []
    if (not isinstance(shift_constant, (numpy.int64, numpy.int32, int))):
        raise TypeError('the shift to the decoder must be integer. got {}of type {}'.format(shift_constant, type(shift_constant)))
    for entry in decoder:
        tmp_entry = copy.deepcopy(entry)
        tmp_entry.shift(shift_constant)
        decode_shifted.append(tmp_entry)
    return decode_shifted