quantcore_circuits.analysis.epr_lumped¶
Energy participation ratios of lumped junctions, without field integrals.
A junction in a layout is a lumped inductor (L_J, plus C_J), so its participation in a mode can be had without the
pyEPR line integral of the fields (quantcore_circuits.analysis.epr, qcc_solve.py). Three routes give the
same quantity p_mj, the fraction of mode m’s inductive energy stored in junction j:
eigenmode-dLHellmann-Feynman on the eigenmode frequencies. Solve the eigenmode problem again with the inductance of one junction changed by a few percent (the other junctions and the mesh as before); then
p_mj = -2 (L_j / omega_m) d omega_m / d L_j = -2 d ln f_m / d ln L_j(eigenmode_dL()). One extra solve per junction and perturbation; no field export. For a lumped LC with the junction in series with the rest of the inductance it is exactlyL_J / L_total.lomThe LOM’s normal modes (QuCat) already hold each mode’s inductive energy per element (
LomResult.modes[m].participation):epr_from_lom(). Free, but only as good as the component estimates.energyThe field-solver route: peak junction current and total energy,
p = 1/2 L_J I^2 / U(epr_from_energy()).
Every route returns the same dict (epr_result()) built with the standard EPR formulas
(quantcore_circuits.analysis.epr.epr_hamiltonian(): phi_zpf from p_mj, the cosine expanded, numerical
diagonalisation): {"method", "modes": [{"label", "f_GHz", "kind"}], "junctions", "p", "alpha_MHz", "chi_MHz",
"lamb_MHz", "notes", ...}. chi_MHz is the M x M matrix with the self-Kerr (alpha) on the diagonal and the
cross-Kerr off it, lamb_MHz the dressed minus the linear frequency (Lamb shift, includes the zero-point term).
compare_epr() lines two results up mode by mode (LOM against eigenmode).
Sign. The dL and LOM routes give |p|; the relative sign s_mj of a junction’s phase in a mode only matters when
one mode touches two junctions (cross-Kerr between them). It defaults to +1 and can be passed in.
Attributes¶
Functions¶
|
Line two EPR results up mode by mode ( |
|
|
|
p of one mode from |
|
EPR from eigenmode solves at different L_J (route |
|
EPR from the field solution: |
|
The contract dict from a solved eigenmode job's |
|
EPR from a LOM result ( |
|
One EPR result as markdown: a row per mode (f linear and dressed, p per junction, alpha, Lamb shift) and the |
|
The EPR-result dict from linear frequencies |
Module Contents¶
- quantcore_circuits.analysis.epr_lumped.compare_epr(a: dict, b: dict, max_df: float = 0.05) list[dict]¶
Line two EPR results up mode by mode (
aagainstb, e.g. LOM against eigenmode).Each mode of
ais paired with the mode ofbof the same label if there is one, else the nearest in frequency (withinmax_dfrelative). Row:label,f_a/f_b(GHz),p_a/p_b(the largest participation),dp,alpha_a/alpha_b(MHz) andd_alpha_pct;Nonewhen there is no partner.
- quantcore_circuits.analysis.epr_lumped.compare_md(a: dict, b: dict, **kw) str¶
compare_epr()as a markdown table (ais the first column group).
- quantcore_circuits.analysis.epr_lumped.dL_participation(lj0_nH: float, points: collections.abc.Sequence[tuple[float, float]]) float¶
p of one mode from
(L_J, f)points that include the nominal one (at least two points).p = -2 d ln f / d ln L_J: the log-log slope at the nominal L_J. Two points: the finite difference (the slope at their geometric mean, error ~ the relative step); three or more: a quadratic fit in ln L_J, evaluated at the nominal value (error ~ the step cubed).
- quantcore_circuits.analysis.epr_lumped.eigenmode_dL(f0_GHz, lj_nH, perturbed: collections.abc.Mapping, labels: collections.abc.Sequence[str] | None = None, kinds: collections.abc.Sequence[str] | None = None, junctions: collections.abc.Sequence[str] | None = None, s_mj=None, **kw) dict¶
EPR from eigenmode solves at different L_J (route
eigenmode-dL).f0_GHz: the nominal eigenmode frequencies (a list, aresults.jsondict or a path to it).lj_nH: the nominal L_J of each junction.perturbed:{junction (index or name): [(L_J_new_nH, solve), ...]}, one or more solves in which only that junction’s L_J was changed (solve: frequencies, a results dict or a path). Symmetric steps of 1-5 % (two solves: -d and +d) are best; keep the mesh the same across the solves, because the adaptive mesh noise of separate runs is of the order of the frequency shift for weakly participating modes. A junction without perturbed solves gets p = 0 and a note.
- quantcore_circuits.analysis.epr_lumped.epr_from_energy(f_GHz, lj_nH, i_peak_A, u_total_J, labels=None, kinds=None, junctions=None, s_mj=None, **kw) dict¶
EPR from the field solution:
i_peak_A(M x J, peak current through each junction in each mode) andu_total_J(M, total energy of the mode),p = 1/2 L_J I^2 / U(the existingjunction_participation_from_energy()).
- quantcore_circuits.analysis.epr_lumped.epr_from_job(results: collections.abc.Mapping | str | pathlib.Path, **kw) dict¶
The contract dict from a solved eigenmode job’s
results.jsonthat already holds pyEPR values (epr): the energy route as the solver ran it, with the participations, Lj and frequencies it recorded.
- quantcore_circuits.analysis.epr_lumped.epr_from_lom(lom, s_mj=None, max_modes: int | None = None, **kw) dict¶
EPR from a LOM result (
lom.simulate.simulate/Designer.simulate): each normal mode’s inductive-energy fraction in each junction is its participation, the linear frequencies are the LOM’s.max_modes: keep only the first modes (qubits first, then by frequency); default all that couple to a junction.
- quantcore_circuits.analysis.epr_lumped.epr_md(res: dict) str¶
One EPR result as markdown: a row per mode (f linear and dressed, p per junction, alpha, Lamb shift) and the cross-Kerr matrix of the modes that couple to a junction.
- quantcore_circuits.analysis.epr_lumped.epr_result(method: str, f_GHz, p, lj_nH, labels: collections.abc.Sequence[str] | None = None, kinds: collections.abc.Sequence[str] | None = None, junctions: collections.abc.Sequence[str] | None = None, s_mj=None, notes: collections.abc.Sequence[str] = (), p_min: float = P_MIN, numerical: bool = True, **kw) dict¶
The EPR-result dict from linear frequencies
f_GHz(M), participationsp(M x J) andlj_nH(J).kindsdefaults to “qubit” for a mode with a participation above 0.5 and “other” otherwise.kwgoes toepr_hamiltonian()(cos_trunc,fock_trunc).
- quantcore_circuits.analysis.epr_lumped.MAX_NUMERIC_MODES = 4¶
- quantcore_circuits.analysis.epr_lumped.P_MIN = 0.0001¶