operators
States.
basis(N, k, implementation=QarrayImplType.DENSE)
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 |
implementation
|
QarrayImplType
|
Qarray implementation type, e.g. "sparse" or "dense". |
DENSE
|
Returns:
| Type | Description |
|---|---|
|
Fock State |k> |
Source code in jaxquantum/core/operators.py
261 262 263 264 265 266 267 268 269 270 271 272 | |
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
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |
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
288 289 290 291 292 293 294 295 296 297 298 | |
create(N, implementation=QarrayImplType.DENSE)
creation operator
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N
|
Hilbert space size |
required | |
implementation
|
QarrayImplType
|
Qarray implementation type, e.g. "sparse" or "dense". |
DENSE
|
Returns:
| Type | Description |
|---|---|
Qarray
|
creation operator in Hilber Space of size N |
Source code in jaxquantum/core/operators.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | |
destroy(N, implementation=QarrayImplType.DENSE)
annihilation operator
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N
|
Hilbert space size |
required | |
implementation
|
QarrayImplType
|
Qarray implementation type, e.g. "sparse" or "dense". |
DENSE
|
Returns:
| Type | Description |
|---|---|
Qarray
|
annilation operator in Hilber Space of size N |
Source code in jaxquantum/core/operators.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | |
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
222 223 224 225 226 227 228 229 230 231 232 233 | |
hadamard(implementation=QarrayImplType.DENSE)
H
Returns:
| Name | Type | Description |
|---|---|---|
H |
Qarray
|
Hadamard gate |
Source code in jaxquantum/core/operators.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 | |
identity(*args, implementation=QarrayImplType.DENSE, **kwargs)
Identity matrix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
implementation
|
QarrayImplType
|
Qarray implementation type, e.g. "sparse" or "dense". |
DENSE
|
Returns:
| Type | Description |
|---|---|
Qarray
|
Identity matrix. |
Source code in jaxquantum/core/operators.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | |
identity_like(A, implementation=QarrayImplType.DENSE)
Identity matrix with the same shape as A.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
A
|
Matrix. |
required | |
implementation
|
QarrayImplType
|
Qarray implementation type, e.g. "sparse" or "dense". |
DENSE
|
Returns:
| Type | Description |
|---|---|
Qarray
|
Identity matrix with the same shape as A. |
Source code in jaxquantum/core/operators.py
207 208 209 210 211 212 213 214 215 216 217 218 219 | |
multi_mode_basis_set(Ns)
Creates a multi-mode basis set.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
Ns
|
List[int]
|
List of Hilbert space dimensions for each mode. |
required |
Returns:
| Type | Description |
|---|---|
Qarray
|
Multi-mode basis set. |
Source code in jaxquantum/core/operators.py
274 275 276 277 278 279 280 281 282 283 284 285 | |
num(N, implementation=QarrayImplType.DENSE)
Number operator
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N
|
Hilbert Space size |
required | |
implementation
|
QarrayImplType
|
Qarray implementation type, e.g. "sparse" or "dense". |
DENSE
|
Returns:
| Type | Description |
|---|---|
Qarray
|
number operator in Hilber Space of size N |
Source code in jaxquantum/core/operators.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 | |
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
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
sigmam(implementation=QarrayImplType.DENSE)
σ-
Returns:
| Type | Description |
|---|---|
Qarray
|
σ- Pauli Operator |
Source code in jaxquantum/core/operators.py
93 94 95 96 97 98 99 100 101 102 | |
sigmap(implementation=QarrayImplType.DENSE)
σ+
Returns:
| Type | Description |
|---|---|
Qarray
|
σ+ Pauli Operator |
Source code in jaxquantum/core/operators.py
105 106 107 108 109 110 111 112 113 114 | |
sigmax(implementation=QarrayImplType.DENSE)
σx
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
implementation
|
QarrayImplType
|
Qarray implementation type, e.g. "sparse" or "dense". |
DENSE
|
Returns:
| Type | Description |
|---|---|
Qarray
|
σx Pauli Operator |
Source code in jaxquantum/core/operators.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
sigmay(implementation=QarrayImplType.DENSE)
σy
Returns:
| Type | Description |
|---|---|
Qarray
|
σy Pauli Operator |
Source code in jaxquantum/core/operators.py
53 54 55 56 57 58 59 60 61 62 | |
sigmaz(implementation=QarrayImplType.DENSE)
σz
Returns:
| Type | Description |
|---|---|
Qarray
|
σz Pauli Operator |
Source code in jaxquantum/core/operators.py
65 66 67 68 69 70 71 72 73 74 | |
squeeze(N, z)
Single-mode Squeezing operator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N
|
Hilbert Space Size |
required | |
z
|
squeezing parameter |
required |
Returns:
| Type | Description |
|---|---|
|
Sqeezing operator |
Source code in jaxquantum/core/operators.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |
thermal_dm(N, n)
Thermal state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N
|
int
|
Hilbert Space Size. |
required |
n
|
float
|
average photon number. |
required |
Return
Thermal state.
Source code in jaxquantum/core/operators.py
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | |