All stories
Resilient Networking Hub logo

// Standards & research

QMeshPy: Bringing Distributed Quantum Computing to the Peer-to-Peer Internet

· Vienna, Austria · IETF 126 Hackathon

Exploring quantum service discovery, circuit orchestration, and distributed execution with libp2p at the IETF 126 Hackathon

By Manu Sheel Gupta, Soham Bhoir, and Johanna Moran

The next generation of computing infrastructure may not be built around a single machine, data centre, or cloud provider. It may instead emerge from networks of independently operated services that discover one another, coordinate workloads, and contribute specialized capabilities to a shared computational fabric.

Quantum computing offers an interesting case for this model. Quantum processors and simulators are specialized resources, often constrained by availability, hardware characteristics, execution limits, and the complexity of programming and scheduling workloads. As quantum services become more accessible, an important question is how applications can discover suitable resources and coordinate computation across distributed environments.

At the IETF 126 Hackathon, held in Vienna, Austria, on July 18–19, 2026, we presented QMeshPy: Distributed Quantum Services over libp2p. The project explores a peer-to-peer coordination layer for discovering quantum-capable services, planning distributed circuit execution, and assembling results across a heterogeneous network of nodes.

Developed by Soham Bhoir, Manu Sheel Gupta, and Johanna Moran, in the context of the IRTF Quantum Internet Research Group (QIRG), QMeshPy brings together quantum computing frameworks and decentralized networking to investigate how quantum operations can become discoverable and composable network services.

The central idea is straightforward:

What if quantum computation could be accessed through a peer-to-peer mesh, where nodes advertise their capabilities, receive suitable workloads, execute circuit fragments, and contribute results to a larger computation?

This blog describes the architecture we explored, the implementation presented at the hackathon, the benchmark results, and some of the networking and standardization questions that emerged.


1. Why distributed quantum services?

Quantum computing is developing across multiple hardware platforms, simulators, research environments, and software frameworks. These resources do not necessarily share the same capabilities or execution characteristics.

A quantum workload may need to account for:

  • The number and characteristics of available qubits.
  • Supported gates and circuit operations.
  • Simulator or processor availability.
  • Execution latency and resource constraints.
  • Network connectivity and the cost of moving workloads.
  • The ability to reconstruct and validate results from distributed execution.

A centralized orchestration service can coordinate these resources, but it also introduces dependencies on a particular control plane, service registry, or infrastructure provider.

A peer-to-peer architecture offers a different approach. Nodes can discover one another through a distributed networking layer, advertise their capabilities, and participate in workload execution without requiring every interaction to pass through a single centralized registry.

This is where libp2p becomes relevant.

Rather than treating quantum resources as isolated endpoints, QMeshPy explores representing them as services in a network. The networking layer provides peer discovery, capability dissemination, and stream-based communication, while the quantum execution layer handles circuit planning, fragment dispatch, and result reconstruction.

The objective is not to claim that distributed execution automatically produces quantum advantage. It is to explore the infrastructure required to make quantum computation more accessible, interoperable, and composable across independently operated nodes.

2. QMeshPy architecture

QMeshPy brings together three principal components:

  1. A decentralized networking fabric built with py-libp2p.
  2. A coordination and planning layer for distributing quantum workloads.
  3. An execution and optimization layer using Qiskit and classical optimization techniques.

Together, these components provide a workflow from circuit submission to distributed execution and result reconstruction.

2.1 Networking fabric: libp2p as the coordination layer

The networking fabric is built using py-libp2p, providing the peer-to-peer communication primitives required to connect distributed quantum services.

The implementation uses:

  • Yamux for multiplexing multiple logical streams over a connection.
  • TLS 1.3 for secure transport sessions.
  • Kademlia DHT for decentralized peer and service discovery.
  • GossipSub (/meshsub/1.0.0) for distributing peer capability advertisements and coordination information.
  • Custom libp2p stream protocols for dispatching execution fragments.

This separation is important. The networking layer is not responsible for deciding how a quantum circuit should be executed. Instead, it provides the communication substrate through which the coordinator can discover suitable peers and communicate with them.

Each node can participate in the mesh and expose information about its available execution capabilities. The coordinator can use this information when determining where individual fragments should be assigned.

The architecture therefore separates network reachability, service discovery, capability information, and workload execution rather than treating them as one operation.

