wai-quantum 0.3.41: the fabric — members, parity against the CPU reference, certificates, placement by joules, and the gate kernel in 32-bit lanes #195
20 changed files with 1371 additions and 14 deletions
|
|
@ -261,6 +261,7 @@ and a role are fixed once registered.
|
|||
| `wai.quantum.compile` | a receipt-kind label the wai-quantum crate seals; no revision of SPEC or of an extension registers it, so it is not a registered record |
|
||||
| `wai.quantum.rearrange` | a receipt-kind label the wai-quantum crate seals; no revision of SPEC or of an extension registers it, so it is not a registered record |
|
||||
| `wai.quantum.qbom` | a receipt-kind label the wai-quantum crate seals; no revision of SPEC or of an extension registers it, so it is not a registered record |
|
||||
| `wai.quantum.fabric` | a receipt-kind label the wai-quantum crate seals; no revision of SPEC or of an extension registers it, so it is not a registered record |
|
||||
|
||||
| wire identifier (not a capability) | kind | status | defined in |
|
||||
|---|---|---|---|
|
||||
|
|
|
|||
|
|
@ -217,7 +217,8 @@ for _n in ["video-receipt-id", "video-manifest-receipt-id", "video-ssai-receipt-
|
|||
"video-package-receipt-id", "video-channel-receipt-id", "world-receipt-id", "film-receipt-id",
|
||||
"haptic-receipt-id", "score-receipt-id", "splat4d-receipt-id", "audio-receipt-id", "ternary-receipt-id",
|
||||
"quantum-receipt-id", "quantum-calibration-id", "quantum-job-id", "quantum-mitigate-id",
|
||||
"quantum-decode-id", "quantum-compile-id", "quantum-rearrange-id", "phasor-receipt-id"]:
|
||||
"quantum-decode-id", "quantum-compile-id", "quantum-rearrange-id", "quantum-fabric-id",
|
||||
"phasor-receipt-id"]:
|
||||
PROFILES["wai:" + _n] = ("receipt", False, True, False)
|
||||
for _n in ["asset-receipt-id", "quantum-qbom-id"]:
|
||||
PROFILES["wai:" + _n] = ("receipt", True, True, False)
|
||||
|
|
|
|||
|
|
@ -944,7 +944,7 @@ where the figure's class is, and which key signed it.
|
|||
| `wai:video-receipt-id`, `wai:video-manifest-receipt-id`, `wai:video-ssai-receipt-id`, `wai:video-keys-receipt-id`, `wai:video-package-receipt-id`, `wai:video-channel-receipt-id` | the `wai.video.int_motion` receipt and the `wai.video.*` OTT receipts | `receipt`: its receipt hash | `joules_micro`; its class | `null` | its `signer_pubkey` |
|
||||
| `wai:world-receipt-id`, `wai:film-receipt-id`, `wai:haptic-receipt-id`, `wai:score-receipt-id`, `wai:splat4d-receipt-id`, `wai:audio-receipt-id`, `wai:ternary-receipt-id` | the world-session, film and reel, haptic, score, 4D-splat, audio-scene and ternary-reconstruction receipts | `receipt`: its receipt hash, over the payload in the form it was signed (§2.8) | `joules_micro`; its optional label | `null` | its `signer_pubkey` |
|
||||
| `wai:asset-receipt-id` | provenance receipt | `receipt`: its receipt hash | step `i`'s `joules_micro`; that step's optional label | step, from 0 | its `signer_pubkey` |
|
||||
| `wai:quantum-receipt-id`, `wai:quantum-calibration-id`, `wai:quantum-job-id`, `wai:quantum-mitigate-id`, `wai:quantum-decode-id`, `wai:quantum-compile-id`, `wai:quantum-rearrange-id`, `wai:phasor-receipt-id` | the quantum receipts | `receipt`: its receipt hash in the form it was sealed, labelled or not | `joules_micro`; its optional label | `null` | its `signer_pubkey` |
|
||||
| `wai:quantum-receipt-id`, `wai:quantum-calibration-id`, `wai:quantum-job-id`, `wai:quantum-mitigate-id`, `wai:quantum-decode-id`, `wai:quantum-compile-id`, `wai:quantum-rearrange-id`, `wai:quantum-fabric-id`, `wai:phasor-receipt-id` | the quantum receipts | `receipt`: its receipt hash in the form it was sealed, labelled or not | `joules_micro`; its optional label | `null` | its `signer_pubkey` |
|
||||
| `wai:quantum-qbom-id` | quantum bill of materials | `receipt`: its receipt hash | entry `i`'s `joules_micro`; that entry's optional label | entry, from 0 | its `signer_pubkey` |
|
||||
|
||||
A receipt hash here is `BLAKE3(identity domain ‖ signing payload ‖ signature)`,
|
||||
|
|
|
|||
|
|
@ -1462,6 +1462,10 @@
|
|||
"label": "wai.quantum.decode",
|
||||
"reason": "a receipt-kind label the wai-quantum crate seals; no revision of SPEC or of an extension registers it, so it is not a registered record"
|
||||
},
|
||||
{
|
||||
"label": "wai.quantum.fabric",
|
||||
"reason": "a receipt-kind label the wai-quantum crate seals; no revision of SPEC or of an extension registers it, so it is not a registered record"
|
||||
},
|
||||
{
|
||||
"label": "wai.quantum.mitigate",
|
||||
"reason": "a receipt-kind label the wai-quantum crate seals; no revision of SPEC or of an extension registers it, so it is not a registered record"
|
||||
|
|
|
|||
2
wai/wai-pack/Cargo.lock
generated
2
wai/wai-pack/Cargo.lock
generated
|
|
@ -682,7 +682,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wai-quantum"
|
||||
version = "0.3.40"
|
||||
version = "0.3.41"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"ed25519-dalek",
|
||||
|
|
|
|||
2
wai/wai-quantum-serve/Cargo.lock
generated
2
wai/wai-quantum-serve/Cargo.lock
generated
|
|
@ -589,7 +589,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wai-quantum"
|
||||
version = "0.3.40"
|
||||
version = "0.3.41"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"ed25519-dalek",
|
||||
|
|
|
|||
2
wai/wai-quantum/Cargo.lock
generated
2
wai/wai-quantum/Cargo.lock
generated
|
|
@ -415,7 +415,7 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
|||
|
||||
[[package]]
|
||||
name = "wai-quantum"
|
||||
version = "0.3.40"
|
||||
version = "0.3.41"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"ed25519-dalek",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "wai-quantum"
|
||||
version = "0.3.40"
|
||||
version = "0.3.41"
|
||||
edition = "2024"
|
||||
rust-version = "1.97"
|
||||
license = "Apache-2.0"
|
||||
|
|
@ -120,6 +120,10 @@ quantum_noise = ["quantum_cal"]
|
|||
quantum_compile = ["quantum_ops"]
|
||||
quantum_atom = ["quantum_ops"]
|
||||
quantum_qbom = ["quantum_ops"]
|
||||
# The fabric: members, parity against the CPU reference, certification,
|
||||
# placement by joules, and a signed receipt naming where a result ran. With the
|
||||
# fixed-point core in 32-bit lanes, the kernel an integer-only fabric runs.
|
||||
quantum_fabric = ["quantum", "quantum_ops"]
|
||||
|
||||
# --- interference / ML layer ----------------------------------------------
|
||||
quantum_vml = []
|
||||
|
|
@ -133,7 +137,7 @@ quantum_phasor_meter = ["_signing"]
|
|||
full = [
|
||||
"quantum", "quantum_toolchain", "quantum_mps", "quantum_stabilizer", "quantum_pauli", "quantum_spd", "quantum_spd_receipt", "quantum_bptn", "quantum_resource", "quantum_resource_receipt", "quantum_frame", "quantum_tn", "quantum_gbs", "quantum_sv", "quantum_arch", "quantum_ldpc", "quantum_qio", "quantum_uf", "quantum_noisy", "quantum_dmrg", "quantum_tdvp", "quantum_chem", "quantum_nqs", "quantum_qir", "quantum_info", "quantum_qudit", "quantum_comm", "quantum_source", "quantum_channel",
|
||||
"quantum_receipt", "quantum_ops", "quantum_cal", "quantum_mitigate", "quantum_qec",
|
||||
"quantum_control", "quantum_noise", "quantum_compile", "quantum_atom", "quantum_qbom",
|
||||
"quantum_control", "quantum_noise", "quantum_compile", "quantum_atom", "quantum_qbom", "quantum_fabric",
|
||||
"quantum_vml", "quantum_phasor", "quantum_qfhrr", "quantum_kernel", "quantum_qdata",
|
||||
"quantum_phasor_meter",
|
||||
]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
//! No QPU, no cloud service, no vendor SDK, and **no system libraries** — pure
|
||||
//! Rust, so the same source runs natively, in the browser via wasm, and as a
|
||||
//! WASI component at the edge, producing **byte-identical** results and receipts
|
||||
//! on all three.
|
||||
//! on all three. A fabric receipt is the exception by design: it names the
|
||||
//! member that ran the work.
|
||||
//!
|
||||
//! Everything is behind a feature; enable only what you use.
|
||||
|
||||
|
|
@ -62,6 +63,9 @@ pub mod quantum_cal;
|
|||
#[cfg(feature = "quantum_compile")]
|
||||
pub mod quantum_compile;
|
||||
|
||||
#[cfg(feature = "quantum_fabric")]
|
||||
pub mod quantum_fabric;
|
||||
|
||||
#[cfg(feature = "quantum_control")]
|
||||
pub mod quantum_control;
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ pub enum BaseGate {
|
|||
}
|
||||
|
||||
impl BaseGate {
|
||||
fn opcode(self) -> u8 {
|
||||
pub(crate) fn opcode(self) -> u8 {
|
||||
match self {
|
||||
BaseGate::I => 0,
|
||||
BaseGate::X => 1,
|
||||
|
|
@ -220,7 +220,7 @@ impl BaseGate {
|
|||
}
|
||||
|
||||
/// The 2×2 fixed-point matrix `[[m00,m01],[m10,m11]]` for this gate.
|
||||
fn matrix(self, param: u16) -> [[Amp; 2]; 2] {
|
||||
pub(crate) fn matrix(self, param: u16) -> [[Amp; 2]; 2] {
|
||||
let z = Amp::ZERO;
|
||||
let one = Amp::ONE;
|
||||
let i = Amp { re: 0, im: ONE };
|
||||
|
|
|
|||
1238
wai/wai-quantum/src/quantum_fabric.rs
Normal file
1238
wai/wai-quantum/src/quantum_fabric.rs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -52,6 +52,10 @@ pub const CAP_QUANTUM_REARRANGE: &str = "wai.quantum.rearrange";
|
|||
/// A signed Quantum Bill of Materials — one provenance manifest bundling the stage
|
||||
/// receipts of a quantum computation (compile, calibrate, execute, mitigate, …).
|
||||
pub const CAP_QUANTUM_QBOM: &str = "wai.quantum.qbom";
|
||||
/// A signed statement of where a result ran: the fabric member, the kernel
|
||||
/// implementation, the parity its certificate earned against the CPU
|
||||
/// reference, and the joules (`crate::quantum_fabric`).
|
||||
pub const CAP_QUANTUM_FABRIC: &str = "wai.quantum.fabric";
|
||||
|
||||
const DOMAIN_CAL: &[u8] = b"wai:quantum-calibration\x01";
|
||||
const DOMAIN_CAL_ID: &[u8] = b"wai:quantum-calibration-id\x01";
|
||||
|
|
|
|||
2
wai/wai-rs/Cargo.lock
generated
2
wai/wai-rs/Cargo.lock
generated
|
|
@ -3900,7 +3900,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wai-quantum"
|
||||
version = "0.3.40"
|
||||
version = "0.3.41"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"ed25519-dalek",
|
||||
|
|
|
|||
|
|
@ -393,6 +393,9 @@ quantum_ldpc = ["quantum_frame", "wai-quantum/quantum_ldpc"]
|
|||
# Quantum-inspired optimisation: simulated bifurcation, annealing, exact referee.
|
||||
quantum_qio = ["dep:wai-quantum", "wai-quantum/quantum_qio", "wai-quantum/quantum_dmrg", "wai-quantum/quantum_tdvp", "wai-quantum/quantum_chem", "wai-quantum/quantum_nqs"]
|
||||
quantum_qir = ["quantum_toolchain", "wai-quantum/quantum_qir"]
|
||||
# The fabric: members, parity against the CPU reference, certification,
|
||||
# placement by joules, and the core in 32-bit lanes.
|
||||
quantum_fabric = ["quantum", "quantum_ops", "wai-quantum/quantum_fabric"]
|
||||
# Variational quantum machine learning (extensions/quantum-sim § VML,
|
||||
# `wai.quantum.vml`): the interference-based ML the thermodynamic-computing pivot
|
||||
# left behind — a Quantum Circuit Born Machine (P_θ(x)=|ψ_θ(x)|²) trained by the
|
||||
|
|
@ -527,6 +530,7 @@ required-features = [
|
|||
"quantum_arch",
|
||||
"quantum_ldpc",
|
||||
"quantum_qio",
|
||||
"quantum_fabric",
|
||||
]
|
||||
|
||||
[[bin]]
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
//! `wasmtime` runs with **byte-identical output** — the same circuit reconstructs
|
||||
//! to the same statevector hash on a laptop or at the edge. That equality is the
|
||||
//! point: a quantum computation you can put in a receipt and re-run anywhere.
|
||||
//! The one exception is `fabric`, which describes the host it runs on: its
|
||||
//! certificates name the member they ran on, and agree everywhere in parity
|
||||
//! and corpus digest.
|
||||
//!
|
||||
//! ```text
|
||||
//! wai-quantum list
|
||||
|
|
@ -177,6 +180,8 @@ fn usage() -> ! {
|
|||
[--complex] [--project [--kpi] [--point-group a1|a2|b1|b2 | --reflections a1|a2|b1|b2]\n \
|
||||
[--odd]] [--alpha A] [--steps N] [--samples S] [--lr R]\n \
|
||||
[--init W] [--guide ε] [--exact] [--seed S] [--json]\n\n\
|
||||
THE FABRIC (members, parity against the CPU reference, placement):\n \
|
||||
wai-quantum fabric [--circuits N] [--seed S] [--json]\n\n\
|
||||
OPTIMISATION (simulated bifurcation, annealing, exact):\n \
|
||||
wai-quantum qio (--gset FILE | --sk N [--instance S]) [--method dsb|bsb|hdsb|hbsb|sa|exact]\n \
|
||||
[--steps N] [--trials T] [--dt D] [--c1 C] [--gamma G] [--beta0 B --beta1 B] [--descend]\n \
|
||||
|
|
@ -1298,6 +1303,60 @@ fn main() {
|
|||
}
|
||||
}
|
||||
|
||||
// The fabric this process stands on: its detected members, and the
|
||||
// fixed-point core's 32-bit-lane port certified against the native
|
||||
// simulator on random circuits, then placed. The member lines and the
|
||||
// certificate's member describe the host, so they differ between
|
||||
// platforms; the parity and the corpus digest do not.
|
||||
"fabric" => {
|
||||
use wai::quantum_fabric::*;
|
||||
let circuits: usize = num(args, "--circuits", "", 200);
|
||||
let seed: u64 = num(args, "--seed", "", 7);
|
||||
let mut member = detect_local();
|
||||
let cert = certify_lanes(&member.id, circuits, seed);
|
||||
member.kernels.push(KernelEntry { kernel: KERNEL_CIRCUIT_APPLY.into(), implementation: "lanes32".into(), certificate: cert, energy: None });
|
||||
let placed = place(std::slice::from_ref(&member), KERNEL_CIRCUIT_APPLY, &Parity::BitExact);
|
||||
let parity = |p: &Parity| match p {
|
||||
Parity::BitExact => "bit-exact".to_string(),
|
||||
Parity::Within { max_ulp, max_abs } => format!("within {max_ulp} ulp ({max_abs:.3e})"),
|
||||
Parity::Statistical { fidelity, shots } => format!("statistical, fidelity {fidelity:.6} over {shots} shots"),
|
||||
Parity::Uncertified => "uncertified".to_string(),
|
||||
};
|
||||
let hex = |b: &[u8]| b.iter().map(|x| format!("{x:02x}")).collect::<String>();
|
||||
if flag(args, "--json") {
|
||||
let kernels: Vec<String> = member
|
||||
.kernels
|
||||
.iter()
|
||||
.map(|k| format!("{{\"implementation\":{:?},\"kernel\":{:?},\"parity\":{:?},\"generator\":{:?},\"cases\":{},\"corpus\":\"{}\"}}", k.implementation, k.kernel, parity(&k.certificate.parity), k.certificate.generator, k.certificate.cases, hex(&k.certificate.corpus)))
|
||||
.collect();
|
||||
println!(
|
||||
"{{\"member\":{:?},\"class\":\"{}\",\"presence\":\"{}\",\"detail\":{:?},\"kernels\":[{}],\"placed\":{}}}",
|
||||
member.id,
|
||||
member.class.label(),
|
||||
member.presence.label(),
|
||||
member.detail,
|
||||
kernels.join(","),
|
||||
placed.map_or("null".to_string(), |(m, k)| format!("{:?}", format!("{} {}", m.id, k.implementation)))
|
||||
);
|
||||
} else {
|
||||
println!("member {} ({}, {})", member.id, member.class.label(), member.presence.label());
|
||||
println!("detail {}", member.detail);
|
||||
println!("kernel {KERNEL_CIRCUIT_APPLY}");
|
||||
for k in &member.kernels {
|
||||
if k.implementation == REFERENCE {
|
||||
println!(" {:<11}{} (the reference)", k.implementation, parity(&k.certificate.parity));
|
||||
} else {
|
||||
println!(" {:<11}{} over {} cases", k.implementation, parity(&k.certificate.parity), k.certificate.cases);
|
||||
println!(" {:<11}corpus {} from {}", "", &hex(&k.certificate.corpus)[..16], k.certificate.generator);
|
||||
}
|
||||
}
|
||||
match placed {
|
||||
Some((m, k)) => println!("placed {} · {} (bit-exact required)", m.id, k.implementation),
|
||||
None => println!("placed nothing meets bit-exact"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Quantum-inspired optimisation: Max-Cut (G-set text) or a spin
|
||||
// glass, by simulated bifurcation, annealing, or exact enumeration.
|
||||
// Max-Cut reports cuts; a spin glass reports energies.
|
||||
|
|
|
|||
|
|
@ -528,7 +528,7 @@ pub struct UnregisteredLabel {
|
|||
const QUANTUM_RECORD_LABEL: &str = "a receipt-kind label the wai-quantum crate seals; no revision of SPEC or of an extension registers it, so it is not a registered record";
|
||||
|
||||
/// Every [`UnregisteredLabel`]. The strings are copies of
|
||||
/// `wai_quantum::quantum_ops::CAP_QUANTUM_{MITIGATE,DECODE,COMPILE,REARRANGE,QBOM}`;
|
||||
/// `wai_quantum::quantum_ops::CAP_QUANTUM_{MITIGATE,DECODE,COMPILE,REARRANGE,QBOM,FABRIC}`;
|
||||
/// a test under the `quantum_ops` feature holds them equal.
|
||||
pub const UNREGISTERED_LABELS: &[UnregisteredLabel] = &[
|
||||
UnregisteredLabel { label: "wai.quantum.mitigate", reason: QUANTUM_RECORD_LABEL },
|
||||
|
|
@ -536,6 +536,7 @@ pub const UNREGISTERED_LABELS: &[UnregisteredLabel] = &[
|
|||
UnregisteredLabel { label: "wai.quantum.compile", reason: QUANTUM_RECORD_LABEL },
|
||||
UnregisteredLabel { label: "wai.quantum.rearrange", reason: QUANTUM_RECORD_LABEL },
|
||||
UnregisteredLabel { label: "wai.quantum.qbom", reason: QUANTUM_RECORD_LABEL },
|
||||
UnregisteredLabel { label: "wai.quantum.fabric", reason: QUANTUM_RECORD_LABEL },
|
||||
];
|
||||
|
||||
/// One registered string with every property the registry gives it.
|
||||
|
|
@ -1610,6 +1611,6 @@ mod tests {
|
|||
assert_eq!(CAP_QUANTUM_JOB, q::CAP_QUANTUM_JOB);
|
||||
let labels: Vec<&str> = UNREGISTERED_LABELS.iter().map(|l| l.label).collect();
|
||||
assert_eq!(labels, [q::CAP_QUANTUM_MITIGATE, q::CAP_QUANTUM_DECODE, q::CAP_QUANTUM_COMPILE,
|
||||
q::CAP_QUANTUM_REARRANGE, q::CAP_QUANTUM_QBOM]);
|
||||
q::CAP_QUANTUM_REARRANGE, q::CAP_QUANTUM_QBOM, q::CAP_QUANTUM_FABRIC]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ const PROFILES: &[Profile] = &[
|
|||
p("wai:quantum-decode-id", SubjectType::Receipt, false, true, false),
|
||||
p("wai:quantum-compile-id", SubjectType::Receipt, false, true, false),
|
||||
p("wai:quantum-rearrange-id", SubjectType::Receipt, false, true, false),
|
||||
p("wai:quantum-fabric-id", SubjectType::Receipt, false, true, false),
|
||||
p("wai:phasor-receipt-id", SubjectType::Receipt, false, true, false),
|
||||
p("wai:quantum-qbom-id", SubjectType::Receipt, true, true, false),
|
||||
];
|
||||
|
|
@ -297,6 +298,18 @@ impl<R: wai_quantum::quantum_energy::Labellable> EnergyFigures for wai_quantum::
|
|||
}
|
||||
}
|
||||
|
||||
/// A fabric receipt: one figure, labelled, or unmetered at zero.
|
||||
#[cfg(feature = "quantum_fabric")]
|
||||
impl EnergyFigures for wai_quantum::quantum_fabric::FabricReceipt {
|
||||
fn figure_view(&self) -> Option<FigureView> {
|
||||
if !self.verify() {
|
||||
return None;
|
||||
}
|
||||
let class = self.energy_class.as_ref().map(crate::energy_class::from_quantum_class);
|
||||
Some(FigureView::single("wai:quantum-fabric-id", self.receipt_hash(), self.joules_micro, class, self.signer_pubkey))
|
||||
}
|
||||
}
|
||||
|
||||
/// A quantum bill of materials, unlabelled: one unlabelled figure per entry.
|
||||
#[cfg(feature = "quantum_qbom")]
|
||||
impl EnergyFigures for wai_quantum::quantum_qbom::Qbom {
|
||||
|
|
|
|||
|
|
@ -233,6 +233,27 @@ fn the_quantum_ops_receipts_name_their_profiles() {
|
|||
assert_eq!(view(cal), "wai:quantum-calibration-id");
|
||||
}
|
||||
|
||||
#[cfg(feature = "quantum_fabric")]
|
||||
#[test]
|
||||
fn a_fabric_receipt_names_its_profile() {
|
||||
use wai_quantum::quantum_energy::EnergyClass;
|
||||
use wai_quantum::quantum_fabric::{detect_local, FabricReceipt};
|
||||
let member = detect_local();
|
||||
let entry = member.kernels[0].clone();
|
||||
let r = FabricReceipt::seal(&key(1), "p", [3; 32], &member, &entry, 2_500, Some(EnergyClass::ModelBased));
|
||||
let v = r.figure_view().expect("verifies");
|
||||
assert_eq!(v.profile, "wai:quantum-fabric-id");
|
||||
assert_eq!(profile_name_of_domain(b"wai:quantum-fabric-id\x01"), Some("wai:quantum-fabric-id"));
|
||||
assert_eq!((v.identity, v.figures[0].joules_micro), (r.receipt_hash(), 2_500));
|
||||
assert_eq!(v.figures[0].class, Some(crate::energy_class::from_quantum_class(&EnergyClass::ModelBased)));
|
||||
assert_eq!(v.signer, Some(r.signer_pubkey));
|
||||
let unmetered = FabricReceipt::seal(&key(1), "p", [3; 32], &member, &entry, 0, None);
|
||||
assert_eq!(unmetered.figure_view().expect("verifies").figures[0].class, None);
|
||||
let mut forged = r.clone();
|
||||
forged.joules_micro += 1;
|
||||
assert!(forged.figure_view().is_none());
|
||||
}
|
||||
|
||||
#[cfg(feature = "quantum_phasor_meter")]
|
||||
#[test]
|
||||
fn a_phasor_receipt_names_its_profile() {
|
||||
|
|
|
|||
|
|
@ -733,6 +733,9 @@ pub use wai_quantum::quantum_arch;
|
|||
#[cfg(feature = "quantum_ldpc")]
|
||||
pub use wai_quantum::quantum_ldpc;
|
||||
|
||||
#[cfg(feature = "quantum_fabric")]
|
||||
pub use wai_quantum::quantum_fabric;
|
||||
|
||||
#[cfg(feature = "quantum_qio")]
|
||||
pub use wai_quantum::quantum_qio;
|
||||
|
||||
|
|
|
|||
2
wai/wai-web/Cargo.lock
generated
2
wai/wai-web/Cargo.lock
generated
|
|
@ -755,7 +755,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "wai-quantum"
|
||||
version = "0.3.40"
|
||||
version = "0.3.41"
|
||||
dependencies = [
|
||||
"blake3",
|
||||
"ed25519-dalek",
|
||||
|
|
|
|||
Loading…
Reference in a new issue