From 256945abeb45f866e80753b9c631a55b992d3da9 Mon Sep 17 00:00:00 2001 From: Didictateur <105631786+Didictateur@users.noreply.github.com> Date: Sun, 22 Oct 2023 18:38:55 +0200 Subject: [PATCH] Update methods --- docs/QuBit/QuBit.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/QuBit/QuBit.md b/docs/QuBit/QuBit.md index 3b3d056..af9c195 100644 --- a/docs/QuBit/QuBit.md +++ b/docs/QuBit/QuBit.md @@ -17,21 +17,29 @@ QuBit(alpha: complexe, beta: complexe) ### Methode -- ```__init__(l: list[list[complex]]=[]) -> None``` +- ```__init__(alpha: complexe=1, beta: complexe=0) -> None``` - initiates the matrix + initiates the qubit -- ```__mul__(__value: "Matrix") -> Matrix``` +- ```is_intricated() -> bool``` - defines the natural multiplication as the Koeneger product for matrices + returns the value of __intricated -- ```__apply(x: list[complex]) -> list[complex]``` +- ```get_MuBit() -> None``` - takes a list to represent a vector in a colonne, and return the proctuct of the matrix by this vector + returns the MuBit in wich the QuBit is intricated. If not intricated, rerurns None - ```__str__() -> str``` - returns a string representation of the matrix + returns a string representation of the list of __state + +- ```__apply(m: Matrix) -> None``` + + takes a Matrix and modifies the QuBit according the matrix + +- ```observe() -> list[int]``` + + forces the QuBit in a state, where the probabilities are given throught __state. Returns the new __state obtained. ### Staticmethods