2.2 Discovery and capability advertisements

A distributed quantum service is useful only if other participants can discover it and understand what it can execute.

QMeshPy uses the DHT and GossipSub to support decentralized discovery and capability advertisements.

This allows the coordination layer to reason about the available peers and their advertised capabilities when selecting execution targets.

Capability information is particularly important in heterogeneous environments. A peer running a simulator may support a different set of operations or resource limits from a peer connected to a quantum processor.

A useful service-discovery model therefore needs to communicate more than a peer identifier or network address. It must also expose enough metadata to determine whether a peer is suitable for a particular workload.

This leads to an important design consideration for future distributed quantum services: capability descriptions need to be structured, sufficiently expressive, and consistently interpreted across implementations.

2.3 Control and planning: from circuits to execution graphs

The coordination layer receives a quantum circuit and transforms it into a representation suitable for distributed execution.

QMeshPy normalizes the circuit into a dependency-aware Directed Acyclic Graph (DAG).

This representation makes it possible to reason about the relationships between operations and identify fragments that can be assigned to different execution peers.

The coordinator then applies cost-based scoring to determine how fragments should be distributed.

The planning process needs to account for more than the availability of a node. It must consider the execution cost of a fragment, dependencies between operations, and the overhead introduced by distributing work across the network.

Once the plan is compiled, the coordinator dispatches fragments using a custom libp2p stream protocol:

/qb2/{namespace}/execution/fragment-dispatch/1.0.0

This gives the application a dedicated protocol boundary for quantum execution requests rather than relying on generic networking messages for every operation.

The broader architectural principle is that the application defines the execution semantics, while libp2p provides the peer-to-peer transport and communication mechanisms.

2.4 Execution and optimization

The execution layer uses Qiskit for local quantum circuit execution and statevector reconstruction.

The hackathon implementation also incorporated a classical optimization loop using L-BFGS-B.

This is an important aspect of the experiment: quantum workloads are not necessarily dominated by quantum circuit execution. Classical optimization and parameter search can account for a substantial part of the total runtime.

QMeshPy also explored a DHT-backed transfer-learning cache. Reusing information from previous optimization runs can reduce the work required to find useful starting points for subsequent runs.

In the experiments described during the hackathon, warm starts using this cache yielded approximately 3× speedup.

This illustrates a useful direction for distributed quantum infrastructure: improvements may come not only from adding more execution nodes, but also from sharing reusable computational knowledge and reducing repeated optimization work.

3. The distributed execution workflow

The architecture can be understood as a sequence of operations:

  1. Circuit submission: An application submits a quantum circuit to the coordination layer.
  2. Circuit normalization: The coordinator normalizes the circuit and constructs a dependency-aware DAG.
  3. Peer discovery: The networking layer discovers participating peers and retrieves their advertised capabilities.
  4. Execution planning: The coordinator evaluates available peers and uses cost-based scoring to assign circuit fragments.
  5. Fragment dispatch: The coordinator sends execution requests over custom libp2p streams.
  6. Local execution: Worker nodes execute their assigned fragments using the available quantum simulator or execution environment.
  7. Result collection: Partial results are returned to the coordinator.
  8. Reconstruction and analysis: Qiskit is used to reconstruct the resulting state and support further analysis.

The result is a model in which a quantum application can interact with a distributed collection of services through a common peer-to-peer coordination layer.

The hackathon implementation focused on demonstrating this architecture using simulated environments. It provides a starting point for investigating how the same coordination model might evolve as access to heterogeneous quantum hardware becomes more practical.

4. Hackathon workload: QAOA portfolio optimization

To evaluate the architecture, the team tested a 20-asset portfolio optimization workload using the Quantum Approximate Optimization Algorithm (QAOA).

The experiments used simulated clusters of different sizes, ranging from 5 to 100 heterogeneous nodes.

The objective was to understand how the distributed execution model behaved as the number of available peers increased, and how much overhead was introduced by planning and coordinating the workload.

The benchmark results presented at the hackathon were:

| Metric | 5 nodes | 20 nodes | 100 nodes | |---|---:|---:|---:| | Total quantum runtime | 1,841 ms | 1,538 ms | 1,264 ms | | Serial parameter search | 1,408 ms (76%) | 1,175 ms (76%) | 976 ms (77%) | | Distributed execution | 334 ms | 299 ms | 209 ms | | Plan compilation overhead | 11 ms | 31 ms | 79 ms | | Overall speedup versus 5 nodes | 1.0× | 1.20× | 1.47× |

