A job's new `fabric` says where the statevector method's state runs: auto (the default), cpu, accelerator, a member's id or key, or a list of members (a power of two), the state split by its top qubits into one partition on each. The CUDA, HIP and OpenCL members' f64 state vectors are discovered once per process and certified against the CPU on the pinned corpus; only a member certified bit-exact is placed, so a placed job's answers are the CPU's byte for byte. A placement the host cannot honour is refused (J013), never made elsewhere. With no member asked for and none placed, the plan and the result are what they always were: the existing pins hold. The partitioned run (sv64::run_split) runs the launches the CPU plans on each partition's amplitudes; a gate on a partition qubit first has that qubit exchanged with a local one through the host's copy. Ground truth first: CPU partitions equal the CPU's state vector bit for bit over the pinned corpus at every partition count and on wide states with exchanges. On the fleet, one state split four ways over a laptop GPU (by two backends), the CPU by OpenCL and the CPU reference gives the CPU's answers byte for byte, as does the integrated GPU by HIP beside OpenCL. The result carries `fabric` (member, parity tier, certificate digest, corpus, energy unmetered with the reason), sealed by the job's receipt, and its provenance names the members: optional members of the job request, job result and provenance schemas, and fabric_members in the tools schema. Surfaces: `wai-quantum run --fabric` and `wai-quantum fabric`, the CLI's cuda, hip and opencl features, `fabric` in both MCP servers' job tools and `list_fabric` on the command line's, the service reading it. Members gain run_launches and max_qubits. Hardware legs in the CUDA and HIP workflows, absent legs and the CPU-partition tests by name in containers. Co-Authored-By: Claude Opus 5.5 <[email protected]>
46 lines
2.3 KiB
TOML
46 lines
2.3 KiB
TOML
[package]
|
|
name = "wai-quantum-cli"
|
|
version = "0.2.2"
|
|
edition = "2024"
|
|
rust-version = "1.97"
|
|
license = "Apache-2.0"
|
|
description = "The wai-quantum command line: OpenQASM programs run on this machine as the quantum job service runs them (the strongest method each admits, its accuracy named, the result signed with the user's key), sent to the service, linted, drawn and verified; an MCP server for agents over stdio; and the research tools (error correction, DMRG, neural quantum states, resource estimates)."
|
|
repository = "https://git.transaction.science/Transaction-Science/open-standards"
|
|
homepage = "https://wai.transaction.science/quantum-run"
|
|
keywords = ["quantum", "openqasm", "simulation", "cli", "mcp"]
|
|
categories = ["command-line-utilities", "science", "simulation"]
|
|
readme = "README.md"
|
|
|
|
[lib]
|
|
name = "wai_quantum_cli"
|
|
path = "src/lib.rs"
|
|
|
|
[[bin]]
|
|
name = "wai-quantum"
|
|
path = "src/main.rs"
|
|
|
|
[features]
|
|
default = ["service", "providers"]
|
|
# `submit`: send a job to the quantum job service over HTTPS.
|
|
service = ["dep:ureq"]
|
|
# `providers` and `run --provider`: the person's own quantum providers, their
|
|
# credentials in the operating system's keychain (wai-quantum-qpu).
|
|
providers = ["dep:wai-quantum-qpu"]
|
|
# The single-precision state vector on the GPU (`--method statevector_single`), on macOS.
|
|
metal = ["wai-quantum/quantum_sv_metal", "wai-quantum/quantum_cutrank_metal"]
|
|
# The fabric's accelerator members a statevector job may be placed on (`--fabric`, `wai-quantum fabric`): each loads its
|
|
# driver and runtime compiler when first used, so a build with them runs where there are none and finds no member there.
|
|
cuda = ["wai-quantum/quantum_fabric_cuda"]
|
|
hip = ["wai-quantum/quantum_fabric_hip"]
|
|
opencl = ["wai-quantum/quantum_fabric_opencl"]
|
|
|
|
[dependencies]
|
|
clap = { version = "4.6", features = ["derive", "env", "wrap_help"] }
|
|
clap_complete = "4.6"
|
|
getrandom = "0.4"
|
|
# float_roundtrip: a number read back reads as the double it was, so a
|
|
# result's receipt still verifies after any JSON writer has carried it.
|
|
serde_json = { version = "1", features = ["float_roundtrip"] }
|
|
ureq = { version = "3", optional = true, features = ["json"] }
|
|
wai-quantum = { version = "0.7.0", path = "../wai-quantum", default-features = false, features = ["full"] }
|
|
wai-quantum-qpu = { version = "0.3.0", path = "../wai-quantum-qpu", optional = true }
|