mqt.bench.benchmarks.half_adder

Half Adder.

Module Contents

create_circuit(num_qubits: int) QuantumCircuit[source]

Create a half adder circuit.

Parameters:

num_qubits – Number of qubits of the returned quantum circuit. Must be odd and ≥ 3 so that there is a carry-out bit and the rest can be divided by 2 for both registers.

Returns:

QuantumCircuit – The constructed half adder circuit.