The results show a reduction in total runtime as the simulated cluster grows.

Moving from 5 to 20 nodes improved the overall runtime by approximately 1.20×. Moving from 5 to 100 nodes improved it by approximately 1.47×.

The distributed execution component also became faster, decreasing from 334 ms with 5 nodes to 209 ms with 100 nodes.

However, the results reveal an important limitation: adding more peers does not translate directly into proportional end-to-end speedup.

4.1 The Amdahl's Law bottleneck

The benchmark highlights the importance of the classical parameter-search component.

In the reported table, serial parameter search accounts for approximately 76–77% of total runtime across the three cluster sizes.

This means that even when distributed circuit execution becomes faster, the overall workload remains constrained by the portion that is not accelerated through additional peers.

This is an example of the practical implications of Amdahl's Law: the maximum achievable speedup depends on the fraction of a workload that can actually be parallelized.

For distributed quantum orchestration, this distinction matters.

It is not sufficient to measure how quickly circuit fragments execute across a larger cluster. We also need to understand the complete workload, including classical optimization, plan compilation, communication, synchronization, and result reconstruction.

Future optimization work therefore needs to consider both sides of the system:

  • Improving the distribution and execution of quantum circuit fragments.
  • Reducing the classical optimization and coordination costs that remain on the critical path.

The transfer-learning cache and warm-start experiments are relevant in this context. Reusing prior optimization information can help reduce repeated classical work and improve the overall execution pipeline.

4.2 Cluster sizing and coordination overhead

The benchmark also shows that plan compilation overhead increases with cluster size:

  • 11 ms at 5 nodes.
  • 31 ms at 20 nodes.
  • 79 ms at 100 nodes.

This is an important observation for peer-to-peer orchestration.

As the number of participants grows, the coordinator must process more capability information and account for a larger set of possible execution targets. Coordination and dissemination costs therefore become part of the overall performance equation.

The hackathon findings identified a cluster size of approximately 20–50 nodes as a practical range to investigate further, balancing the benefits of additional execution capacity against increasing coordination overhead.

This should be understood as an experimental observation from the tested environment, not a universal limit on the size of a distributed quantum network.

Different workloads, network conditions, peer distributions, and planning algorithms may produce different results.

5. What the experiment tells us about peer-to-peer quantum infrastructure

QMeshPy is interesting not only as a quantum-computing experiment, but also as an exploration of how specialized computational resources can become network-native services.

Several broader observations emerged from the implementation.

5.1 Discovery needs capability semantics

Peer discovery alone is not enough.

A distributed service network needs to describe what each peer can do, what constraints apply, and whether a particular workload can be executed by that peer.

For quantum services, this may include:

  • Supported circuit operations and gate sets.
  • Qubit capacity and execution limits.
  • Simulator or processor characteristics.
  • Availability and expected execution latency.
  • Workload size and resource constraints.
  • Relevant execution and result formats.

A consistent capability model would make it easier for different implementations to discover and use one another without requiring application-specific integrations for every service.

5.2 Coordination is a protocol problem

A distributed execution plan needs to be communicated consistently across participants.

The coordinator and workers must agree on the meaning of an execution request, the identity of a workload, the fragment being dispatched, and the conditions under which a result is considered complete.

This raises questions around protocol versioning, namespaces, request identifiers, error handling, retries, and execution lifecycle management.

The custom libp2p stream protocol used in QMeshPy provides an application-level boundary for this communication.

As the system evolves, these interactions could benefit from more formalized protocol metadata and interoperability considerations.

5.3 Registry freshness matters

Quantum services may have changing availability and resource constraints.

A peer that advertises a capability at one point in time may no longer have the capacity to execute a workload later.

The hackathon findings therefore emphasized the need for strict Time-To-Live (TTL) bounds, with a target of less than 300 seconds, to help maintain registry freshness.

This is a useful design consideration for any dynamic service network: discovery information must be refreshed frequently enough to reflect the operational state of participating resources.

The appropriate TTL will depend on the rate at which capabilities and availability change, as well as the cost of refreshing advertisements.

5.4 Distributed execution requires observability

Once workloads are distributed across multiple peers, understanding the execution path becomes more difficult.

