Struct EquivalenceCheckResult
pub struct EquivalenceCheckResult {Show 20 fields
pub qubit_num: usize,
pub gate_num1: usize,
pub gate_num2: usize,
pub method: VerificationMethod,
pub strategy: VerificationStrategy,
pub status: EquivalenceStatus,
pub verification_time: f64,
pub pathsum_time: f64,
pub to_dimacs_time: Option<f64>,
pub tool_time: Option<f64>,
pub wmc_time: Option<f64>,
pub tool_name: String,
pub wmc_printed_verdict: Option<&'static str>,
pub wmc_precision_reason: Option<&'static str>,
pub wmc_print_resolution_distance: Option<f64>,
pub approximate_distance_tolerance: Option<f64>,
pub rr_approximate: bool,
pub solver_invoked: bool,
pub final_ps: PathSum,
pub stage_ledger: Option<ExclusiveLedger>,
}Expand description
Native Rust result with a typed EquivalenceStatus verdict.
This structure exposes the same concepts as Python’s
EquivalenceCheckResult, not an identical Python dataclass layout.
Rust stores status: EquivalenceStatus; Self::equivalent returns the
Python-compatible string spelling. Rust’s Self::final_pathsum
returns a borrowed symbolic residual and Self::gate_num is a
read-only accessor for the first circuit count, whereas Python uses
attributes equivalent, final_pathsum, and gate_num.
Self::wmc_solver_invoked distinguishes a real external WMC process
from an analytic shortcut; numerical solver output is not an exact
equality certificate. Error or inconclusive outcomes must not be
interpreted as circuit non-equivalence.
Fields§
§qubit_num: usize§gate_num1: usize§gate_num2: usize§method: VerificationMethod§strategy: VerificationStrategy§status: EquivalenceStatus§verification_time: f64§pathsum_time: f64§to_dimacs_time: Option<f64>§tool_time: Option<f64>§wmc_time: Option<f64>§tool_name: String§wmc_printed_verdict: Option<&'static str>Distinguish printed solver evidence from end-to-end certified bounds.
wmc_precision_reason: Option<&'static str>§wmc_print_resolution_distance: Option<f64>Estimated projective-distance print granularity at this Ganak count; Some only when the requested distance is below the observed granularity. This is not an upper bound on the solver’s arithmetic error.
approximate_distance_tolerance: Option<f64>Requested projective-distance threshold for WMC verification.
rr_approximate: boolRR-only/HYBRID used an analytic upper bound for a nonzero residual phase. This is a tolerance-bounded approximate result, NOT exact source identity.
solver_invoked: boolTrue only when an external weighted counter was invoked.
final_ps: PathSum§stage_ledger: Option<ExclusiveLedger>Present only when QUPRS_STAGE_LEDGER=1, never populated in ordinary runs.
Implementations§
§impl EquivalenceCheckResult
impl EquivalenceCheckResult
pub fn equivalent(&self) -> &'static str
pub fn equivalent(&self) -> &'static str
Python-compatible verdict name; the typed status stays authoritative.
pub fn wmc_solver_invoked(&self) -> bool
pub fn wmc_solver_invoked(&self) -> bool
Actual external WMC solver process invocation, not analytic shortcuts.
pub fn final_pathsum(&self) -> &PathSum
pub fn final_pathsum(&self) -> &PathSum
Borrow the final symbolic PathSum without cloning it.