980 B
980 B
IQuBit
IQuBit(n: int, mb: MuBit)
IQuBit(QuBit)
- n: the position of the QuBit in the list of intricated QuBits
- mb: the MuBit which organises the intricated QuBit
Attributes
-
__n: intthe position of the QuBit in the list of intricated QuBits
-
__Mubit: MuBitthe MuBit which organises the intricated QuBit -
__intricated: booltells if the QuBit is intricated or not
Methode
-
__init__(n: int, mb: MuBit) -> Noneinitiates the qubit
-
is_intricated() -> boolreturns the value of __intricated
-
get_MuBit() -> MuBitreturns the MuBit in wich the QuBit is intricated.
-
__str__() -> strreturns a string representation of the list of __state
-
__apply(m: Matrix) -> Nonetakes 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.