quchip.chip.ports

Physical Markovian input-output channels attached to a chip.

Classes

Port(target, *[, rate, ...])

One accessible Markovian channel with a dimensionless coupling operator.

class quchip.chip.ports.Port(target, *, rate=None, external_quality_factor=None, operator=None, phase=0.0, label=None)[source]

Bases: object

One accessible Markovian channel with a dimensionless coupling operator.

rate, external_quality_factor, and phase can be traced or swept between solves but remain constant within a solve. Model shaped emission with an explicit buffer or coupler device holding a static Port and a modulated Hamiltonian coupling.

Parameters:
  • target (object or sequence of object) – Device target(s), or labels resolved when attached to a chip. Multiple targets require an explicit joint operator.

  • rate (float or array-like or None, default=None) – External coupling rate in 1/ns. Mutually exclusive with external_quality_factor.

  • external_quality_factor (float or array-like or None, default=None) – Dimensionless external quality factor for one target, giving the rate 2*pi*freq/Q in 1/ns.

  • operator (object or str or None, default=None) – Dimensionless coupling operator. None uses the target’s lowering operator.

  • phase (float or array-like, default=0.0) – Reference-plane phase in radians.

  • label (str or None, default=None) – Stable channel label, generated if omitted.

property input: FieldTerminal

Return this port’s field input terminal.

property output: FieldTerminal

Return this port’s field output terminal.

property side: ComponentPort

Return this port’s physical side, pairing its input and output terminals.

resolve_targets(chip)[source]

Return target labels after checking that they belong to a chip.

Parameters:

chip (Chip) – Chip against which labels are resolved.

rate_value(chip)[source]

Return the external coupling rate in 1/ns.

Parameters:

chip (Chip) – Chip that supplies the target frequency for a quality-factor rate.

parameter_values()[source]

Return active sweepable port values.

set_parameter_value(name, value)[source]

Set one port parameter on an isolated chip copy.

Parameters:
  • name ({"rate", "external_quality_factor", "phase"}) – Local parameter name.

  • value (Any) – Replacement value in 1/ns, dimensionless units, or radians.

copy()[source]

Return an independent port that keeps label-based targets.

physics_notes()[source]

Return the input-output convention owned by this port.

to_dict()[source]

Serialize port targets and scalar coupling data.

classmethod from_dict(data)[source]

Reconstruct a port from label-based serialized data.

Parameters:

data (dict[str, Any]) – Payload produced by to_dict().