Components and Bridge¶
The bridge endpoints connect the Silicofeller Quantum Studio Schematic Editor to Qiskit
Metal. They serve the Component Library (component list, parameter metadata, pins and
previews) and turn a design document into rendered geometry, Qiskit Metal code, layout
checks and GDSII. They are mounted at /api/bridge. None of them change a project; save
results with save-design (see Projects and Design). Conventions are on
API Reference.
Endpoints¶
Method |
Path |
Purpose |
Roles/plan |
|---|---|---|---|
GET |
|
Catalog of available components. |
No token |
GET |
|
One component summary. Unknown ids return |
No token |
GET |
|
Parameter specification and supported route components. |
No token |
GET |
|
Pin names, directions and positions from the catalog. |
No token |
GET |
|
SVG preview. Optional |
No token |
POST |
|
Check the declared netlist of a design document. |
No token |
POST |
|
Render a design document to SVG with per-layer and per-route geometry. |
No token |
POST |
|
Render one connection and return the exact path Qiskit Metal draws. |
No token |
POST |
|
Generate signed Qiskit Metal Python from a design document. |
No token |
POST |
|
Geometry-level DRC and layout-versus-schematic on the drawn metal. |
No token |
POST |
|
Build the design, write GDSII and re-read the file to verify it. |
No token |
POST |
|
Run a Qiskit Metal script on the server and return the resulting design document. |
Signed in; see note |
POST |
|
Run a chip script headlessly and return the GDS file it writes (Design Copilot fab-ready chip flow). |
Signed in; see note |
validate, verify-layout and export-design-gds are on the MCP token allow-list.
Note
run-code and export-gds execute Python on the server. A script generated by
Quantum Studio carries a code_signature and runs for any signed-in user. Edited or
hand-written scripts run only for admins by default (BRIDGE_UNSIGNED_CODE=admin);
other users receive 403.
Component catalog¶
GET /api/bridge/components returns a list of ComponentSummary objects.
category is one of qubits, resonators, couplers, routes,
launchpads, ground, terminations, feedlines, trapped-ion or
other.
[
{
"id": "TransmonCross",
"name": "TransmonCross",
"module": "qiskit_metal.qlibrary.qubits.transmon_cross",
"category": "qubits",
"description": "Transmon with cross-shaped pad and connection claws"
}
]
Metadata (ComponentMetadata):
{
"id": "TransmonCross",
"parameters": [
{"name": "cross_width", "type": "length", "unit": "um", "default": "20um",
"description": "Width of the cross arms", "options": null}
],
"supportedRouteComponents": null
}
Parameter type is length, string, number, bool or enum (with
options). Pins (ComponentPins); direction is in, out or io, and
hint gives the pin position and outward angle in the component’s frame:
{
"id": "TransmonCross",
"pins": [
{"name": "readout", "direction": "io", "hint": {"x": 0.0, "y": 0.1, "angle": 90.0}, "role": "readout"}
]
}
Preview (ComponentPreview):
{"id": "TransmonCross", "svg": "<svg ...>", "viewBox": {"x": -300, "y": -300, "w": 600, "h": 600}, "units": "um"}
Design document¶
The design endpoints take a DesignDocument. Positions are in millimetres; trace
width and gap in micrometres.
{
"placements": [
{"id": "p1", "componentId": "TransmonCross", "name": "Q1", "x": 0.0, "y": 0.0,
"rotation": 0.0, "params": {"connection_pads": {}}},
{"id": "p2", "componentId": "ReadoutResFC", "name": "R1", "x": 0.0, "y": 1.2,
"rotation": 90.0, "params": {}}
],
"connections": [
{"id": "c1",
"from": {"placementId": "p1", "pinName": "readout"},
"to": {"placementId": "p2", "pinName": "readout"},
"routeComponentId": "RouteMeander",
"routeOverrides": {"total_length": "4mm"},
"waypoints": [{"x": 0.0, "y": 0.6}],
"segments": [{"style": "straight"}, {"style": "meander", "targetLengthMm": 3.4}]}
],
"feedlines": [
{"id": "f1", "name": "FL1", "x1": -4.0, "y1": 3.0, "x2": 4.0, "y2": 3.0,
"traceWidth": 10.0, "traceGap": 6.0, "launchpadType": "LaunchpadWirebond",
"attachedResonators": [{"resonatorId": "p2", "segmentIndex": 0, "t": 0.5,
"couplingGap": 10.0, "orientation": "down"}]}
],
"customComponents": [],
"componentVariants": [],
"chip_width_mm": 10.0,
"chip_height_mm": 10.0
}
A multi-segment route has one more entry in segments than in waypoints. A
feedline expands to launch pad, straight route and launch pad on export.
Validate¶
POST /api/bridge/design/validate returns a ValidationResult:
{
"valid": false,
"issues": [
{"severity": "error", "rule": "overlap",
"message": "'Q1' and 'Q2' overlap at (0.00, 0.40) mm (metal short risk)",
"placementIds": ["p1", "p3"], "connectionIds": []}
],
"resonators": [],
"qubits": []
}
severity is error, warning or info.
Render and render-route¶
POST /api/bridge/design/render returns svg, viewBox, units, layers
(name and svg per layer) and routes. POST
/api/bridge/design/render-route takes {"design": {...}, "connectionId": "c1"} and
returns one route:
{
"connectionId": "c1",
"svg": "<path ...>",
"resolvedRouteOptions": {"total_length": "4mm", "fillet": "90um"},
"resolvedPathPoints": [{"x": 0.0, "y": 0.0001}, {"x": 0.0, "y": 0.0006}]
}
resolvedPathPoints are in metres, exactly as Qiskit Metal computed them. These two
endpoints return errors in their own envelope rather than detail:
{"error": {"code": "ROUTE_ERROR", "message": "Pin 'bus_03' not found on Q1", "details": {}}}
Codes are ROUTE_ERROR (422, a design error such as a bad pin name), NOT_FOUND
(404, unknown connection), NOT_IMPLEMENTED (501) and RENDER_ERROR
(500).
Generate code¶
POST /api/bridge/design/generate-code accepts placements, connections and
feedlines, with chip-level variables (substrate, default silicon;
metal, default aluminum; chip_size in mm, default 10.0):
{
"language": "python",
"filename": "design.py",
"code": "from qiskit_metal import designs ...",
"code_signature": "..."
}
Verify layout¶
POST /api/bridge/design/verify-layout builds the design in Qiskit Metal and checks the
metal it draws: opens, shorts, shorts to ground, floating metal, capacitor gaps, footprint
overlaps, and CPW width, gap and bend radius. /design/validate checks the declared
netlist; this endpoint checks that the drawn metal implements it. The body is a design
document plus optional variables and rules (overrides of the default rule values).
The response contains ok, summary, findings, issues (the findings as
validation issues), nets, couplings, junctions and the rules used. A design
with no placements, or one Qiskit Metal cannot build, returns 422 with {"ok": false,
"error": "..."}.
Export design GDS¶
POST /api/bridge/design/export-design-gds builds the design with the platform’s code
generator, writes GDSII, then re-reads the file with KLayout and compares it with the
layout (piece count, XOR area, pin connectivity). By default it returns the file
(application/octet-stream, design.gds) with the inspection in headers:
Header |
Meaning |
|---|---|
|
|
|
Whether the layout checks passed. |
|
Count of critical and high-severity layout findings. |
|
Number of metal pieces read back from the file. |
With ?as_json=true the same information comes as JSON, with the file base64-encoded:
{
"ok": true,
"bytes": 482114,
"layout_ok": true,
"layout_findings": {"critical": 0, "high": 0},
"gds_verified": true,
"gds_checks": [],
"gds_layers": [],
"gds_xor": null,
"gds_error": null,
"gds_base64": "..."
}
A file that fails inspection is still returned, marked X-Gds-Verified: false. A design
that cannot be built returns 422.
See also
Verification and DRC for full-design DRC reports, and Tapeout, Geometry and Materials for tapeout packages.