def __new__()

in testing/qumat_helpers.py [0:0]


    def __new__(cls, value):
        if not all(char in ['0', '1'] for char in value):
            raise ValueError("String contains characters other than '0' and '1'")
        return str.__new__(cls, value)