quchip.results.input_output

Results for continuous-wave port scattering calculations.

Classes

MeanFieldResponseResult(ports, input, ...)

Stationary mean output fields from a finite coherent probe.

OutputCorrelationResult(order, input_port, ...)

Normalized stationary output-field correlation versus delay.

OutputSpectrumResult(port, frequencies, ...)

Stationary output-field fluctuation spectra and signal photon fluxes.

Resonance(result, index)

One pole of a ResonanceResult.

ResonanceResult(frequencies, linewidths, ...)

Poles of the weak-probe response between selected ports.

SParameterResult(frequencies, ports, axes, ...)

Complete selected-port small-signal scattering over a sweep grid.

class quchip.results.input_output.SParameterResult(frequencies, ports, axes, shape, diagnostics, matrix, conjugate_matrix)[source]

Bases: object

Complete selected-port small-signal scattering over a sweep grid.

Around a phase-sensitive operating point, the response is delta <b_out> = S delta beta + T conj(delta beta). matrix stores S and conjugate_matrix stores T. Both have shape (*shape, n_ports, n_ports) and use [..., output, input] indexing in ports order. s(output, input) and t(output, input) select individual entries.

The passive-linear route reports zero for T. numpy.asarray(result) returns matrix.

Variables:
  • frequencies (scalar or array_like) – Probe frequencies in GHz.

  • ports (tuple of str) – Port labels in output/input matrix order.

  • axes (tuple) – Sweep-axis (name, values) pairs. shape is the sweep shape.

  • diagnostics (tuple of mapping) – Per-point solver diagnostics.

  • conjugate_matrix (matrix,) – S and phase-conjugating T arrays with shape (*shape, n_ports, n_ports).

  • shape (tuple of int) – Sweep-grid shape preceding the matrix axes.

frequencies: Any
ports: tuple[str, ...]
axes: tuple[tuple[str, Any], ...]
shape: tuple[int, ...]
diagnostics: tuple[Mapping[str, Any], ...]
matrix: Any
conjugate_matrix: Any
property axis_names: tuple[str, ...]

Names of the result axes, in array order.

s(output, input)[source]

Return S(output, input) over the sweep grid.

Parameters:
  • output (port object or str) – Output row and input column.

  • input (port object or str) – Output row and input column.

t(output, input)[source]

Return phase-conjugating T(output, input) over the sweep grid.

Parameters:
  • output (port object or str) – Output row and input column.

  • input (port object or str) – Output row and input column.

property s11: Any

Return reflection from the first selected plane back onto itself.

property s21: Any

Return transmission from the first selected plane to the second.

class quchip.results.input_output.ResonanceResult(frequencies, linewidths, poles, mode_labels, ports, route, _eigensystem, _problem, _transfers)[source]

Bases: object

Poles of the weak-probe response between selected ports.

The weak-probe routes of VNA.sweep() give the response S(f) = S_d + C (-i 2π f - A)^-1 (-C† S_d) with the drift A = -iH - C†C/2. Each eigenvalue λ_p of A is a pole of the S entries where its residue does not vanish, at f_p = -Im λ_p / 2π with the response linewidth κ_p = -2 Re λ_p. In the convention of SParameterResult,

S(f) = T(f) (D + Σ_p r_p / (f - z_p)), z_p = f_p + i κ_p / 4π,

where D is direct, the conjugate of S_d, and T(f) holds the transfers of the port reference planes. scattering() evaluates this sum. The poles are in increasing frequency. Iteration, an index, or the label of a pole’s dominant mode gives one Resonance.

κ_p is the full width at half maximum of |r_p / (f - z_p)|² in angular units. Near an isolated pole, where the other poles add little and the transfers vary slowly, it is the width of |S - T D|². It includes port loss, internal loss, Purcell decay and dephasing, so it can exceed the decay rate of the mode’s population. f_p is the frequency of the open system, which can differ from the closed dressed frequency of Chip.freq().

Variables:
  • frequencies (array_like, shape (poles,)) – Pole frequencies f_p in GHz, in the lab frame.

  • linewidths (array_like, shape (poles,)) – Response linewidths κ_p in 1/ns.

  • poles (array_like, shape (poles,)) – Complex poles z_p in GHz.

  • mode_labels (tuple of str) – Modes of composition: the harmonic modes, or the devices whose first excited levels span the one-excitation states, then the poles that eliminate() retained.

  • ports (tuple of str) – Port labels in the output and input order of residues.

  • route (SolveRoute) – The weak-probe route and the reason for it.

