def _ccx_v_chain_uncompute(qc, control_qubits, ancillary_qubits):
    """
    Second half (uncompute) of the multi-control basic mode. It progressively compute the
    ccx of the control qubits and put the final result in the last ancillary
    qubit
    Args:
        qc (QuantumCircuit): the Quantum Circuit
        control_qubits (list): the list of control qubits
        ancillary_qubits (list): the list of ancillary qubits
    """
    anci_idx = len(ancillary_qubits) - 1
    for idx in range(2, len(control_qubits))[::-1]:
        qc.ccx(control_qubits[idx], ancillary_qubits[anci_idx - 1],
            ancillary_qubits[anci_idx])
        anci_idx -= 1
    qc.ccx(control_qubits[0], control_qubits[1], ancillary_qubits[anci_idx])
