quantcore_circuits.circuit.draw =============================== .. py:module:: quantcore_circuits.circuit.draw .. autoapi-nested-parse:: Matplotlib schematic of a LOM circuit (``circuit.json``) with the element values that went into the simulation. QuCat's own ``Network.show()`` only works for networks made in its GUI, so this draws the lumped circuit directly: a ground rail at the bottom, one bus per conductor (node), elements to ground hanging down from it, and elements between two conductors drawn between (or arching over) the buses. Used by ``qcc circuit simulate --png`` and shown in the KLayout plugin's LOM tab. Needs matplotlib only (imported when drawing). Functions --------- .. autoapisummary:: quantcore_circuits.circuit.draw.draw_circuit quantcore_circuits.circuit.draw.value_text Module Contents --------------- .. py:function:: draw_circuit(model, netlist: list[dict] | None, path: str | pathlib.Path, title: str = '') -> pathlib.Path Draw ``model`` (a :class:`CircuitModel`) to the PNG ``path``; ``netlist`` rows (``LomResult.netlist``) give the values printed next to each element. .. py:function:: value_text(v, unit: str = '', fmt: str = '.3g') -> str A netlist value with its unit. A pair (e.g. a resonator's C and L, ``unit`` "fF, nH") reads "302 fF ‖ 1.49 nH": the comma-separated units go one per value.