frequencies: Any
linewidths: Any
poles: Any
mode_labels: tuple[str, ...]
ports: tuple[str, ...]
route: Any
property composition: Any

Weight of each mode in each pole, shape (poles, modes).

Row p is |v_pk|² / Σ_k |v_pk|² for the right eigenvector v_p of the drift, in mode_labels order. It describes the pole in the mode basis. It is not an occupation probability, because the drift is not normal in general. At a repeated pole, the rows of the copies depend on the chosen eigenvectors. A JAX derivative of it raises, because JAX does not differentiate the eigenvectors of a general matrix.

property dominant: tuple[str, ...]

Mode label with the largest weight in each pole.

The labels need concrete values, so inside jax.jit they raise. Select poles by index there.

property direct: Any

Instantaneous scattering D between the ports, shape (ports, ports).

It is the conjugate of S_d, in the convention of SParameterResult.

property residues: Any

Residue r_p of each S entry at each pole, shape (poles, ports, ports).

The entries are [pole, output, input], before the reference-plane transfers. At a repeated pole, only the sum over the copies is defined, and it can cancel in an entry. A JAX derivative of them raises, as for composition.

property dark: Any

Whether the selected ports do not see each pole, shape (poles,).

The residue of pole p from input i to output j is the product of c_j v_p, how output j sees the right eigenvector v_p, and u_p† b_i, how input i excites it. Here c_j is row j of C and b_i is column i of B = -C† S_d. The pole is dark when no output sees it, |c_j v_p| <= 1e-10 |c_j| |v_p| for every j, or no input excites it, |u_p† b_i| <= 1e-10 |u_p| |b_i| for every i. Its residues are then numerically negligible, and it stays an eigenvalue of the drift, for example of a mode that only a hidden loss channel reaches. Each port is compared with its own scale, so a weak port does not make a pole dark: a lossless resonator with a port rate of 1e-12 /ns reflects -1 on resonance.

scattering(frequencies)[source]

Return S(f) from the poles, shape (*frequencies.shape, ports, ports).

It includes the reference-plane transfers, so on the weak-probe route it equals VNA.sweep() at the same frequencies. It uses the residues, so a JAX derivative of it raises.

Parameters:

frequencies (scalar or array_like) – Probe frequencies in GHz.

class quchip.results.input_output.Resonance(result, index)[source]

Bases: object

One pole of a ResonanceResult.

Variables:
  • result (ResonanceResult) – The poles that hold this one.

  • index (int) – Position of the pole in increasing frequency.

result: ResonanceResult
index: int
property frequency: Any

Pole frequency in GHz.

property linewidth: Any

Response linewidth κ in 1/ns.

property pole: Any

Complex pole f + iκ/4π in GHz.

property dominant: str

Mode label with the largest weight.

property composition: dict[str, Any]

Weight of each mode, keyed by mode label.

property residues: Any

Residue of each S entry, shape (ports, ports), as [output, input].

property dark: Any

Whether the selected ports do not see this pole.

class quchip.results.input_output.MeanFieldResponseResult(ports, input, frequencies, amplitudes, axes, shape, diagnostics, values, incident)[source]

Bases: object

Stationary mean output fields from a finite coherent probe.

values stores <b_out> at every selected plane with shape (*shape, n_ports) in ports order. incident stores the input amplitude beta broadcast to shape. axes lists chip and pump sweep axes first, followed by "amplitude" and "frequency" when those arguments are arrays.

If no fixed pump leaves a coherent mean at that plane and carrier, ratio(plane) approaches the corresponding small-signal S-parameter as beta goes to zero. ratio(plane) is NaN where beta is zero. The result contains one stationary mean-field branch. It does not encode sweep-rate hysteresis or metastable branches.

Variables:
  • ports (tuple of str) – Selected output labels in the final array axis.

  • input (str) – Probe input label.

  • amplitudes (frequencies,) – Probe values in GHz and 1/sqrt(ns).

  • axes (tuple) – Sweep-axis (name, values) pairs. shape is their array shape.

  • diagnostics (tuple of mapping) – Per-point stationary-solver diagnostics.

  • values (array_like) – Complex output means with shape (*shape, n_ports).

  • incident (array_like) – Incident amplitude broadcast over shape.

  • shape (tuple of int) – Sweep-grid shape preceding the port axis.

