quchip.engine.sector_stationary

Stationary states and output statistics of excitation-conserving chips on sectors.

A coherent drive i(c* L - c L†) couples every total excitation N to N ± 1, so no finite set of sectors is closed. This module keeps the product energy labels with N <= K and the projected model P H P and P L P on them. That model differs from the full model only by the drive elements from N = K to N = K + 1. Every operator comes from the terms’ local matrices on their supports, so the product space is never formed. The backend supplies the generator that solves on these labels.

Functions

sector_probe_model(chip, labels, inputs, modes)

Return the sector model of a chip under coherent inputs, or None, with the reason.

Classes

SectorProbeModel(chip, response, labels, ...)

Sector operators of one conserving chip under coherent inputs, for any cutoff.

class quchip.engine.sector_stationary.SectorProbeModel(chip, response, labels, inputs, modes)[source]

Bases: object

Sector operators of one conserving chip under coherent inputs, for any cutoff.

Parameters:
  • chip (Chip) – Chip with a static model that conserves the total excitation.

  • response (_SectorResponseModel) – The chip’s channels, scattering and reference planes on sectors.

  • labels (tuple of str) – Selected output ports.

  • inputs (tuple of str) – Ports that carry coherent inputs at one carrier frequency.

  • modes (tuple of str) – Fock-mode devices whose amplitude and photon number are read.

size(cutoff)[source]

Return the number of product labels with N <= cutoff.

required_memory(cutoff)[source]

Return the bytes that a solve on N <= cutoff needs at the shortest Krylov restart.

peak_bytes(cutoff)[source]

Return the estimated peak bytes of a solve on N <= cutoff.

sector_sizes(cutoff)[source]

Return the size of each sector N = 0..cutoff.

operators(cutoff)[source]

Return the Hamiltonian, the channels and the mode operators on N <= cutoff.

The Hamiltonian is in rad/ns, in the lab frame and relative to the vacuum energy. The channels follow the SLH order. Each mode has its lowering operator and its number operator.

generator(cutoff)[source]

Return the backend’s truncated generator on N <= cutoff.

unique(cutoff)[source]

Return whether the lowering channels prove one stationary state on N <= cutoff.

steady_state(cutoff, solve, frame, diagnostics)[source]

Return a solve on N <= cutoff as a steady-state result on those labels.

frame is the frame of the coherent inputs, in which the solve is static. The lowering channels check that the state is unique, and an unproven state reports nullity=None.

incident(frequency, amplitudes)[source]

Return each input at its Markov boundary, in the physics convention and 1/sqrt(ns).

backgrounds(frequency, amplitudes)[source]

Return the coherent field sum_i S_ki beta_i that the inputs carry to each channel k.

drive(frequency, amplitudes)[source]

Return the drive coefficient c of each lowering channel.

stationary(cutoff, frequency, amplitudes, guess=None)[source]

Solve the stationary state on N <= cutoff for coherent inputs at frequency.

field(cutoff, frequency, amplitudes, label)[source]

Return the output field h (b I + L) of one port on N <= cutoff as a sparse matrix.

b is the coherent field that the inputs carry to the port, L the port’s channel and h its outbound transfer at frequency.

means(cutoff, frequency, amplitudes, state)[source]

Return <b_out> at the selected ports in the physics convention.

mode_values(cutoff, state)[source]

Return <a> and <a†a> of each mode in the common probe frame.

weights(cutoff, state)[source]

Return the population of each total excitation N = 0..cutoff.

quadrature_spectrum(cutoff, frequency, amplitudes, state, offsets)[source]

Return the normally ordered excess IQ spectrum of the selected ports.

It follows quchip.engine.field_statistics.quadrature_spectrum() for vacuum inputs. The source of output p is (L_p - <L_p>) rho. The adjoint source at f needs the resolvent at -f, so the solve covers every offset and its negative. Only an exact negative reuses a point, so an exactly symmetric grid needs no extra solves.

correlation(cutoff, frequency, amplitudes, state, order, output, input, delays)[source]

Return a raw stationary output correlation and the two intensities, in the physics convention.

G1(τ) = Tr(b_out† e^{Gτ}[b_in rho]) and G2(τ) = Tr(b_out† b_out e^{Gτ}[b_in rho b_in†]), where each field b keeps its coherent background as field() gives it.

quchip.engine.sector_stationary.sector_probe_model(chip, labels, inputs, modes)[source]

Return the sector model of a chip under coherent inputs, or None, with the reason.

The route needs a static model that conserves N, ports that lower N by one, other channels that lower or conserve it, vacuum inputs, no thermal device occupation, no output network, no retained mode responses and concrete values.