Skip to content

Electronics

Electrical parts sit beside the optics: pads, probes, drivers, amplifiers, converters and the wires between them. A detector has two contacts, and both need a wire.

A balanced homodyne receiver and its amplifier, after Yang et al. (2025), Fig. 3: signal and local oscillator, a phase shifter, a 2x2 MMI and two detectors. The detectors’ middle node goes to the TIA; their outer contacts go to the bias pads; the heater has its own two pads.

A balanced homodyne receiver and its TIA, after Yang et al., Micromachines 16, 1416 (2025), Fig. 3
# A balanced homodyne receiver and its TIA, after Yang et al., Micromachines 16, 1416 (2025), Fig. 3
from optodraw import TIA, EdgeCoupler, ElectricalPad, MMI2x2, OnChipPhotodetector, PhaseShifter, Scene
scene = Scene(title="Balanced homodyne receiver", platform="on_chip")
signal = scene.add(EdgeCoupler(center=(-150, 22), label="Signal"))
lo = scene.add(EdgeCoupler(center=(-150, -22), label="LO"))
shifter = scene.add(PhaseShifter(center=(-88, 22), label="Phase shifter"))
mmi = scene.add(MMI2x2(center=(-10, 0), label="2x2 MMI"))
pd_top = scene.add(OnChipPhotodetector(center=(88, 16), label="PD"))
pd_bottom = scene.add(OnChipPhotodetector(center=(88, -16), label="PD"))
tia = scene.add(TIA(center=(175, 0), label="TIA"))
pads = {name: scene.add(ElectricalPad(center=xy, width=14, height=14, port_side=side, label=name))
for name, xy, side in (("V+", (108, 52), "bottom"), ("V-", (108, -52), "top"),
("H1", (-106, 50), "bottom"), ("H2", (-70, 50), "bottom"),
("Out", (215, 0), "left"))}
for a, ap, b, bp in ((signal, "o1", shifter, "o1"), (shifter, "o2", mmi, "o2"), (lo, "o1", mmi, "o1"),
(mmi, "o4", pd_top, "o1"), (mmi, "o3", pd_bottom, "o1")):
scene.route((a, ap), (b, bp), kind="waveguide", path_type="smooth")
# each detector has two contacts: the shared middle node goes to the TIA, the outer ones to the bias pads
for a, ap, b, bp in ((pd_top, "e1", pads["V+"], "e1"), (pd_bottom, "e2", pads["V-"], "e1"),
(pd_top, "e2", tia, "e1"), (pd_bottom, "e1", tia, "e1"),
(shifter, "h1", pads["H1"], "e1"), (shifter, "h2", pads["H2"], "e1"),
(tia, "e2", pads["Out"], "e1")):
scene.route((a, ap), (b, bp), kind="electrical", width=1.2)
for part in (signal, lo):
part.label_side = "left"
pd_top.label_side = pd_bottom.label_side = "right"
pads["V-"].label_side = "bottom"
scene.fit_frame(margin=8)
scene
A balanced homodyne receiver and its TIA, after Yang et al., Micromachines 16, 1416 (2025), Fig. 3 in 2D

Its 1D tab tells optical and electrical links apart without colour.

The amplifier as a circuit, on its 1D tab: each part is its IEC symbol.

The receiver's amplifier as a circuit
# The receiver's amplifier as a circuit
from optodraw import (Capacitor, ElectricalPad, Ground, OnChipPhotodetector, OpAmp, Resistor, Scene,
VerticalGratingCoupler)
# on a chip scene the 1D view keeps the 2D plan: each symbol where its part stands
scene = Scene(title="Transimpedance amplifier", platform="on_chip")
amp = scene.add(OpAmp(center=(0, 0), label="TIA", label_side="bottom"))
r_f = scene.add(Resistor(center=(0, 10), label="R_f", value="10 kΩ"))
c_f = scene.add(Capacitor(center=(0, 24), label="C_f", value="0.2 pF"))
ground = scene.add(Ground(center=(-9, -8)))
pd = scene.add(OnChipPhotodetector(center=(-62, 0), label="PD"))
light = scene.add(VerticalGratingCoupler(center=(-136, 0), angle=180, label="light in")) # o1 faces the PD
bias = scene.add(ElectricalPad(center=(-42.2, 22), width=6, height=6, port_side="bottom", label="V_{bias}"))
out = scene.add(ElectricalPad(center=(28, 0), width=6, height=6, label="V_{out}"))
scene.route((light, "o1"), (pd, "o1"))
for a, b in (((pd, "e1"), (bias, "e1")), ((pd, "e2"), (amp, "in_n")), ((r_f, "e1"), (amp, "in_n")),
((c_f, "e1"), (r_f, "e1")), ((r_f, "e2"), (amp, "out")), ((c_f, "e2"), (r_f, "e2")),
((amp, "in_p"), (ground, "e1")), ((amp, "out"), (out, "e1"))):
scene.route(a, b, kind="electrical", width=0.25)
scene.fit_frame(margin=4)
scene
The receiver's amplifier as a circuit in 1D

