open-standards/wai/wai-quantum-py/python/wai_quantum/_engine.pyi
Transaction Science d9dabd9aa7 wai-quantum-py: error correction and mitigation from Python
qec_code, qec_decode and qec_threshold call the engine's error correction
in-process, each answer sealed in a job's form, and run() takes mitigate=.
The tests decode every error of weight up to two on the distance-5 colour
code to a trivial residual, check a certificate and a forged one, and hold
each answer to the command line's.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-28 08:42:54 -04:00

31 lines
1.6 KiB
Python

# The extension module's signatures (src/lib.rs). Values cross as JSON's.
from typing import Any, Dict, List, Optional, Tuple
__version__: str
UNMETERED: str
HANDS: List[Tuple[str, str]]
def run(request: Dict[str, Any], seed: bytes, memory_gb: int = 16) -> Dict[str, Any]: ...
def plan(request: Dict[str, Any], memory_gb: int = 16) -> Dict[str, Any]: ...
def lint(src: str) -> Dict[str, Any]: ...
def draw_text(src: str, width: int = 100) -> str: ...
def layout(src: str) -> Dict[str, Any]: ...
def draw_svg(src: str, hands: Optional[List[str]] = None) -> str: ...
def critique(src: str) -> Dict[str, Any]: ...
def improve(src: str) -> Dict[str, Any]: ...
def shortcuts(src: str, thorough: bool = False) -> Dict[str, Any]: ...
def equivalent(a: str, b: str) -> Dict[str, Any]: ...
def verify(job_body: Any) -> Dict[str, Any]: ...
def verdict(job_body: Any, intent: Any = None, memory_gb: int = 16) -> Dict[str, Any]: ...
def repair(src: str, options: Any) -> Dict[str, Any]: ...
def seal(request: Any, result: Any, seed: bytes) -> Dict[str, Any]: ...
def canonical(value: Any) -> bytes: ...
def digest(request: Any, result: Any) -> str: ...
def public_key(seed: bytes) -> str: ...
def did_key(key_hex: str) -> Optional[str]: ...
def methods(memory_gb: int = 16) -> List[Dict[str, Any]]: ...
def accuracy_classes() -> Dict[str, str]: ...
def history(op: str, args: Any, seed: Optional[bytes] = None) -> Dict[str, Any]: ...
def estimate(request: Dict[str, Any], seed: bytes) -> Dict[str, Any]: ...
def estimate_verify(body: Any) -> Dict[str, Any]: ...
def qec(op: str, request: Dict[str, Any], seed: bytes) -> Dict[str, Any]: ...