Update methods
This commit is contained in:
parent
f088587ed4
commit
256945abeb
1 changed files with 15 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue