def get_bits(self, bin_length=None): # type: (FFQramEntry) -> str """ Get the binary bit representation of data and label for state basis identification :return: a bit array """ b = self.data + self.label ba = BitArray(b) ba = ba.bin.lstrip('0') ba = ba.zfill(bin_length) if bin_length is not None else ba return ba