![]() |
Q2NS dev
ns-3 module
|
Distributed graph state generation across an orchestrator and three clients. More...
#include "ns3/core-module.h"#include "ns3/internet-module.h"#include "ns3/network-module.h"#include "ns3/point-to-point-module.h"#include "ns3/simulator.h"#include "ns3/q2ns-netcontroller.h"#include "ns3/q2ns-qgate.h"#include "ns3/q2ns-qnode.h"#include "ns3/q2ns-qubit.h"#include "ns3/q2nsviz-trace-writer.h"#include "ns3/q2nsviz-trace.h"#include <iostream>#include <vector>Go to the source code of this file.
Functions | |
| int | main (int argc, char **argv) |
Variables | |
| static const uint16_t | kCtrlPort = 9200 |
Distributed graph state generation across an orchestrator and three clients.
An orchestrator locally builds a 5-qubit linear cluster state (graph state): q0 - q1 - q2 - q3 - q4 It then distributes the even-indexed qubits (q0, q2, q4) to three clients and measures the odd-indexed qubits (q1, q3) in the X-basis, effectively transmitting entanglement onto the clients via single-qubit measurements.
Timing model (illustrative): kSingleGate = 100 ns (single-qubit gate) kTwoQGate = 300 ns (two-qubit gate) kQDelay = 10 ns (quantum channel propagation, ~2 m fiber)
CZ gate scheduling uses two non-overlapping layers: Layer 1 (non-overlapping): CZ(q0,q1), CZ(q2,q3) Layer 2 (non-overlapping): CZ(q1,q2), CZ(q3,q4) The 5 Hadamards (independent qubits) can be applied in parallel.
Visualization output is written to examples/example_traces/q2nsviz-graphstate-gen-example.json and can be loaded in the q2nsviz viewer (src/q2ns/utils/q2nsviz-serve.sh).
See docs/tutorials/tutorial-01.md for a detailed walkthrough.
Definition in file q2nsviz-graphstate-gen-example.cc.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 58 of file q2nsviz-graphstate-gen-example.cc.
References q2ns::NetController::CreateNode(), q2ns::NetController::InstallQuantumLink(), TraceWriter::Instance(), kCtrlPort, TraceWriter::Open(), q2ns::NetController::SetQStateBackend(), TraceCreateChannel(), and TraceCreateNode().
|
static |
Definition at line 56 of file q2nsviz-graphstate-gen-example.cc.
Referenced by main().