quchip.engine.slh¶
Gough-James algebra on resolved SLH triples: series product, concatenation, feedback.
Every function returns a new ResolvedSLH on the same
Hilbert space as its operands and does not change them. Hamiltonian corrections
that a composition generates are appended as network-origin static terms.
Scattering stays scalar. Traced values pass through the array module that they
arrive in.
Functions
|
Return |
|
Place systems side by side with block-diagonal scattering. |
|
Connect one output channel back into one input channel. |
|
Feed every output of |
Classes
|
One exposure of a compiled network with its couplings by port and its reference plane. |
|
The Markovian core of a port network, compiled for one chip. |
|
A removed harmonic pole attached to its original quantum-port locations. |
- quchip.engine.slh.series_product(first, second)[source]¶
Feed every output of
firstinto the matching input ofsecond.Implements
G1 ▷ G2 = (S2 S1, L2 + S2 L1, H1 + H2 + (L2† S2 L1 − h.c.) / 2i). Paired channels must agree in accessibility and carrier. Reference runs are joined leg by leg, so the outbound run offirstand the inbound run ofsecondmust be empty.- Parameters:
first (ResolvedSLH) – Systems with equal channel counts on one Hilbert space.
second (ResolvedSLH) – Systems with equal channel counts on one Hilbert space.
- Returns:
The cascaded system.
- Return type:
- Raises:
ValueError – Channel counts differ, Hilbert spaces differ, or a joined leg carries a reference run.
- quchip.engine.slh.concatenate(*systems, prefixes=None)[source]¶
Place systems side by side with block-diagonal scattering.
Implements
G1 ⊞ G2 = (diag(S1, S2), (L1, L2), H1 + H2). Channel keys must stay unique. To rename each system’s keys asprefix/key, passprefixes. Exposed channels are ordered before hidden channels.- Parameters:
*systems (ResolvedSLH) – One or more systems on one Hilbert space.
prefixes (sequence of str, optional) – One prefix per system.
- Returns:
The concatenated system.
- Return type:
- Raises:
ValueError – No systems, mismatched prefixes, duplicate keys, or differing Hilbert spaces.
- quchip.engine.slh.feedback_reduce(slh, *, output, input)[source]¶
Connect one output channel back into one input channel.
For output
xand inputywithg = (1 − S_xy)⁻¹, this implementsS̃ = S_x̄ȳ + S_x̄y g S_xȳ,L̃ = L_x̄ + S_x̄y g L_xandH̃ = H + ((Σ_j L_j† S_jy) g L_x − h.c.) / 2i. Whenxandydiffer, the remaining input ofxand output ofyform one channel, keyed"<x>-><y>"and is placed at the earlier of the two positions.- Parameters:
slh (ResolvedSLH) – The system to close.
output (str or SLHChannel) – The output channel that is fed back and the input channel that receives it.
input (str or SLHChannel) – The output channel that is fed back and the input channel that receives it.
- Returns:
The reduced system with one channel fewer.
- Return type:
- Raises:
ValueError – The loop is concretely singular, the two channels differ in accessibility, or a closed leg carries a reference run.
KeyError – An unknown channel key.