Skip to main content

certify_gate

Function certify_gate 

Source
pub fn certify_gate(n: u32, table: &[usize]) -> GateCert
Expand description

Certify an n-bit functional unit from its truth table (table[input] = output, each a state index 0..2ⁿ). Reversible iff the table is a permutation; returns the inverse gate, or the first erasing collision that proves it is not.