quchip.viz.network

Static schematic of a chip’s PortNetwork: Markov core, reference sections, planes.

Functions

plot_port_network(source, *[, show_hidden, ax])

Draw a port network as a left-to-right schematic.

quchip.viz.network.plot_port_network(source, *, show_hidden=True, ax=None)[source]

Draw a port network as a left-to-right schematic.

Chip ports and Markovian components show in the shaded Markov core. Reference sections (delays, filters, and amplifiers) and external planes show to its right. Cables made with link use double-headed edges, and directional connections use single arrows. A plane with separate input= and output= terminals has one arrow to each terminal. When show_hidden is true, hidden vacuum and load channels show as dashed stubs. Annotations show component values, including rates, eta, durations, gain, and added noise. Traced values show as <traced>.

Parameters:
  • source (Chip or PortNetwork) – A chip with an attached port network, or the network itself.

  • show_hidden (bool) – Draw hidden vacuum and load stubs.

  • ax (matplotlib.axes.Axes, optional) – Existing axes to draw on. When None, create a figure and axes.

Returns:

The figure that contains the schematic (ax.figure when ax is given).

Return type:

Figure

Raises:

ValueError – source is not a PortNetwork and has no attached port network.