update QuBit.md
This commit is contained in:
parent
9fe2910fc8
commit
99c5185034
2 changed files with 5 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue