Skip to main content

Complete Import Map

Everything available after from qnet_core import .... This page lists all 32 classes and 12 module-level functions exported by the Python SDK.

Classes (32)

Engine

ClassPurpose
QNetEngineMain simulation engine — create, define topology, run protocols
SimulationConfigSimulation timeline config (cutoff time, step resolution, physical layer)

Core Types

ClassPurpose
PhysicalConfigPhysical layer constants (alpha loss defaults to 0.22 dB/km)
NodeDefinitionRuntime node with ID and T2 coherence time
LinkDefinitionRuntime link with distance, fidelity, rate, type
StrategyTypeRouting strategy enum (LowestLatency/HighestFidelity/HighestSuccess)
LinkTypePhysical medium enum (Fiber / Satellite)
SatelliteConditionsAtmospheric conditions helper for satellite links

Result Types

ClassPurpose
SimulationResultOutput from request_entanglement()
MonteCarloStatsOutput from simulate() ensemble runs

Topology & Comparison

ClassPurpose
NetworkTopologyPayloadGenerated topology (nodes + links) from generate_topology()
TopologyEndpointsEndpoint mapping for compare_topologies()
TopologySnapshotProgrammatic topology snapshot (for diffing)
TopologyMetadataSnapshot metadata (name, version)
TopologyConfigSnapshot config (alpha_loss, gamma_swapping)
TopologyDiffDiff result between two snapshots

.qnet File Format

ClassPurpose
QNetFile.qnet container — load, save, diff JSON topologies
QNetNodeNode type for .qnet format
QNetLinkLink type for .qnet format
QNetConfigPhysics config for .qnet files
QNetConstraintsFidelity/latency constraints for .qnet files
QNetMetadataMetadata (name, description, author, timestamp) for .qnet files
QNetNodeTypeNode type enum (Ground / Satellite / Repeater)
QNetLinkTypeLink type enum (Fiber / Satellite)
QNetSatelliteExtensionSatellite extension fields for .qnet links

QKD Protocol

ClassPurpose
QKDParametersBB84 protocol parameters (rounds, error tolerance, etc.)
QKDResultSingle QKD execution result
QKDStatsMonte Carlo QKD statistics (planned)

Teleportation Protocol

ClassPurpose
TeleportationParametersTeleportation parameters (source, target, relay nodes)
TeleportationOutcomeSingle teleportation execution result
TeleportationStatsMonte Carlo teleportation statistics (planned)

Distributed Computing Protocol

ClassPurpose
CoordinationTopologyParty coordination pattern (star/ring/mesh/arbitrary)
MeasurementBasisMeasurement basis config (type + correlation strength)
BasisTypeMeasurement basis enum (GHZ / Cluster / GraphGraph)
DistributedComputingParametersDistributed computing parameters
PartyOutcomePer-party measurement outcome in distributed computation
DistributedComputingResultDistributed computation result
DistributedComputingStatsMonte Carlo stats for distributed computing (planned)

Module-Level Functions (12)

FunctionReturnsPurpose
from_qnet_file(filepath)QNetEngineFactory: load a .qnet file and return an initialized engine
generate_topology(name)NetworkTopologyPayloadGenerate a pre-built topology (telecom_backbone, repeater_chain, hybrid_satellite_fiber)
compare_topologies(endpoints, ...)TopologyComparisonReportCompare topologies via Monte Carlo simulation
save_topology(engine, filepath)NoneSave engine's current topology to .qnet file
load_topology(engine, filepath)NoneLoad a .qnet file into an existing engine
validate(filepath)dictValidate a .qnet file (returns dict with valid/errors/warnings — never raises)
load_qnet_file(filepath)QNetFileLoad and parse a .qnet JSON file as Python objects
diff(file1, file2)dictDiff two .qnet files on disk
diff_topologies(snap1, snap2)TopologyDiffDiff two topology snapshots programmatically
qkd(engine, from_node, to_node, ...)QKDResultRun BB84-style QKD (convenience wrapper)
teleportation(engine, source, target, ...)TeleportationOutcomeExecute state teleportation (convenience wrapper)
distributed_computation(engine, participants, ...)DistributedComputingResultRun distributed quantum computation (convenience wrapper)

Typical Imports

# Core simulation
from qnet_core import (
QNetEngine, NodeDefinition, LinkDefinition,
StrategyType, PhysicalConfig, SimulationConfig,
)

# Pre-built topologies
from qnet_core import generate_topology

# Higher-level protocols
from qnet_core import (
QKDParameters, TeleportationParameters,
CoordinationTopology, MeasurementBasis, BasisType,
)

# .qnet file management
from qnet_core import (
QNetFile, QNetNodeType, QNetLinkType,
from_qnet_file, validate, diff, load_qnet_file, save_topology,
)

# Topology comparison
from qnet_core import compare_topologies, TopologyEndpoints

What's next