operators
States.
basis(N, k)
Creates a |k> (i.e. fock state) ket in a specified Hilbert Space.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
N
|
int
|
Hilbert space dimension |
required |
k
|
int
|
fock number |
required |
Returns:
Type | Description |
---|---|
Fock State |k> |
Source code in jaxquantum/core/operators.py
162 163 164 165 166 167 168 169 170 171 172 |
|
basis_like(A, ks)
Creates a |k> (i.e. fock state) ket with the same space dims as A.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
A
|
Qarray
|
state or operator. |
required |
k
|
fock number. |
required |
Returns:
Type | Description |
---|---|
Qarray
|
Fock State |k> with the same space dims as A. |
Source code in jaxquantum/core/operators.py
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
|
coherent(N, α)
Coherent state.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
N
|
int
|
Hilbert Space Size. |
required |
α
|
complex
|
coherent state amplitude. |
required |
Return
Coherent state |α⟩.
Source code in jaxquantum/core/operators.py
175 176 177 178 179 180 181 182 183 184 185 |
|
create(N)
creation operator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
N
|
Hilbert space size |
required |
Returns:
Type | Description |
---|---|
Qarray
|
creation operator in Hilber Space of size N |
Source code in jaxquantum/core/operators.py
98 99 100 101 102 103 104 105 106 107 |
|
destroy(N)
annihilation operator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
N
|
Hilbert space size |
required |
Returns:
Type | Description |
---|---|
Qarray
|
annilation operator in Hilber Space of size N |
Source code in jaxquantum/core/operators.py
86 87 88 89 90 91 92 93 94 95 |
|
displace(N, α)
Displacement operator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
N
|
Hilbert Space Size |
required | |
α
|
Phase space displacement |
required |
Returns:
Type | Description |
---|---|
Qarray
|
Displace operator D(α) |
Source code in jaxquantum/core/operators.py
145 146 147 148 149 150 151 152 153 154 155 156 |
|
hadamard()
H
Returns:
Name | Type | Description |
---|---|---|
H |
Qarray
|
Hadamard gate |
Source code in jaxquantum/core/operators.py
42 43 44 45 46 47 48 |
|
identity(*args, **kwargs)
Identity matrix.
Returns:
Type | Description |
---|---|
Qarray
|
Identity matrix. |
Source code in jaxquantum/core/operators.py
122 123 124 125 126 127 128 |
|
identity_like(A)
Identity matrix with the same shape as A.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
A
|
Matrix. |
required |
Returns:
Type | Description |
---|---|
Qarray
|
Identity matrix with the same shape as A. |
Source code in jaxquantum/core/operators.py
131 132 133 134 135 136 137 138 139 140 141 142 |
|
num(N)
Number operator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
N
|
Hilbert Space size |
required |
Returns:
Type | Description |
---|---|
Qarray
|
number operator in Hilber Space of size N |
Source code in jaxquantum/core/operators.py
110 111 112 113 114 115 116 117 118 119 |
|
qubit_rotation(theta, nx, ny, nz)
Single qubit rotation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
theta
|
float
|
rotation angle. |
required |
nx
|
rotation axis x component. |
required | |
ny
|
rotation axis y component. |
required | |
nz
|
rotation axis z component. |
required |
Returns:
Type | Description |
---|---|
Qarray
|
Single qubit rotation operator. |
Source code in jaxquantum/core/operators.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
|
sigmam()
σ-
Returns:
Type | Description |
---|---|
Qarray
|
σ- Pauli Operator |
Source code in jaxquantum/core/operators.py
51 52 53 54 55 56 57 |
|
sigmap()
σ+
Returns:
Type | Description |
---|---|
Qarray
|
σ+ Pauli Operator |
Source code in jaxquantum/core/operators.py
60 61 62 63 64 65 66 |
|
sigmax()
σx
Returns:
Type | Description |
---|---|
Qarray
|
σx Pauli Operator |
Source code in jaxquantum/core/operators.py
15 16 17 18 19 20 21 |
|
sigmay()
σy
Returns:
Type | Description |
---|---|
Qarray
|
σy Pauli Operator |
Source code in jaxquantum/core/operators.py
24 25 26 27 28 29 30 |
|
sigmaz()
σz
Returns:
Type | Description |
---|---|
Qarray
|
σz Pauli Operator |
Source code in jaxquantum/core/operators.py
33 34 35 36 37 38 39 |
|
thermal(N, beta)
Thermal state.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
N
|
int
|
Hilbert Space Size. |
required |
beta
|
float
|
thermal state inverse temperature. |
required |
Return
Thermal state.
Source code in jaxquantum/core/operators.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
|