diff --git a/QElephant/QuBit.py b/QElephant/QuBit.py index 0a1be76..455510d 100644 --- a/QElephant/QuBit.py +++ b/QElephant/QuBit.py @@ -134,7 +134,7 @@ class MuBit: return prob - def __SWITCH(self, i: int) -> float: + def __SWITCH(self, i: int) -> None: if type(i) is not int: raise TypeError(f"MuBit indices must be integers, not {type(i)}") if i >= self.__n: diff --git a/docs/QuBit/MuBit.md b/docs/QuBit/MuBit.md index a22a68c..b0c586f 100644 --- a/docs/QuBit/MuBit.md +++ b/docs/QuBit/MuBit.md @@ -52,6 +52,10 @@ MuBit(n: int) returns the probability to get the i-th QuBit in the state |0>. +- ```__SWITCH(i: int) -> None``` + + switches the i-th QuBit with the next one in __state. + - ```observe() -> list[int]``` forces the QuBits in a state, where the probabilities are given throught __state. Returns the list of the state of each QuBit.