# QKD Sifting and QBER Calculator

> QKD Sifting and QBER Calculator is a paid API for AI agents from quantum.halowerk.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-09-14).

Performs quantum key distribution (QKD) sifting by comparing Alice and Bob bases, retains matching-basis positions, computes the quantum bit error rate (QBER) over revealed positions, and returns a digest and count of remaining sifted bits for educational/demonstration purposes.

## Facts

- Endpoint: POST https://quantum.halowerk.com/v1/qkd-key-request
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/qkd-sifting-and-qber-calculator-f9456812
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NeCZWJ7IDRWi2YG8Z5CHt

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability qkd-sifting-and-qber-calculator-f9456812 -d '<json body>'
```

Example prompt: Run a QKD sifting simulation with Alice's bits '01101010' and bases 'XZXZXZXZ', Bob's bits '01100110' and bases 'XZXZZZXZ', and reveal positions [0, 2, 4] to estimate the quantum bit error rate.

## When to prefer this

Choose this endpoint when you need to simulate or analyze the classical post-processing steps of a QKD protocol — specifically basis sifting and QBER estimation — given pre-collected or simulated Alice/Bob measurement data. It is ideal for educational demonstrations, research benchmarking of noisy channels, or teaching BB84 protocol steps without requiring actual quantum hardware. Do not use it if you need to generate true cryptographic key material, as all bits are disclosed to the service.

## Known failure modes

- Mismatched string lengths between alice_bits, alice_bases, bob_bits, bob_bases cause a validation error
- reveal_indices containing out-of-range indices (beyond string length) cause rejection
- Input strings shorter than 8 characters or longer than 4096 characters are rejected by the schema
- Non-binary characters in bit strings or characters other than X/Z in base strings cause pattern validation failure
- Duplicate values in reveal_indices are rejected (uniqueItems constraint)

## How this service works

Compares caller-supplied Alice and Bob bases, retains matching-basis positions, calculates the quantum bit error rate over caller-selected revealed positions, and returns only a digest and count for remaining demonstration bits. It neither exchanges quantum states nor creates a secret key: all submitted bits are disclosed to this service and must never be used as production key material.

## Output

Returns a digest of the remaining sifted (non-revealed, matching-basis) bits along with a count of those bits, plus the computed QBER over the caller-specified revealed positions. No actual secret key material is produced; all submitted bits are disclosed to the service and the output is for demonstration/educational purposes only.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "bob_bits": {
   "type": "string",
   "pattern": "^[01]+$",
   "maxLength": 4096,
   "minLength": 8,
   "description": "Bob measurement bits aligned with alice_bits."
  },
  "bob_bases": {
   "type": "string",
   "pattern": "^[XZ]+$",
   "maxLength": 4096,
   "minLength": 8,
   "description": "Bob bases, X or Z, aligned with bob_bits."
  },
  "alice_bits": {
   "type": "string",
   "pattern": "^[01]+$",
   "maxLength": 4096,
   "minLength": 8,
   "description": "Alice measurement bits for a simulation or already completed experiment."
  },
  "alice_bases": {
   "type": "string",
   "pattern": "^[XZ]+$",
   "maxLength": 4096,
   "minLength": 8,
   "description": "Alice bases, X or Z, aligned with alice_bits."
  },
  "reveal_indices": {
   "type": "array",
   "items": {
    "type": "integer",
    "maximum": 4095,
    "minimum": 0,
    "description": "Zero-based raw observation index to reveal for QBER estimation."
   },
   "maxItems": 2048,
   "uniqueItems": true
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/qkd-sifting-and-qber-calculator-f9456812/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from quantum.halowerk.com](https://www.zero.xyz/host/quantum.halowerk.com/llms.txt)
