mqt.bench.benchmarks.cdkm_ripple_carry_adder

CDKM Ripple-Carry Adder.

Module Contents

create_circuit(num_qubits: int, kind: str = 'full') QuantumCircuit[source]

Create a CDKM ripple-carry adder circuit.

Parameters:
  • num_qubits – Number of qubits of the returned quantum circuit. Must be even and ≥ 4 for full and half adders, and odd and ≥ 3 for fixed adders.

  • kind – The kind of adder, can be "full" for a full adder, "half" for a half adder, or "fixed" for a fixed-sized adder. A full adder includes both carry-in and carry-out, a half ader only carry-out, but an additional helper qubit, and a fixed-sized adder neither carry-in or carry-out, but also has an additional helper qubit.

Returns:

QuantumCircuit – The constructed CDKM ripple-carry adder circuit.