def __iadd__(self, appendix):
    ' In-place appending a binary code with +=.\n\n        Args:\n            appendix (BinaryCode): The code to append to the present one.\n\n        Returns (BinaryCode): A global binary code with size\n            (n_modes1 + n_modes2), (n_qubits1,n_qubits2)\n\n        Raises:\n            TypeError: Appendix must be a BinaryCode.\n        '
    if (not isinstance(appendix, BinaryCode)):
        raise TypeError('argument must be a BinaryCode.')
    self.decoder = numpy.append(self.decoder, shift_decoder(appendix.decoder, self.n_qubits)).tolist()
    self.encoder = scipy.sparse.bmat([[self.encoder, None], [None, appendix.encoder]])
    (self.n_qubits, self.n_modes) = numpy.shape(self.encoder)
    return self
In-place appending a binary code with +=.

Args:
    appendix (BinaryCode): The code to append to the present one.

Returns (BinaryCode): A global binary code with size
    (n_modes1 + n_modes2), (n_qubits1,n_qubits2)

Raises:
    TypeError: Appendix must be a BinaryCode.
def __iadd__(self, appendix):
    ' In-place appending a binary code with +=.\n\n        Args:\n            appendix (BinaryCode): The code to append to the present one.\n\n        Returns (BinaryCode): A global binary code with size\n            (n_modes1 + n_modes2), (n_qubits1,n_qubits2)\n\n        Raises:\n            TypeError: Appendix must be a BinaryCode.\n        '
    if (not isinstance(appendix, BinaryCode)):
        raise TypeError('argument must be a BinaryCode.')
    self.decoder = numpy.append(self.decoder, shift_decoder(appendix.decoder, self.n_qubits)).tolist()
    self.encoder = scipy.sparse.bmat([[self.encoder, None], [None, appendix.encoder]])
    (self.n_qubits, self.n_modes) = numpy.shape(self.encoder)
    return self