A useful orchestration system needs to provide visibility into:

  • Which peers were discovered.
  • Which capabilities were advertised.
  • How the execution plan was constructed.
  • Which peer received each fragment.
  • How long each fragment took to execute.
  • Whether a peer failed or became unavailable.
  • How partial results were collected and reconstructed.

These are not merely debugging concerns. They are important for evaluating performance, diagnosing failures, and understanding the provenance of distributed results.

As quantum services become more autonomous and interconnected, observability and execution provenance will become increasingly important parts of the infrastructure.

6. Why libp2p?

The project uses libp2p because it provides a modular networking stack for building distributed applications without imposing a single application-level architecture.

For QMeshPy, several capabilities are particularly relevant:

Peer identity and connectivity: Nodes can participate as peers in a distributed network rather than being represented only as fixed service endpoints.

Transport and stream multiplexing: Secure connections and multiplexed streams provide a foundation for concurrent communication between coordinators and workers.

Distributed discovery: Kademlia DHT and GossipSub provide complementary mechanisms for discovering peers and distributing capability information.

Application-defined protocols: Custom stream protocols allow quantum-specific execution messages to be defined independently of the underlying transport.

Implementation flexibility: The use of py-libp2p allows the orchestration layer to be developed in Python alongside the quantum software ecosystem.

The goal is not to make libp2p a quantum-computing framework. It is to use libp2p as a networking foundation on which quantum service discovery and coordination can be built.

This separation between networking primitives and application-level execution semantics is important for extensibility and interoperability.

7. Open questions and standardization opportunities

The hackathon implementation is an early exploration, but it points to several areas where further engineering and protocol discussions would be valuable.

Capability advertisement and metadata

How should a quantum service describe its execution capabilities in a way that is portable across different simulators, hardware providers, and software stacks?

A shared metadata model could help applications select compatible services without depending on provider-specific APIs.

Workload identity and execution lifecycle

How should a distributed circuit and its fragments be identified across the execution lifecycle?

A common model for job identifiers, fragment identifiers, execution states, and result references could improve traceability and interoperability.

Resource-aware planning

How should orchestration systems balance computational capacity, execution latency, network costs, and resource availability?

The QMeshPy benchmarks suggest that increasing the number of peers is not sufficient on its own. Better planning and scheduling strategies will be essential.

Failure handling and resilience

What should happen when a worker becomes unavailable after receiving a fragment?

A robust system needs to consider timeouts, retries, alternative peers, partial results, and recovery from interrupted execution.

Registry freshness and service availability

How should dynamic capability advertisements be refreshed, expired, and reconciled?

TTL policies are one part of the solution, but larger deployments may also require more sophisticated availability and resource-state mechanisms.

Provenance and result verification

How can applications understand where a result came from, which execution peers contributed to it, and what computation was performed?

For scientific and financial workloads, the ability to trace execution and preserve relevant evidence can be as important as the result itself.

These questions extend beyond quantum computing. They are relevant to any distributed network in which specialized computational resources are discovered and orchestrated dynamically.

8. From a hackathon prototype to an open research direction

QMeshPy demonstrates one possible direction for connecting distributed systems and quantum computing.

The current implementation uses simulators and a peer-to-peer coordination architecture to explore service discovery, circuit decomposition, distributed execution, and result reconstruction. It is a proof of concept, not a production quantum hardware network or a claim of quantum advantage.

That distinction is important.

The value of the experiment is in making the infrastructure questions concrete: how do peers discover one another, how are capabilities represented, how are workloads assigned, and how can results be assembled across a network?

These questions become increasingly relevant as specialized compute services evolve beyond centralized cloud platforms.

The QMeshPy codebase is open source, and we welcome contributions, experimentation, and discussion from the quantum computing, distributed systems, and networking communities.

Explore the project:

Acknowledgements

We would like to thank the IETF community and the organizers of the IETF 126 Hackathon for creating an environment where engineers and researchers can work together on practical implementations and explore new directions for Internet technologies.

It was a pleasure to collaborate with Soham Bhoir and Johanna Moran on QMeshPy, bringing together quantum computing, peer-to-peer networking, and distributed systems.

We hope this work encourages further experimentation around open, interoperable infrastructure for distributed quantum services.

The broader opportunity is to make specialized computation discoverable, composable, and accessible through open networking protocols—building toward a more distributed computational Internet.