def METHOD_NAME(
    self, num_state_qubits: int, adder: QuantumCircuit, inplace: bool, kind: str
):
    """Assert that adder correctly implements the summation.
    This test prepares a equal superposition state in both input registers, then performs
    the addition on the superposition and checks that the output state is the expected
    superposition of all possible additions.
    Args:
        num_state_qubits: The number of bits in the numbers that are added.
        adder: The circuit performing the addition of two numbers with ``num_state_qubits``
            bits.
        inplace: If True, compare against an inplace addition where the result is written into
            the second register plus carry qubit. If False, assume that the result is written
            into a third register of appropriate size.
        kind: TODO
    """
    circuit = QuantumCircuit(*adder.qregs)
    # create equal superposition
    if kind == "full":
        num_superpos_qubits = 2 * num_state_qubits + 1
    else:
        num_superpos_qubits = 2 * num_state_qubits
    circuit.h(range(num_superpos_qubits))
    # apply adder circuit
    circuit.compose(adder, inplace=True)
    # obtain the statevector and the probabilities, we don't trace out the ancilla qubits
    # as we verify that all ancilla qubits have been uncomputed to state 0 again
    statevector = Statevector(circuit)
    probabilities = statevector.probabilities()
    pad = "0" * circuit.num_ancillas  # state of the ancillas
    # compute the expected results
    expectations = np.zeros_like(probabilities)
    num_bits_sum = num_state_qubits + 1
    # iterate over all possible inputs
    for x in range(2**num_state_qubits):
        for y in range(2**num_state_qubits):
            # compute the sum
            if kind == "full":
                additions = [x + y, 1 + x + y]
            elif kind == "half":
                additions = [x + y]
            else:
                additions = [(x + y) % (2**num_state_qubits)]
            # compute correct index in statevector
            bin_x = bin(x)[2:].zfill(num_state_qubits)
            bin_y = bin(y)[2:].zfill(num_state_qubits)
            for i, addition in enumerate(additions):
                bin_res = bin(addition)[2:].zfill(num_bits_sum)
                if kind == "full":
                    cin = str(i)
                    bin_index = (
                        pad + bin_res + bin_x + cin
                        if inplace
                        else pad + bin_res + bin_y + bin_x + cin
                    )
                else:
                    bin_index = (
                        pad + bin_res + bin_x if inplace else pad + bin_res + bin_y + bin_x
                    )
                index = int(bin_index, 2)
                expectations[index] += 1 / 2**num_superpos_qubits
    np.testing.assert_array_almost_equal(expectations, probabilities)