dimod.generators.fulladder_gate

fulladder_gate(in0: Hashable, in1: Hashable, in2: Hashable, sum_: Hashable, carry: Hashable, *, strength: float = 1.0) dimod.binary.binary_quadratic_model.BinaryQuadraticModel[source]

Return a binary quadratic model with ground states corresponding to a full adder gate.

Parameters
  • in0 – The variable label for one of the inputs.

  • in1 – The variable label for one of the inputs.

  • in2 – The variable label for one of the inputs

  • sum – The variable label for the sum output.

  • carry – The variable label for the carry output.

  • strength – The energy of the lowest-energy infeasible state.

Returns

A binary quadratic model with ground states corresponding to a full adder gate. The model has five variables and ten interactions.