diff --git a/src/qibo/models/circuit.py b/src/qibo/models/circuit.py index 3e5c8a564e..e0a0689655 100644 --- a/src/qibo/models/circuit.py +++ b/src/qibo/models/circuit.py @@ -300,8 +300,8 @@ def wire_names(self, wire_names: Union[list, dict]): f"but is {len(wire_names)}.", ) - if any([not isinstance(name, str) for name in wire_names]): - raise_error(ValueError, "all wire names must be type ``str``.") + # if any([not isinstance(name, str) for name in wire_names]): + # raise_error(ValueError, "all wire names must be type ``str``.") self._wire_names = wire_names elif isinstance(wire_names, dict): @@ -312,14 +312,13 @@ def wire_names(self, wire_names: Union[list, dict]): + "cannot be bigger than ``nqubits``.", ) - if any([not isinstance(name, str) for name in wire_names.keys()]) or any( - [not isinstance(name, str) for name in wire_names.values()] - ): - pass - # raise_error( - # ValueError, - # "all keys and values in the ``wire_names`` dictionary must be type ``str``.", - # ) + # if any([not isinstance(name, str) for name in wire_names.keys()]) or any( + # [not isinstance(name, str) for name in wire_names.values()] + # ): + # raise_error( + # ValueError, + # "all keys and values in the ``wire_names`` dictionary must be type ``str``.", + # ) self._wire_names = [ wire_names.get(f"q{i}", f"q{i}") for i in range(self.nqubits)