quchip.engine.linear_response

Structural lowering for exact passive-linear input-output response.

Functions

is_linear_mode(device, backend)

Return if the authored local Hamiltonian is a passive harmonic Fock mode.

response_drift(problem)

Return the drift A = -iH - C†C/2 of a weak-probe problem, in rad/ns.

response_poles(problem)

Return the poles of a weak-probe response, the eigenvalues of its drift.

try_build_linear_response_problem(chip, ...)

Return a compact passive-linear problem, or None for fallback.

try_build_weak_probe_problem(chip, ...)

Return a compact problem for an infinitesimal probe and its route, or None.

vacuum_drift(chip)

Return the mode labels and the drift -iH - C†C/2 of the vacuum response, or None.

Classes

ResponsePoles(values, vectors, inverse, drift)

Eigensystem of a weak-probe drift, with the poles in increasing frequency.

quchip.engine.linear_response.is_linear_mode(device, backend)[source]

Return if the authored local Hamiltonian is a passive harmonic Fock mode.

quchip.engine.linear_response.try_build_linear_response_problem(chip, frequencies, *, plane_labels)[source]

Return a compact passive-linear problem, or None for fallback.

quchip.engine.linear_response.try_build_weak_probe_problem(chip, frequencies, *, plane_labels)[source]

Return a compact problem for an infinitesimal probe and its route, or None.

A passive harmonic chip keeps its mode equations ("linear_response"). An excitation-conserving chip with a stationary vacuum is projected onto its vacuum and one-excitation states ("vacuum_response"). Both are exact for an infinitesimal probe. Only the harmonic route stays exact for a finite probe or noisy inputs.

quchip.engine.linear_response.vacuum_drift(chip)[source]

Return the mode labels and the drift -iH - C†C/2 of the vacuum response, or None.

The modes are the one-excitation states of the devices, followed by the retained poles. None means that the chip has no vacuum one-excitation model.

quchip.engine.linear_response.response_drift(problem)[source]

Return the drift A = -iH - C†C/2 of a weak-probe problem, in rad/ns.

The backends solve S(f) = S_d + C (-i 2π f - A)^-1 (-C† S_d) with this drift, so its eigenvalues are the poles of the response.

class quchip.engine.linear_response.ResponsePoles(values, vectors, inverse, drift)[source]

Bases: object

Eigensystem of a weak-probe drift, with the poles in increasing frequency.

Variables:
  • values (array_like) – Eigenvalues λ_p of the drift in rad/ns. They stay differentiable on a fixed structure away from degenerate poles.

  • vectors (array_like) – Right eigenvectors as columns, with the derivative stopped, for discrete choices and checks.

  • inverse (array_like) – Inverse of vectors. Its rows are the left eigenvectors.

  • drift (array_like) – The drift A in rad/ns.

values: Any
vectors: Any
inverse: Any
drift: Any
modes()[source]

Return the right eigenvectors and their inverse in the order of values.

A JAX derivative that reaches them through the drift raises, because JAX does not differentiate the eigenvectors of a general matrix.

quchip.engine.linear_response.response_poles(problem)[source]

Return the poles of a weak-probe response, the eigenvalues of its drift.

The eigensolves subtract the mean frequency of the drift, which keeps the pole splittings accurate. They keep its damping, so adding the mean back does not cancel digits of a narrow linewidth. Two ill-conditioned poles that are too close to resolve raise. This happens near an exceptional point, where two poles merge.