API documentation
compute_rates(eigvals, t_minus, t_plus, biases, temperature)
Compute lead-resolved transition rates for a bias sweep.
Parameters
eigvals : np.ndarray
Eigenvalues E_n of shape (N,) aligned with the eigenvectors in t_*.
t_minus : np.ndarray
Lead tunneling matrices (L, N, N) for removal processes.
t_plus : np.ndarray
Lead tunneling matrices (L, N, N) for addition processes.
biases : np.ndarray
Bias grid of shape (S, L) (broadcast from (S,) or (L,)) where
S is sweep points and L is number of leads.
temperature : float
Positive temperature (same units as eigvals and biases).
Returns
tuple[np.ndarray, np.ndarray]
(w_plus, w_minus) of shape (S, L, N, N) with add/remove rates per
sweep point and lead.
Source code in qrate/solvers.py
69 70 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 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | |
compute_t_matrices(eigvecs, lead_couplings)
Transform lead couplings into the eigenbasis.
Parameters
eigvecs : np.ndarray
Unitary eigenvector matrix U of shape (N, N) (columns = eigenstates).
lead_couplings : list[np.ndarray]
Coupling matrices C_alpha of shape (N, N) for each lead alpha.
If empty, returns empty arrays.
Returns
tuple[np.ndarray, np.ndarray]
t_minus and t_plus with shape (L, N, N) where
t_minus[alpha] = U^dagger C_alpha U and
t_plus[alpha] = t_minus[alpha]^dagger.
Source code in qrate/solvers.py
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
g_matrix(solver, biases, step=1e-05)
Compute conductance via central finite differences of a current solver.
For each sweep point s and lead index j we evaluate
.. math:: G_{ij}(s) pprox rac{I_i(V_s + h e_j) - I_i(V_s - h e_j)}{2h}
using the provided solver to recompute currents at perturbed biases.
Parameters
solver : callable
Function mapping biases (S, L) to currents (S, L).
biases : np.ndarray
Bias grid of shape (S, L) (or (S,)).
step : float, optional
Perturbation size h for the central difference.
Returns
np.ndarray
Conductance tensor (S, L, L) where G[s, i, j] = dI_i/dV_j.
Source code in qrate/solvers.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
n_fermi(energy_diff, temperature)
Fermi-Dirac occupations clipped to avoid overflow.
Parameters
energy_diff : np.ndarray
Energy offsets E_f - E_i - mu; any broadcastable shape.
temperature : float
Positive temperature (same energy units). Must be > 0.
Returns
np.ndarray
Occupations in [0, 1] with energy_diff.shape.
Source code in qrate/solvers.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | |
solve_master_equation(w_plus, w_minus)
Solve the steady-state master equation for each bias point.
Parameters
w_plus : np.ndarray
Addition rates (S, L, N, N) from compute_rates.
w_minus : np.ndarray
Removal rates (S, L, N, N) from compute_rates.
Returns
tuple[np.ndarray, np.ndarray, np.ndarray]
occupations (S, N state probabilities), currents (S, L net
current into the system per lead), and W (S, N, N total transition
matrix summed over leads).
Source code in qrate/solvers.py
155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |
solve_system(hamiltonian, leads, temperature, parity_op=None, *, system_parameters=None, lead_parameters=None)
Build a callable that returns conductance for given biases.
Parameters
hamiltonian : array-like or callable
Static Hamiltonian matrix (N, N) or callable returning one; called
with system_parameters filtered to matching keywords.
leads : list[array-like or callable]
Lead coupling matrices C_alpha (N, N) or callables returning them;
each is called with lead_parameters filtered to matching keywords.
temperature : float
Positive temperature used in Fermi factors (same energy units as biases).
parity_op : np.ndarray, optional
Parity operator commuting with H; required (no automatic fallback).
system_parameters : dict, optional
Keyword arguments forwarded to the Hamiltonian callable.
lead_parameters : dict, optional
Keyword arguments forwarded to each lead callable.
Returns
callable
Function solver(biases) -> G that maps a bias grid (S, L) to the
conductance tensor (S, L, L) using g_matrix.
Source code in qrate/solvers.py
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | |