From 99c51850345b4a6452eb59675dd33bb6c8dc1490 Mon Sep 17 00:00:00 2001 From: Didictateur Date: Tue, 24 Oct 2023 16:12:59 +0200 Subject: [PATCH] update QuBit.md --- QElephant/QuBit.py | 2 +- docs/QuBit/MuBit.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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.