Flowchart of qrate/solvers.py
This document outlines the main data flow in qrate.solvers.
Flowchart
graph TD
subgraph "Solver Construction"
SS["solve_system"]
SS_IN["Inputs: hamiltonian, leads, temperature, parity_op, system_parameters, lead_parameters"]
MAT["Materialize Hamiltonian and lead matrices"]
PD["parity_diag"]
TM["compute_t_matrices"]
OUT["Output: conductance function"]
SS_IN --> SS
SS --> MAT
MAT --> PD
PD --> TM
TM --> OUT
end
subgraph "Runtime Evaluation"
BIAS["biases"]
GM["g_matrix"]
CUR["current solver closure"]
RATES["compute_rates"]
MEQ["solve_master_equation"]
G["conductance tensor"]
BIAS --> GM
GM --> CUR
CUR --> RATES
RATES --> MEQ
MEQ --> CUR
CUR --> GM
GM --> G
end
OUT -.-> GM
Function Descriptions
solve_system
Constructs a callable conductance solver from a Hamiltonian, lead coupling matrices, temperature, and parity operator. The Hamiltonian and leads may be arrays or callables; callable inputs receive matching keys from system_parameters and lead_parameters.
The returned function maps a bias grid with shape (S, L) to a conductance tensor with shape (S, L, L).
parity_diag
Jointly diagonalizes the Hamiltonian and parity operator, preserving parity sectors before sorting states by energy.
compute_t_matrices
Transforms lead coupling matrices into the Hamiltonian eigenbasis and returns the removal and addition tunneling matrices.
compute_rates
Computes lead-resolved addition and removal rates for every bias point using Fermi-Dirac occupations.
solve_master_equation
Solves the steady-state rate equation for each bias point and returns occupations, currents, and the total transition matrix.
g_matrix
Computes the conductance tensor with central finite differences of the current solver.