Update QuBit.md
This commit is contained in:
parent
256945abeb
commit
135e2f7782
1 changed files with 0 additions and 163 deletions
|
|
@ -40,166 +40,3 @@ QuBit(alpha: complexe, beta: complexe)
|
||||||
- ```observe() -> list[int]```
|
- ```observe() -> list[int]```
|
||||||
|
|
||||||
forces the QuBit in a state, where the probabilities are given throught __state. Returns the new __state obtained.
|
forces the QuBit in a state, where the probabilities are given throught __state. Returns the new __state obtained.
|
||||||
|
|
||||||
|
|
||||||
### Staticmethods
|
|
||||||
|
|
||||||
- ```I() -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
1 & 0\\
|
|
||||||
0 & 1
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```H() -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
\frac {1} {\sqrt 2} & \frac {1} {\sqrt 2}\\
|
|
||||||
\frac {1} {\sqrt 2} & -\frac{1} {\sqrt 2}
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```X() -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
0 & 1\\
|
|
||||||
1 & 0
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```Y() -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
0 & -i\\
|
|
||||||
i & 0
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```Z() -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
1 & 0\\
|
|
||||||
0 & -1
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```S() -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
1 & 0\\
|
|
||||||
0 & i
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```T() -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
1 & 0\\
|
|
||||||
0 & e^{i\frac {\pi} {4}}
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```Rx(phi: float) -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
\cos(\frac \phi 2) & -i\sin(\frac \phi 2)\\
|
|
||||||
-i\sin(\frac \phi 2) & \cos(\frac \phi 2)
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```Ry(phi: float) -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
\cos(\frac \phi 2) & -\sin(\frac \phi 2)\\
|
|
||||||
\sin(\frac \phi 2) & \cos(\frac \phi 2)
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```Rz(phi: float) -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
e^{-i\frac \phi 2} & 0\\
|
|
||||||
0 & e^{i\frac \phi 2}
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```R1(phi: float) -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
1 & p\\
|
|
||||||
0 & e^{i\phi}
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```CNOT() -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
1 & 0 & 0 & 0\\
|
|
||||||
0 & 1 & 0 & 0\\
|
|
||||||
0 & 0 & 0 & 1\\
|
|
||||||
0 & 0 & 1 & 0
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```SWAP() -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
1 & 0 & 0 & 0\\
|
|
||||||
0 & 0 & 1 & 0\\
|
|
||||||
0 & 1 & 0 & 0\\
|
|
||||||
0 & 0 & 0 & 0
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
||||||
- ```Cu(u: Matrix) -> Matrix```
|
|
||||||
|
|
||||||
returns the matrix
|
|
||||||
|
|
||||||
```math
|
|
||||||
\begin{pmatrix}
|
|
||||||
1 & 0 & 0 & 0\\
|
|
||||||
0 & 1 & 0 & 0\\
|
|
||||||
0 & 0 & u_{00} & u_{01}\\
|
|
||||||
0 & 0 & u_{10} & u_{11}
|
|
||||||
\end{pmatrix}
|
|
||||||
```
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue