oscillator
Oscillator gates.
CD(N, beta, ts=None)
Conditional displacement gate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N
|
Hilbert space dimension. |
required | |
beta
|
Conditional displacement amplitude. |
required | |
ts
|
Optional time sequence for hamiltonian simulation. |
None
|
Returns:
| Type | Description |
|---|---|
|
Conditional displacement gate. |
Source code in jaxquantum/circuits/library/oscillator.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | |
CR(N, theta)
Conditional rotation gate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N
|
Hilbert space dimension. |
required | |
theta
|
Conditional rotation angle. |
required |
Returns:
| Type | Description |
|---|---|
|
Conditional rotation gate. |
Source code in jaxquantum/circuits/library/oscillator.py
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | |
D(N, alpha, ts=None, c_ops=None)
Displacement gate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N
|
Hilbert space dimension. |
required | |
alpha
|
Displacement amplitude. |
required | |
ts
|
Optional time array for hamiltonian simulation. |
None
|
|
c_ops
|
Optional collapse operators. |
None
|
Returns:
| Type | Description |
|---|---|
|
Displacement gate. |
Source code in jaxquantum/circuits/library/oscillator.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | |
ECD(N, beta, ts=None)
Echoed conditional displacement gate.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N
|
Hilbert space dimension. |
required | |
beta
|
Conditional displacement amplitude. |
required | |
ts
|
Optional time sequence for hamiltonian simulation. |
None
|
Returns:
| Type | Description |
|---|---|
|
Echoed conditional displacement gate. |
Source code in jaxquantum/circuits/library/oscillator.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
diag_expm(diag_matrix)
Computes expm of a diagonal matrix efficiently (O(N) instead of O(N^3)).
Source code in jaxquantum/circuits/library/oscillator.py
16 17 18 19 | |