quantcore_circuits.analysis.epr

Energy-participation-ratio Hamiltonian (pyEPR calculation core, no AEDT needed).

Input: linear eigenmode frequencies (HFSS/Palace eigenmode with Lj as a lumped inductor), junction participation ratios p_mj (M modes × J junctions), signs s_mj and junction inductances. pyEPR’s QuantumAnalysis needs a pickle produced by DistributedAnalysis; the calculation functions below are what it calls internally.

participations() is pyEPR’s DistributedAnalysis.calc_p_junction + QuantumAnalysis renormalisation (config.epr.renorm_pj = True) applied to the field integrals that qcc_solve.py evaluates inside AEDT (quantcore_circuits.sim_tools.aedt_scripts), method line_voltage:

  • V_j = sign(∫Re E·dl) √((∫Re E·dl)² + (∫Im E·dl)²) over the junction line, I_j = V_j / (ω L_j);

  • U_E = ∫Re(E·εE*)/2, U_H = ∫Re(H·μH*)/2 (peak energies), U_J = ½ L_j I_j², U_Cj = ½ C_j V_j²;

  • p_mj = U_J / (U_E + ΣU_Cj), then rescaled so Σ_j p_mj = |(Ū − U_H)/Ū|, Ū = mean of total capacitive and inductive energy; s_mj = sign(V_j).

Sign conventions are converted to qcc’s (α < 0, χ = E11 − E10 − E01 + E00 < 0); pyEPR reports positive shifts.

Functions

epr_analysis(epr[, freqs_GHz, Q, tan_delta]) → dict

Participations (participations()) + EPR Hamiltonian (epr_hamiltonian()) in one dict.

epr_hamiltonian(freqs_GHz, p_mj, lj_nH[, s_mj, ...]) → dict

Dressed frequencies and χ matrix from EPR data.

epr_qutip(freqs_GHz, p_mj, lj_nH[, s_mj, fock]) → dict

Independent QuTiP check of the EPR Hamiltonian (not pyEPR's code path).

junction_participation_from_energy(freq_GHz, lj_nH, ...) → float

p_J = ½ Lj I² / U_total for a mode with peak junction current i_peak_A and total energy u_total_J.

junction_self_modes(p[, p_min, rel]) → list[int]

Modes that are a junction's lumped L_J ‖ C_J resonating on its own: p_mj ≥ p_min for one junction and

participations(epr[, freqs_GHz, renorm]) → dict

Junction participations from qcc's in-AEDT EPR integrals (<sim>_project_qcc.json "epr").

Module Contents

quantcore_circuits.analysis.epr.epr_analysis(epr: dict, freqs_GHz=None, Q=None, tan_delta: float | None = None, **kw) → dict

Participations (participations()) + EPR Hamiltonian (epr_hamiltonian()) in one dict.

Adds chi_MHz (M×M, diagonal = α), f_GHz dressed (numerical diagonalisation), the first-order values, and with tan_delta the bulk-dielectric Q per mode (1 / (p_substrate tan δ)); Q (per mode) is passed through.

quantcore_circuits.analysis.epr.epr_hamiltonian(freqs_GHz, p_mj, lj_nH, s_mj=None, cos_trunc: int = 8, fock_trunc: int = 9, numerical: bool = True) → dict

Dressed frequencies and χ matrix from EPR data.

Returns f_GHz (dressed, numerical diagonalisation or 1st-order PT), chi_MHz (M×M; diagonal = α), and the first-order values f_O1_GHz / chi_O1_MHz.

quantcore_circuits.analysis.epr.epr_qutip(freqs_GHz, p_mj, lj_nH, s_mj=None, fock: int = 8) → dict

Independent QuTiP check of the EPR Hamiltonian (not pyEPR’s code path).

H = sum_m h f_m a_m^+ a_m - sum_j EJ_j [cos(phi_j) + phi_j^2 / 2], phi_j = sum_m s_mj phi_mj (a_m + a_m^+), phi_mj^2 = p_mj h f_m / (2 EJ_j), EJ = (hbar / 2e)^2 / Lj. The cosine is exact (cosm), so only the Fock truncation differs from pyEPR’s Taylor series. Returns the dressed single-excitation f_GHz and chi_MHz (M x M, qcc sign: diagonal = alpha, off-diagonal chi_mn = E(1_m 1_n) - E(1_m) - E(1_n) + E(0)).

quantcore_circuits.analysis.epr.junction_participation_from_energy(freq_GHz: float, lj_nH: float, i_peak_A: float, u_total_J: float) → float

p_J = ½ Lj I² / U_total for a mode with peak junction current i_peak_A and total energy u_total_J.

quantcore_circuits.analysis.epr.junction_self_modes(p: dict, p_min: float = 0.95, rel: float = 0.15) → list[int]

Modes that are a junction’s lumped L_J ‖ C_J resonating on its own: p_mj ≥ p_min for one junction and f within rel of 1/2π√(L_J C_J) of that junction (with C_J > 0). Seen on coarse / fast meshes (tutorial 00, C_J 14.7 fF: a 15.65 GHz mode with p_J 0.9999 beside the real qubit mode, p_J 0.985); a circuit mode has the island’s capacitance in parallel and sits far below. Returned as mode indices (0-based).

quantcore_circuits.analysis.epr.participations(epr: dict, freqs_GHz=None, renorm: bool = True) → dict

Junction participations from qcc’s in-AEDT EPR integrals (<sim>_project_qcc.json "epr").

freqs_GHz (mode order) overrides the per-mode freq_Hz read in AEDT (e.g. the .eig export). Returns {"junctions", "Lj_nH", "Cj_fF", "f_GHz", "p_mj", "s_mj", "p_mj_raw", "U_diff", "p_volume"} with M×J lists.