Dashboard Core — Graphical Builder¶
Turns the ops list produced by the graphical (drag-and-drop) circuit
builder component into dense_evolution's own (name, *qubits[, param])
gate-tuple format, so a circuit built visually runs through the exact
same execution path as one written in OpenQASM.
graphical_builder ¶
Turns the ops list produced by the graphical (drag-and-drop) circuit builder component into dense_evolution's own (name, *qubits[, param]) gate tuples -- the same format dashboard_core.engine already runs on the real dense_evolution DenseSVSimulator (via dashboard_core.qasm_library. gate_tuples_to_qasm for the QASM round-trip). No separate execution path for graphically-built circuits, and no Qiskit QuantumCircuit ever built here: they go through the exact same engine as typed OpenQASM.
ops_to_native_tuples ¶
Build dense_evolution's own (name, *qubits[, param]) gate tuples from the builder's op list -- the same shape dashboard_core.engine's QASMParser-based pipeline and qasm_library.gate_tuples_to_qasm both already accept, and the same validation the old QuantumCircuit-based version did (qubit range, unknown gate name), just performed by hand instead of relying on Qiskit's own checks.
Parameters¶
n_qubits : int ops : list[dict] Each dict has 'gate' (one of the GATE_PALETTE gate ids: h/x/y/z/s/t/ rx/ry/rz/cx/cy/cz/swap) and 'qubits' (list[int]).
Returns¶
list[tuple] Pass to qasm_library.gate_tuples_to_qasm(tuples, n_qubits) for the QASM text the rest of the Composer already runs on (measure_all equivalent included there by default).
Source code in tools/dashboard_core/graphical_builder.py
See also: dashboard_core.circuit_builder_component,
the UI component this module's output feeds.