ports: tuple[str, ...]
input: str
frequencies: Any
amplitudes: Any
axes: tuple[tuple[str, Any], ...]
shape: tuple[int, ...]
diagnostics: tuple[Mapping[str, Any], ...]
values: Any
incident: Any
property axis_names: tuple[str, ...]

Names of the result axes, in array order.

mean(plane)[source]

Return stationary <b_out> at plane with shape shape.

Parameters:

plane (port object or str) – Output reference plane.

ratio(plane)[source]

Return the stationary <b_out>/beta at plane with shape shape.

The result is complex NaN where the incident beta is zero. Its zero-amplitude limit is the corresponding small-signal S-parameter when no fixed pump leaves a coherent mean at that plane and carrier.

Parameters:

plane (port object or str) – Output reference plane.

class quchip.results.input_output.OutputSpectrumResult(port, frequencies, total_fluctuation_spectrum, signal_fluctuation_spectrum, added_noise_spectrum, signal_photon_flux, signal_coherent_flux, signal_incoherent_flux, steady_state, fourier_convention='2 Re integral_0^inf d tau exp(-j 2 pi f tau) C_engineering(tau), j=i', diagnostics=<factory>)[source]

Bases: object

Stationary output-field fluctuation spectra and signal photon fluxes.

signal_fluctuation_spectrum is device-generated spectral excess, with input-system interference for thermal fields. It can be negative. added_noise_spectrum is directly propagated thermal and amplifier noise, and total_fluctuation_spectrum is their sum. signal_photon_flux is the propagated device-field flux, split into signal_coherent_flux and signal_incoherent_flux. These fluxes exclude added noise, because converting a spectral density to flux requires a detection bandwidth.

Variables:
  • port (str) – Output port label.

  • frequencies (array_like) – Offset frequencies in GHz.

  • added_noise_spectrum (total_fluctuation_spectrum, signal_fluctuation_spectrum,) – Normal-ordered spectral densities in frequency order.

  • signal_incoherent_flux (signal_photon_flux, signal_coherent_flux,) – Propagated flux terms in photons/ns.

  • steady_state (SteadyStateResult) – Captured stationary state used for the spectra.

  • fourier_convention (str) – Definition of the reported two-sided spectrum. The engineering correlation is the conjugate of the internal physics correlation.

  • diagnostics (mapping) – The solve’s route under "route" and its name under "solver", with the truncation entries of a solve on excitation sectors.

port: str
frequencies: Any
total_fluctuation_spectrum: Any
signal_fluctuation_spectrum: Any
added_noise_spectrum: Any
signal_photon_flux: Any
signal_coherent_flux: Any
signal_incoherent_flux: Any
steady_state: Any
fourier_convention: str = '2 Re integral_0^inf d tau exp(-j 2 pi f tau) C_engineering(tau), j = i'
diagnostics: Mapping[str, Any]
class quchip.results.input_output.OutputCorrelationResult(order, input_port, output_port, delays, values, unnormalized, input_intensity, output_intensity, steady_state, normalization, diagnostics=<factory>)[source]

Bases: object

Normalized stationary output-field correlation versus delay.

Variables:
  • order ({1, 2}) – Correlation order.

  • output_port (input_port,) – Correlation input and delayed output labels.

  • delays (array_like) – Non-negative delays in ns.

  • unnormalized (values,) – Normalized and raw correlation values in delay order.

  • output_intensity (input_intensity,) – Mean photon fluxes used for normalization.

  • steady_state (SteadyStateResult) – Captured stationary state.

  • normalization (str) – Human-readable normalization convention.

  • diagnostics (mapping) – The solve’s route under "route" and its name under "solver", with the truncation entries of a solve on excitation sectors.

order: int
input_port: str
output_port: str
delays: Any
values: Any
unnormalized: Any
input_intensity: Any
output_intensity: Any
steady_state: Any
normalization: str
diagnostics: Mapping[str, Any]
property port: str

Delayed output port, kept for single-port result code.

property intensity: Any

Delayed output intensity, kept for single-port result code.