quchip.inverse_design.types¶
Classes
|
Result of a |
|
Per-target record from a |
- class quchip.inverse_design.types.ObservableReport(kind, label, target, initial, final, evaluator)[source]¶
Bases:
objectPer-target record from a
fit_a_dressrun.- label¶
Target locator — a device label for single-device observables, a
(label_a, label_b)tuple for pair observables, or a coupling label for coupling-keyed observables.- Type:
Any
- evaluator¶
"full"if this target was evaluated on the whole chip or"local"if it was evaluated on a one-hop subsystem (seemax_hilbert_diminfit_a_dress()).- Type:
- class quchip.inverse_design.types.FitADressResult(chip, loss, history, initial_targets, final_targets, initial_params, final_params, solver_info)[source]¶
Bases:
objectResult of a
fit_a_dress()optimization run.- Parameters:
- chip¶
Fitted chip — a clone of the seed with updated
freq/anharmonicityand coupling-strength values. The seed chip is never mutated. Exposing.chipmakes this satisfyChipTransformstructurally, with no inheritance required.- Type:
- history¶
1-D
numpyarray holding[loss_initial, loss_final]. A compact record of how far the solver moved; it is not a per-iteration trace becausescipy.optimize.least_squaresdoes not expose one.- Type:
Any
- initial_targets¶
One
ObservableReportper target, evaluated on the seed chip.- Type:
- final_targets¶
One
ObservableReportper target, evaluated on the fitted chip.- Type:
- initial_params¶
{parameter_name: seed_value}— the starting point passed to the optimizer.
- final_params¶
{parameter_name: fitted_value}— the optimizer output. Parameter names follow"<device>.freq","<device>.anharmonicity", and"<coupling>.<coupling_strength_name>"—"<coupling>.g"forCapacitive,"<coupling>.g_0"forTunableCapacitive,"<coupling>.chi"forCrossKerr.
- solver_info¶
scipysolver metadata (method,status,message,nfev,jacobian), plus the identifiability receipt recorded for everyfit_a_dress()call:n_free_parameters(length offinal_params),n_target_residuals(length offinal_targets), andunderdetermined_by_count(Truewhen the former exceeds the latter — a necessary, not sufficient, identifiability condition; no Jacobian-rank analysis is performed).jacobianis"jax"when a JAX-native backend supplies the exact residual Jacobian and"finite-difference"otherwise.
- history: Any¶
- initial_targets: tuple[ObservableReport, ...]¶
- final_targets: tuple[ObservableReport, ...]¶
- rebind(seed: BaseDevice | str, /) BaseDevice[source]¶
- rebind(seed: BaseDevice | str, /, *more: BaseDevice | str) tuple[BaseDevice, ...]
Look up the fitted clones matching one or more seed devices.
fit.rebind(qb, tc, cr)replaces theqb_f = chip.device_map[qb.label]triple most tutorials opened with.- Parameters:
*seeds (BaseDevice or str) – One or more devices (or their labels) from the seed chip passed to
fit_a_dress(). At least one is required.- Returns:
The matching device(s) on
chip(the fitted clone), in input order. A single positionalseedreturns that device directly; two or more return a tuple.- Return type:
BaseDevice or tuple[BaseDevice, …]
- Raises:
ValueError – No seeds were given.