feat(dqc): Implement Distributed Quantum Computing plugin#2
Open
youf3 wants to merge 5 commits into
Open
Conversation
…chema, logic, and tests
- Implemented ir_converter.py to convert labeled per-QPU IR commands into a flat timeslot record format for DQCLogic. - Added topology_adapter.py to convert live controller topology into data structures compatible with qnpack frontends and DQC scheduling. - Updated test_dqc.py to reflect changes in DQCLogic and removed unused agent_ids. - Enhanced test_dqc_rpc.py to support both tket and Cisco modes for DQC requests, including synthetic test circuits. - Updated dqc.yaml schema to version 2.0.0, adding support for circuit_mode and partitioned_commands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
dqcplugin to the Quant-Net controller that handles distributed quantum computing workflows end-to-end: it accepts a partitioned circuit (pre-partitioned per QPU or raw source), validates and labels it viaqnpack, schedules execution across hardware agents using FCFS, discovers entanglement routes, injects BSM node commands, and returns allocation and simulation payload to the caller.Changes
plugins/schema/dqc.yaml— AsyncAPI schema (new)Defines
dqcRequest/dqcResponse(AsyncAPI 2.6.0):circuit_mode(required,cisco|tket), optionalpartitioned_commands(pre-parsed per-QPU dicts), orcircuit_file/circuit_contentfor raw circuit sourcestatus,rid, and adataobject containingstartTime,allocations,routes(cross-QPU node-ID paths), andsimulationresultplugins/dqc/dqc/— Plugin package (new)__init__.py(DQC(ProtocolPlugin)) — Main request handler; orchestrates the full pipeline:qnpack.dqc.labeling.label_and_build_maps)ir_converter)DynamicExperiment, schedules it viaRequestManager, and returns allocations + simulation payload_to_plain) so qnpack internals receive plain Python dictslogic.py(DQCLogic) — BuildsDynamicExperimentdefinitions from flat timeslot records; implements FCFS slot allocation; provides helpersextract_qpu_pairsandextract_bsm_nodes_from_pathir_converter.py(labeled_ir_to_timeslot_schedule) — Cursor-based scheduler that converts labeled per-QPU IR into a flat timeslot list, mirroringqnpack'sControllerProtocol.compute_timeslot_schedule. Advances QPUs in lock-step at sync points (entanglement gen, EJPP start/end) and in parallel for local gatestopology_adapter.py(get_qpu_info_from_topology) — Extracts QPU info, integer-to-label ID maps, and BSM node identities from the controller topology contextplugins/dqc/— Tests (new)test_dqc.py— Unit tests forDQCLogic:build_dynamic_experiment,extract_qpu_pairs(basic, canonical ordering, empty, multiple pairs)test_dqc_rpc.py— Integration-style RPC tests forhandle_dqc_requestusingDQCTestClientwith a mock topology and router context