The die on its board: wire bonds from die pads to board pads, a fibre array and an SMA jack.

The die on its board: wire bonds, a fibre array and an SMA jack
# The die on its board: wire bonds, a fibre array and an SMA jack
from optodraw import ChipSubstrate, ElectricalPad, FiberArray, PCB, SMAConnector, Scene
scene = Scene(title="Die on a board", platform="mixed")
scene.add(PCB(center=(-6, 0), length=40, width=24, pad_count=2, style="plain", color="#b9d8c3", label="Test board",
label_side="bottom"))
die = scene.add(ChipSubstrate(center=(-5, -1), length=18, width=13, chamfer=3, opacity=1.0, label="PIC die",
label_side="top"))
edge = die.drawn_box()[0] # the array's polished face meets the die's left edge
scene.add(FiberArray(center=(edge - 3.6, 0.3), count=4, pitch=0.6, label="Fibre array", label_side="left"))
sma = scene.add(SMAConnector(center=(11.5, 12), angle=90, label="SMA jack", label_side="top"))
for y in (-4.5, -1.5, 1.5, 4.5):
pads = [scene.add(ElectricalPad(center=xy, width=1.8, height=1.8, port_side="center", pad_opening=False))
for xy in ((1.5, y - 1.25), (6.5, 1.3 * y - 1.25))]
scene.route((pads[0], "e1"), (pads[1], "e1"), kind="wirebond")
scene.route((pads[1], "e1"), (sma, "e1"), kind="electrical", path_type="L", width=0.5)
scene.fit_frame(margin=2)
scene
The die on its board: wire bonds, a fibre array and an SMA jack in 2D
  • scene.route((pd, "e1"), (pad, "e1"), kind="electrical", width=1.2): a wire between electrical ports.
  • scene.route((die_pad, "e1"), (board_pad, "e1"), kind="wirebond"): a gold wire bond, an arc in 2D and a loop in 3D.
  • Resistor, Capacitor, Inductor, OpAmp, Ground, BiasTee, RFMixer: circuit parts. value="10 kΩ" prints after the label.
  • FiberArray(count=8, pitch=0.127), SMAConnector(), PCB(style="plain", color=...): the package around a die.
  • ElectricalPad(width=..., height=..., port_side="bottom"): a bond pad facing its wire.
  • GSGProbePad, HeaterPad, MetalRoute: probes, heaters and drawn metal.
  • TIA, ADC, DACDriver: circuit blocks drawn on the chip; TIABlock, EIC, PCB for the board.

Every part’s electrical ports have the kind electrical; Laser, Sample and Cryostat have e1, Photodiode e1 (anode) and e2 (cathode). A route can carry signal facts (impedance, bandwidth, bit rate), and validate_electrical_chain reports a mismatch such as RF into a DC input. check_figure reports a wire that ends more than 0.5 units from its drawn port.

Electrical routes use the waveguide router; in 1D a wire turns square, and parts step into line so it runs straight or turns once. Pads and metal keep their true size. Circuit blocks are drawn as symbols. A circuit part keeps one plan of its ports and lines, and the 1D, 2D and TikZ drawings read it. In 3D it is a real package: a chip resistor, an SOIC op amp. A die draws over its board.

Yang, H. et al. A low-noise hybrid-integrated balanced homodyne receiver with 2.5 GHz bandwidth and 15 dB quantum shot noise clearance. Micromachines 16, 1416 (2025). doi:10.3390/mi16121416