{"openapi":"3.1.0","info":{"title":"HALOWERK quantumwerk","version":"1.0.0","description":"HALOWERK quantumwerk — bezahlte Endpunkte nach x402. Preise in USDC auf Base Mainnet.","contact":{"url":"https://quantum.halowerk.com/"}},"servers":[{"url":"https://quantum.halowerk.com"}],"paths":{"/v1/qkd-key-request":{"post":{"operationId":"quantumwerk_qkd_key_request","summary":"Sifts supplied BB84 observations and estimates QBER from explicitly revealed positions.","description":"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.","tags":["quantumwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["alice_bits","alice_bases","bob_bits","bob_bases","reveal_indices"],"additionalProperties":false,"properties":{"alice_bits":{"type":"string","minLength":8,"maxLength":4096,"pattern":"^[01]+$","description":"Alice measurement bits for a simulation or already completed experiment."},"alice_bases":{"type":"string","minLength":8,"maxLength":4096,"pattern":"^[XZ]+$","description":"Alice bases, X or Z, aligned with alice_bits."},"bob_bits":{"type":"string","minLength":8,"maxLength":4096,"pattern":"^[01]+$","description":"Bob measurement bits aligned with alice_bits."},"bob_bases":{"type":"string","minLength":8,"maxLength":4096,"pattern":"^[XZ]+$","description":"Bob bases, X or Z, aligned with bob_bits."},"reveal_indices":{"type":"array","maxItems":2048,"uniqueItems":true,"items":{"type":"integer","minimum":0,"maximum":4095,"description":"Zero-based raw observation index to reveal for QBER estimation."}}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/shors-threat-index":{"post":{"operationId":"quantumwerk_shors_threat_index","summary":"Compares declared quantum resources with a transparent Shor-resource heuristic.","description":"Estimates logical qubits and logical gates from algorithm family and key size, applies a caller-supplied error-correction overhead, and reports capacity and runtime ratios. The formulas are coarse planning heuristics, not cryptanalytic proof or a forecast of when cryptographically relevant quantum computers will exist.","tags":["quantumwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["algorithm","key_bits","available_physical_qubits","logical_gate_rate_per_second","error_correction_physical_per_logical","available_runtime_days"],"additionalProperties":false,"properties":{"algorithm":{"type":"string","enum":["rsa","finite-field-dh","ecc"]},"key_bits":{"type":"integer","minimum":128,"maximum":32768,"description":"RSA/modulus bits or ECC group-size bits."},"available_physical_qubits":{"type":"integer","minimum":1,"maximum":1000000000000},"logical_gate_rate_per_second":{"type":"number","minimum":0.000001,"maximum":1000000000000000},"error_correction_physical_per_logical":{"type":"number","minimum":1,"maximum":1000000000},"available_runtime_days":{"type":"number","minimum":0.000001,"maximum":365000}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/circuit-optimize":{"post":{"operationId":"quantumwerk_circuit_optimize","summary":"Applies a small, auditable peephole optimizer to a supplied quantum gate list.","description":"Cancels adjacent identical self-inverse gates on identical ordered targets and folds adjacent RX, RY or RZ rotations on identical targets. It preserves only these local identities; it does not commute gates, model hardware topology, synthesize arbitrary unitaries or prove global optimality.","tags":["quantumwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["qubit_count","gates"],"additionalProperties":false,"properties":{"qubit_count":{"type":"integer","minimum":1,"maximum":128},"gates":{"type":"array","minItems":1,"maxItems":10000,"items":{"type":"object","required":["gate","targets"],"additionalProperties":false,"properties":{"gate":{"type":"string","enum":["X","Y","Z","H","CNOT","CZ","SWAP","RX","RY","RZ"]},"targets":{"type":"array","minItems":1,"maxItems":2,"uniqueItems":true,"items":{"type":"integer","minimum":0,"maximum":127}},"angle_rad":{"type":"number","minimum":-1000000,"maximum":1000000}}}}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/error-correction":{"post":{"operationId":"quantumwerk_error_correction","summary":"Decodes an odd-length repetition-code word and reports its adjacent parity syndrome.","description":"Treats a caller-supplied odd-length bit word as a classical repetition code, majority-decodes one logical bit, and reports the corrected word and adjacent XOR syndrome. This narrow demonstration is not a surface-code simulation and does not model coherent quantum errors, measurements or fault-tolerant thresholds.","tags":["quantumwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["encoded_bits"],"additionalProperties":false,"properties":{"encoded_bits":{"type":"string","minLength":3,"maxLength":99,"pattern":"^[01]+$","description":"Odd-length repetition-code word."}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/annealer-schedule":{"post":{"operationId":"quantumwerk_annealer_schedule","summary":"Generates a deterministic linear or geometric temperature schedule.","description":"Interpolates a caller-supplied start and end temperature across a bounded number of steps using either a linear or geometric rule. It does not run an annealer, optimize a problem Hamiltonian or tune a schedule from hardware measurements.","tags":["quantumwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["start_temperature","end_temperature","steps","schedule"],"additionalProperties":false,"properties":{"start_temperature":{"type":"number","minimum":1e-12,"maximum":1000000000000},"end_temperature":{"type":"number","minimum":1e-12,"maximum":1000000000000},"steps":{"type":"integer","minimum":2,"maximum":2000},"schedule":{"type":"string","enum":["linear","geometric"]}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/lattice-check":{"post":{"operationId":"quantumwerk_lattice_check","summary":"Compares a target lattice-vector length with transparent Gaussian and BKZ-style heuristics.","description":"Uses lattice dimension, log2 determinant and an assumed root-Hermite factor to estimate Gaussian-heuristic and reduced-basis vector lengths in log2 units. It does not execute lattice reduction, validate an LWE instance or provide a cryptographic security level.","tags":["quantumwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["dimension","log2_determinant","target_norm_log2","root_hermite_factor"],"additionalProperties":false,"properties":{"dimension":{"type":"integer","minimum":2,"maximum":100000},"log2_determinant":{"type":"number","minimum":-1000000000,"maximum":1000000000},"target_norm_log2":{"type":"number","minimum":-1000000000,"maximum":1000000000},"root_hermite_factor":{"type":"number","minimum":1,"maximum":2}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/random-number":{"post":{"operationId":"quantumwerk_random_number","summary":"Calculates simple monobit and runs diagnostics for a supplied bitstream.","description":"Counts zeros, ones and runs, reports a normalized monobit imbalance, and compares observed runs with the IID Bernoulli expectation. It generates no random number and is not a NIST test-suite replacement, entropy estimate or certification of cryptographic randomness.","tags":["quantumwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["bits"],"additionalProperties":false,"properties":{"bits":{"type":"string","minLength":32,"maxLength":100000,"pattern":"^[01]+$","description":"Caller-supplied bitstream to diagnose."}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/molecule-sim":{"post":{"operationId":"quantumwerk_molecule_sim","summary":"Evaluates a classical Lennard-Jones energy for supplied atom coordinates.","description":"Computes all pair distances and a single-parameter Lennard-Jones 12-6 potential using caller-supplied epsilon and sigma. It does not perform quantum chemistry, infer element-specific force fields, relax geometry, model bonds or predict experimental molecular behavior.","tags":["quantumwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["atoms","epsilon","sigma"],"additionalProperties":false,"properties":{"atoms":{"type":"array","minItems":2,"maxItems":200,"items":{"type":"object","required":["element","x","y","z"],"additionalProperties":false,"properties":{"element":{"type":"string","minLength":1,"maxLength":3},"x":{"type":"number","minimum":-1000000,"maximum":1000000},"y":{"type":"number","minimum":-1000000,"maximum":1000000},"z":{"type":"number","minimum":-1000000,"maximum":1000000}}}},"epsilon":{"type":"number","minimum":0,"maximum":1000000000,"description":"Pair potential energy scale in caller-selected units."},"sigma":{"type":"number","minimum":1e-9,"maximum":1000000000,"description":"Pair distance scale in the same coordinate units."}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/portfolio-qaoa":{"post":{"operationId":"quantumwerk_portfolio_qaoa","summary":"Solves a small binary portfolio objective exactly as a QAOA/QUBO benchmark.","description":"Enumerates every selection of exactly k assets for at most 16 assets, maximizing summed expected return minus a caller-selected covariance penalty. It runs no quantum circuit and provides a deterministic classical optimum for testing a corresponding binary QAOA or QUBO formulation; it is not investment advice and ignores transaction costs and allocation sizes.","tags":["quantumwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["assets","covariance","select_count","risk_aversion"],"additionalProperties":false,"properties":{"assets":{"type":"array","minItems":1,"maxItems":16,"items":{"type":"object","required":["name","expected_return"],"additionalProperties":false,"properties":{"name":{"type":"string","minLength":1,"maxLength":64},"expected_return":{"type":"number","minimum":-1000,"maximum":1000}}}},"covariance":{"type":"array","minItems":1,"maxItems":16,"items":{"type":"array","minItems":1,"maxItems":16,"items":{"type":"number","minimum":-1000000,"maximum":1000000}}},"select_count":{"type":"integer","minimum":1,"maximum":16},"risk_aversion":{"type":"number","minimum":0,"maximum":1000000}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}},"/v1/entanglement-test":{"post":{"operationId":"quantumwerk_entanglement_test","summary":"Calculates the CHSH S statistic from four supplied measurement-setting count tables.","description":"Converts ++, +−, −+ and −− counts into a correlation for each of AB, AB′, A′B and A′B′, then computes S = E(AB) + E(AB′) + E(A′B) − E(A′B′). A value above the classical bound in supplied data does not by itself demonstrate entanglement or close detection, locality, sampling or significance loopholes.","tags":["quantumwerk"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["measurements"],"additionalProperties":false,"properties":{"measurements":{"type":"array","minItems":4,"maxItems":4,"items":{"type":"object","required":["setting","plus_plus","plus_minus","minus_plus","minus_minus"],"additionalProperties":false,"properties":{"setting":{"type":"string","enum":["AB","ABprime","AprimeB","AprimeBprime"]},"plus_plus":{"type":"integer","minimum":0,"maximum":1000000000000},"plus_minus":{"type":"integer","minimum":0,"maximum":1000000000000},"minus_plus":{"type":"integer","minimum":0,"maximum":1000000000000},"minus_minus":{"type":"integer","minimum":0,"maximum":1000000000000}}}}}}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object","required":["method"],"properties":{"method":{"type":"string"}},"additionalProperties":true}}}},"400":{"description":"Eingabe ungültig, charged=false"},"402":{"description":"Zahlung erforderlich. Die Antwort trägt accepts, description und inputSchema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequired"}}}},"429":{"description":"Zu viele unbezahlte Anfragen, charged=false"},"502":{"description":"Gegenstelle nicht erreichbar, charged=false"},"504":{"description":"Zeitbudget überschritten, charged=false"}}}}},"components":{"schemas":{"PaymentRequired":{"type":"object","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"description":{"type":"string"},"inputSchema":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}}}}},"securitySchemes":{"x402":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 Zahlungsnachweis"}}}}