Update methods

This commit is contained in:
Didictateur 2023-10-22 18:38:55 +02:00 committed by GitHub
parent f088587ed4
commit 256945abeb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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