/simulations/qkd/link-budgetCompute QKD link budget and approximate key rate
- Request schema
- LinkBudgetInput
- Response codes
- 200, 400
- Path parameters
- None
Tools
Loading the selected calculator, defaults, and scientific caution notes.
Loading workbench view
Preparing calibrated controls, default presets, and explanatory notes.
Standards and integration
Inspect the local QuantumComm Workbench contract without leaving the app. This is a reproducibility aid for the mock ETSI-style API and simulation endpoints, not a production assurance artifact.
Use this page to cross-check endpoint shapes, schema names, and the current API version before exporting examples or comparing mock responses.
Title
QuantumComm Workbench API
Version
0.1.0
Endpoints
11
Schemas
27
Internal API contract for the QuantumComm Workbench MVP.
Server roots: /api.
Every operation below is sourced from the checked-in contract. Schema names are shown so the API sandbox and conformance checker can be compared against the same reference.
/simulations/qkd/link-budgetCompute QKD link budget and approximate key rate
/simulations/qkd/qber-forensicsDecompose QBER into simplified contributions
/simulations/qkd/post-processingEstimate QKD post-processing key length
/simulations/qkd/attackRun simulation-only QKD attack model
/simulations/kms/runRun key-management simulation
/simulations/network/routeRank quantum-network routes
/simulations/network/repeater-optimizeOptimize simplified repeater chain
/qkd-mock/statusGet mock QKD key-pool status
/qkd-mock/keys/requestRequest mock QKD key material
/qkd-mock/keys/{keyId}Retrieve mock key by ID
/export/reportExport reproducible run report
This summary is intentionally compact. It highlights the required fields and property counts without pretending that the Workbench contract is a full standards-conformance proof.
Type: object. Properties: 3. Required: 0.
Required fields
No required fields declared.
Properties
code, message, severity
Type: object. Properties: 3. Required: 0.
Required fields
No required fields declared.
Properties
error, message, issues
Type: object. Properties: 13. Required: 13.
Required fields
protocol, lengthKm, fiberLossDbPerKm, connectorLossDb, sourceRateHz, meanPhotonNumber, detectorEfficiency, darkCountProbability, backgroundCountProbability, misalignmentError, basisSiftingFactor, reconciliationEfficiency, blockSize
Properties
protocol, lengthKm, fiberLossDbPerKm, connectorLossDb, sourceRateHz, meanPhotonNumber, detectorEfficiency, darkCountProbability, backgroundCountProbability, misalignmentError, basisSiftingFactor, reconciliationEfficiency, blockSize
Type: object. Properties: 0. Required: 0.
Required fields
No required fields declared.
Properties
No explicit properties listed.
Type: object. Properties: 5. Required: 0.
Required fields
No required fields declared.
Properties
input, result, assumptions, warnings, version
Type: object. Properties: 8. Required: 8.
Required fields
measuredQber, misalignmentError, visibility, darkCountProbability, backgroundCountProbability, detectorMismatch, eveInterceptFraction, signalDetectionProbability
Properties
measuredQber, misalignmentError, visibility, darkCountProbability, backgroundCountProbability, detectorMismatch, eveInterceptFraction, signalDetectionProbability
Type: object. Properties: 5. Required: 0.
Required fields
No required fields declared.
Properties
input, result, assumptions, warnings, version
Type: object. Properties: 8. Required: 8.
Required fields
rawDetections, basisSiftingFactor, qber, sampleFraction, reconciliationEfficiency, verificationBits, authenticationBits, securityMarginBits
Properties
rawDetections, basisSiftingFactor, qber, sampleFraction, reconciliationEfficiency, verificationBits, authenticationBits, securityMarginBits
Type: object. Properties: 5. Required: 0.
Required fields
No required fields declared.
Properties
input, result, assumptions, warnings, version
Type: object. Properties: 2. Required: 0.
Required fields
No required fields declared.
Properties
attackType, parameters
Type: object. Properties: 5. Required: 0.
Required fields
No required fields declared.
Properties
input, result, assumptions, warnings, version
Type: object. Properties: 5. Required: 0.
Required fields
No required fields declared.
Properties
id, name, priority, requestRatePerSecond, bitsPerRequest
Type: object. Properties: 7. Required: 7.
Required fields
durationSeconds, timeStepSeconds, initialBufferBits, bufferCapacityBits, generationRateBitsPerSecond, keyTtlSeconds, services
Properties
durationSeconds, timeStepSeconds, initialBufferBits, bufferCapacityBits, generationRateBitsPerSecond, keyTtlSeconds, services
Type: object. Properties: 5. Required: 0.
Required fields
No required fields declared.
Properties
input, result, assumptions, warnings, version
Type: object. Properties: 4. Required: 0.
Required fields
No required fields declared.
Properties
scenario, sourceNodeId, targetNodeId, objective
Type: object. Properties: 5. Required: 0.
Required fields
No required fields declared.
Properties
input, result, assumptions, warnings, version
Type: object. Properties: 6. Required: 6.
Required fields
totalDistanceKm, attenuationDbPerKm, memoryLifetimeMs, attemptRateHz, targetFidelity, maxRepeaters
Properties
totalDistanceKm, attenuationDbPerKm, memoryLifetimeMs, attemptRateHz, targetFidelity, maxRepeaters
Type: object. Properties: 5. Required: 0.
Required fields
No required fields declared.
Properties
input, result, assumptions, warnings, version
Type: object. Properties: 13. Required: 0.
Required fields
No required fields declared.
Properties
poolId, availableBits, capacityBits, refillRateBitsPerSecond, oldestKeyAgeSeconds, activeKeyCount, expiredKeyCount, lastRefillAt, lastCleanupAt, authorizationMode, authorizedApplications, status, demoOnly
Type: object. Properties: 4. Required: 0.
Required fields
No required fields declared.
Properties
applicationId, keyLengthBits, numberOfKeys, priority
Type: object. Properties: 7. Required: 0.
Required fields
No required fields declared.
Properties
keyId, applicationId, keyLengthBits, createdAt, expiresAt, keyMaterial, demoOnly
Type: object. Properties: 3. Required: 0.
Required fields
No required fields declared.
Properties
keys, remainingPoolBits, demoOnly
Type: object. Properties: 3. Required: 0.
Required fields
No required fields declared.
Properties
error, availableBits, requestedBits
Type: object. Properties: 5. Required: 0.
Required fields
No required fields declared.
Properties
error, message, applicationId, authorizedApplications, demoOnly
Type: object. Properties: 5. Required: 0.
Required fields
No required fields declared.
Properties
error, message, keyId, expiredAt, demoOnly
Type: object. Properties: 7. Required: 0.
Required fields
No required fields declared.
Properties
toolId, title, input, result, assumptions, warnings, format
Type: object. Properties: 3. Required: 0.
Required fields
No required fields declared.
Properties
content, filename, mimeType
Keep the checked-in YAML visible for auditing, export mapping work, and mock example debugging.
openapi: 3.1.0
info:
title: QuantumComm Workbench API
version: 0.1.0
description: Internal API contract for the QuantumComm Workbench MVP.
servers:
- url: /api
paths:
/simulations/qkd/link-budget:
post:
summary: Compute QKD link budget and approximate key rate
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/LinkBudgetInput'
responses:
'200':
description: Link budget result
content:
application/json:
schema:
$ref: '#/components/schemas/LinkBudgetResponse'
'400':
$ref: '#/components/responses/ValidationError'
/simulations/qkd/qber-forensics:
post:
summary: Decompose QBER into simplified contributions
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/QberForensicsInput'
responses:
'200':
description: QBER forensics result
content:
application/json:
schema:
$ref: '#/components/schemas/QberForensicsResponse'
'400':
$ref: '#/components/responses/ValidationError'
/simulations/qkd/post-processing:
post:
summary: Estimate QKD post-processing key length
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PostProcessingInput'
responses:
'200':
description: Post-processing result
content:
application/json:
schema:
$ref: '#/components/schemas/PostProcessingResponse'
'400':
$ref: '#/components/responses/ValidationError'
/simulations/qkd/attack:
post:
summary: Run simulation-only QKD attack model
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/AttackInput'
responses:
'200':
description: Attack model result
content:
application/json:
schema:
$ref: '#/components/schemas/AttackResponse'
'400':
$ref: '#/components/responses/ValidationError'
/simulations/kms/run:
post:
summary: Run key-management simulation
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/KmsSimulationInput'
responses:
'200':
description: KMS simulation result
content:
application/json:
schema:
$ref: '#/components/schemas/KmsSimulationResponse'
'400':
$ref: '#/components/responses/ValidationError'
/simulations/network/route:
post:
summary: Rank quantum-network routes
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RouteInput'
responses:
'200':
description: Route ranking result
content:
application/json:
schema:
$ref: '#/components/schemas/RouteResponse'
'400':
$ref: '#/components/responses/ValidationError'
/simulations/network/repeater-optimize:
post:
summary: Optimize simplified repeater chain
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RepeaterOptimizeInput'
responses:
'200':
description: Repeater optimization result
content:
application/json:
schema:
$ref: '#/components/schemas/RepeaterOptimizeResponse'
'400':
$ref: '#/components/responses/ValidationError'
/qkd-mock/status:
get:
summary: Get mock QKD key-pool status
responses:
'200':
description: Status result
content:
application/json:
schema:
$ref: '#/components/schemas/KeyPoolStatus'
/qkd-mock/keys/request:
post:
summary: Request mock QKD key material
parameters:
- name: x-qkd-app-token
in: header
required: true
schema:
type: string
description: Demo-only header token matched against the request applicationId.
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/KeyRequest'
responses:
'200':
description: Key request success
content:
application/json:
schema:
$ref: '#/components/schemas/KeyRequestResponse'
'409':
description: Insufficient mock key material
content:
application/json:
schema:
$ref: '#/components/schemas/InsufficientKeyMaterialError'
'403':
description: Demo-only authorization failure
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedApplicationError'
'400':
$ref: '#/components/responses/ValidationError'
/qkd-mock/keys/{keyId}:
get:
summary: Retrieve mock key by ID
parameters:
- name: keyId
in: path
required: true
schema:
type: string
- name: x-qkd-application-id
in: header
required: true
schema:
type: string
- name: x-qkd-app-token
in: header
required: true
schema:
type: string
responses:
'200':
description: Key descriptor
content:
application/json:
schema:
$ref: '#/components/schemas/MockKeyDescriptor'
'403':
description: Demo-only authorization failure
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedApplicationError'
'410':
description: Key expired and cleaned from the active pool
content:
application/json:
schema:
$ref: '#/components/schemas/ExpiredKeyError'
'404':
description: Key not found
/export/report:
post:
summary: Export reproducible run report
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ReportExportInput'
responses:
'200':
description: Exported report
content:
application/json:
schema:
$ref: '#/components/schemas/ReportExportResponse'
'400':
$ref: '#/components/responses/ValidationError'
components:
responses:
ValidationError:
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationError'
schemas:
ModelWarning:
type: object
required: [code, message, severity]
properties:
code:
type: string
message:
type: string
severity:
type: string
enum: [info, warning, critical]
ValidationError:
type: object
required: [error, message]
properties:
error:
const: ValidationError
message:
type: string
issues:
type: array
items:
type: object
LinkBudgetInput:
type: object
required:
- protocol
- lengthKm
- fiberLossDbPerKm
- connectorLossDb
- sourceRateHz
- meanPhotonNumber
- detectorEfficiency
- darkCountProbability
- backgroundCountProbability
- misalignmentError
- basisSiftingFactor
- reconciliationEfficiency
- blockSize
properties:
protocol:
type: string
enum: [bb84, decoy_bb84, e91, bbm92, mdi_qkd, tf_qkd, cv_qkd]
lengthKm:
type: number
minimum: 0
maximum: 10000
fiberLossDbPerKm:
type: number
minimum: 0
maximum: 10
connectorLossDb:
type: number
minimum: 0
maximum: 100
sourceRateHz:
type: number
minimum: 1
meanPhotonNumber:
type: number
minimum: 0
maximum: 10
detectorEfficiency:
type: number
minimum: 0
maximum: 1
darkCountProbability:
type: number
minimum: 0
maximum: 1
backgroundCountProbability:
type: number
minimum: 0
maximum: 1
misalignmentError:
type: number
minimum: 0
maximum: 0.5
basisSiftingFactor:
type: number
minimum: 0
maximum: 1
reconciliationEfficiency:
type: number
minimum: 1
maximum: 5
blockSize:
type: integer
minimum: 1
LinkBudgetResult:
type: object
additionalProperties:
type: number
LinkBudgetResponse:
type: object
required: [input, result, assumptions, warnings, version]
properties:
input:
$ref: '#/components/schemas/LinkBudgetInput'
result:
$ref: '#/components/schemas/LinkBudgetResult'
assumptions:
type: array
items:
type: string
warnings:
type: array
items:
$ref: '#/components/schemas/ModelWarning'
version:
type: string
QberForensicsInput:
type: object
required:
- measuredQber
- misalignmentError
- visibility
- darkCountProbability
- backgroundCountProbability
- detectorMismatch
- eveInterceptFraction
- signalDetectionProbability
properties:
measuredQber:
type: number
minimum: 0
maximum: 0.5
misalignmentError:
type: number
minimum: 0
maximum: 0.5
visibility:
type: number
minimum: 0
maximum: 1
darkCountProbability:
type: number
minimum: 0
maximum: 1
backgroundCountProbability:
type: number
minimum: 0
maximum: 1
detectorMismatch:
type: number
minimum: 0
maximum: 1
eveInterceptFraction:
type: number
minimum: 0
maximum: 1
signalDetectionProbability:
type: number
minimum: 0
maximum: 1
QberForensicsResponse:
type: object
properties:
input:
$ref: '#/components/schemas/QberForensicsInput'
result:
type: object
assumptions:
type: array
items:
type: string
warnings:
type: array
items:
$ref: '#/components/schemas/ModelWarning'
version:
type: string
PostProcessingInput:
type: object
required:
- rawDetections
- basisSiftingFactor
- qber
- sampleFraction
- reconciliationEfficiency
- verificationBits
- authenticationBits
- securityMarginBits
properties:
rawDetections:
type: integer
minimum: 0
basisSiftingFactor:
type: number
minimum: 0
maximum: 1
qber:
type: number
minimum: 0
maximum: 0.5
sampleFraction:
type: number
minimum: 0
maximum: 1
reconciliationEfficiency:
type: number
minimum: 1
maximum: 5
verificationBits:
type: integer
minimum: 0
authenticationBits:
type: integer
minimum: 0
securityMarginBits:
type: integer
minimum: 0
PostProcessingResponse:
type: object
properties:
input:
$ref: '#/components/schemas/PostProcessingInput'
result:
type: object
assumptions:
type: array
items:
type: string
warnings:
type: array
items:
$ref: '#/components/schemas/ModelWarning'
version:
type: string
AttackInput:
type: object
required: [attackType, parameters]
properties:
attackType:
type: string
enum: [intercept_resend, pns_risk, detector_mismatch, trojan_horse_risk, dos_background]
parameters:
type: object
AttackResponse:
type: object
properties:
input:
$ref: '#/components/schemas/AttackInput'
result:
type: object
assumptions:
type: array
items:
type: string
warnings:
type: array
items:
$ref: '#/components/schemas/ModelWarning'
version:
type: string
KmsService:
type: object
required: [id, name, priority, requestRatePerSecond, bitsPerRequest]
properties:
id:
type: string
name:
type: string
priority:
type: integer
minimum: 0
requestRatePerSecond:
type: number
minimum: 0
bitsPerRequest:
type: integer
minimum: 1
KmsSimulationInput:
type: object
required:
- durationSeconds
- timeStepSeconds
- initialBufferBits
- bufferCapacityBits
- generationRateBitsPerSecond
- keyTtlSeconds
- services
properties:
durationSeconds:
type: number
minimum: 1
timeStepSeconds:
type: number
minimum: 0.001
initialBufferBits:
type: number
minimum: 0
bufferCapacityBits:
type: number
minimum: 1
generationRateBitsPerSecond:
type: number
minimum: 0
keyTtlSeconds:
type: number
minimum: 1
services:
type: array
items:
$ref: '#/components/schemas/KmsService'
KmsSimulationResponse:
type: object
properties:
input:
$ref: '#/components/schemas/KmsSimulationInput'
result:
type: object
assumptions:
type: array
items:
type: string
warnings:
type: array
items:
$ref: '#/components/schemas/ModelWarning'
version:
type: string
RouteInput:
type: object
required: [scenario, sourceNodeId, targetNodeId, objective]
properties:
scenario:
type: object
sourceNodeId:
type: string
targetNodeId:
type: string
objective:
type: string
enum: [rate, fidelity, latency, balanced]
RouteResponse:
type: object
properties:
input:
$ref: '#/components/schemas/RouteInput'
result:
type: object
assumptions:
type: array
items:
type: string
warnings:
type: array
items:
$ref: '#/components/schemas/ModelWarning'
version:
type: string
RepeaterOptimizeInput:
type: object
required:
- totalDistanceKm
- attenuationDbPerKm
- memoryLifetimeMs
- attemptRateHz
- targetFidelity
- maxRepeaters
properties:
totalDistanceKm:
type: number
minimum: 0
attenuationDbPerKm:
type: number
minimum: 0
memoryLifetimeMs:
type: number
minimum: 0
attemptRateHz:
type: number
minimum: 1
targetFidelity:
type: number
minimum: 0
maximum: 1
maxRepeaters:
type: integer
minimum: 0
maximum: 100
RepeaterOptimizeResponse:
type: object
properties:
input:
$ref: '#/components/schemas/RepeaterOptimizeInput'
result:
type: object
assumptions:
type: array
items:
type: string
warnings:
type: array
items:
$ref: '#/components/schemas/ModelWarning'
version:
type: string
KeyPoolStatus:
type: object
required: [poolId, availableBits, capacityBits, refillRateBitsPerSecond, oldestKeyAgeSeconds, activeKeyCount, expiredKeyCount, lastRefillAt, lastCleanupAt, authorizationMode, authorizedApplications, status, demoOnly]
properties:
poolId:
type: string
availableBits:
type: integer
capacityBits:
type: integer
refillRateBitsPerSecond:
type: number
oldestKeyAgeSeconds:
type: number
activeKeyCount:
type: integer
minimum: 0
expiredKeyCount:
type: integer
minimum: 0
lastRefillAt:
type: string
lastCleanupAt:
type: string
authorizationMode:
type: string
enum: [header_token_demo]
authorizedApplications:
type: array
items:
type: string
status:
type: string
enum: [ready, low, exhausted]
demoOnly:
type: boolean
KeyRequest:
type: object
required: [applicationId, keyLengthBits, numberOfKeys, priority]
properties:
applicationId:
type: string
keyLengthBits:
type: integer
minimum: 1
maximum: 1048576
numberOfKeys:
type: integer
minimum: 1
maximum: 100
priority:
type: integer
minimum: 0
maximum: 10
MockKeyDescriptor:
type: object
required: [keyId, applicationId, keyLengthBits, createdAt, expiresAt, keyMaterial, demoOnly]
properties:
keyId:
type: string
applicationId:
type: string
keyLengthBits:
type: integer
createdAt:
type: string
expiresAt:
type: string
keyMaterial:
type: string
demoOnly:
type: boolean
KeyRequestResponse:
type: object
required: [keys, remainingPoolBits, demoOnly]
properties:
keys:
type: array
items:
$ref: '#/components/schemas/MockKeyDescriptor'
remainingPoolBits:
type: integer
demoOnly:
type: boolean
InsufficientKeyMaterialError:
type: object
required: [error, availableBits, requestedBits]
properties:
error:
const: InsufficientKeyMaterial
availableBits:
type: integer
requestedBits:
type: integer
UnauthorizedApplicationError:
type: object
required: [error, message, applicationId, authorizedApplications, demoOnly]
properties:
error:
const: UnauthorizedApplication
message:
type: string
applicationId:
type: string
authorizedApplications:
type: array
items:
type: string
demoOnly:
type: boolean
ExpiredKeyError:
type: object
required: [error, message, keyId, expiredAt, demoOnly]
properties:
error:
const: ExpiredKey
message:
type: string
keyId:
type: string
expiredAt:
type: string
demoOnly:
type: boolean
ReportExportInput:
type: object
required: [toolId, title, input, result, assumptions, warnings, format]
properties:
toolId:
type: string
title:
type: string
input:
type: object
result:
type: object
assumptions:
type: array
items:
type: string
warnings:
type: array
items:
$ref: '#/components/schemas/ModelWarning'
format:
type: string
enum: [json, markdown]
ReportExportResponse:
type: object
required: [content, filename, mimeType]
properties:
content:
type: string
filename:
type: string
mimeType:
type: string