xor_gadget

Function xor_gadget 

Source
pub fn xor_gadget<W>() -> LogicGadget<W>
where W: Clone + Default + From<i32>,
Expand description

Create an XOR gate gadget.

4-variable SpinGlass: inputs at indices 0, 1; output at 2; auxiliary at 3. Ground states correspond to valid XOR truth table entries.

J = [1, -1, -2, -1, -2, 2] for edges (0,1), (0,2), (0,3), (1,2), (1,3), (2,3) h = [-1, -1, 1, 2] (negated from Julia to account for different spin convention)