Skip to main content

.qnet File Format

Load, save, and manipulate network topologies as JSON files.

QNetFile

Container for .qnet JSON (load/save/diff).

QNetFile(name: str)
Field / MethodSignatureDescription
nodesList of nodes in this file
linksList of links in this file
metadataQNetMetadataMetadata accessor
add_node(id, memory_lifetime_ms?, memory_capacity?, node_type?)(str, float?, int?, QNetNodeType?) -> NonePush a node onto the file
add_link(id, src, to, distance_km, base_fidelity, generation_rate_hz, link_type?, satellite?)(str, str, str, float, float, float, QNetLinkType?, QNetSatelliteExtension?) -> NonePush a link onto the file
save(filepath)(str) -> NoneWrite pretty-printed JSON to disk

QNetNode

Node for .qnet format.

QNetNode(id: str, memory_lifetime_ms?: float, memory_capacity?: int, node_type?: QNetNodeType)
FieldTypeDefaultDescription
idstrNode ID
memory_lifetime_msfloatMemory lifetime (ms)
memory_capacityintMemory capacity
node_typeQNetNodeTypeNode type classification

Link for .qnet format.

QNetLink(id: str, src: str, to: str, distance_km: float, base_fidelity: float, generation_rate_hz: float, link_type?: QNetLinkType, satellite?: QNetSatelliteExtension)
FieldTypeDefaultDescription
idstrLink ID
srcstrSource node ID
tostrDestination node ID
distance_kmfloatPhysical distance (km)
base_fidelityfloatRaw link entanglement fidelity
generation_rate_hzfloatPhoton pair generation rate (Hz)
link_typeQNetLinkTypeLink type classification
satelliteQNetSatelliteExtensionNoneSatellite extension data

QNetConfig

Physics config for .qnet files.

QNetConfig(alpha_loss?: float, beta_fidelity_decay?: float, gamma_swapping?: float, max_attempts?: int)
FieldTypeDefaultDescription
alpha_lossfloatAlpha loss parameter
beta_fidelity_decayfloatBeta fidelity decay parameter
gamma_swappingfloatGamma swapping parameter
max_attemptsintMaximum entanglement attempts

QNetConstraints

Constraints for .qnet files (supports __eq__).

QNetConstraints(fidelity_target?: float, max_latency_ms?: float)
FieldTypeDefaultDescription
fidelity_targetfloatRequired fidelity
max_latency_msfloatMax allowed latency (ms)

QNetMetadata

Metadata for .qnet files.

QNetMetadata(name: str, description?: str, author?: str, created_at?: str)
FieldTypeDefaultDescription
namestrFile name
descriptionstrNoneFile description
authorstrNoneAuthor
created_atstrNoneCreation timestamp

QNetSatelliteExtension

Satellite extension for .qnet links.

FieldTypeDefaultDescription
visibilityfloatSatellite visibility factor
weather_factorfloatWeather attenuation factor