def METHOD_NAME(
    qiskit_circuit: QuantumCircuit, allow_custom_gate=True
) -> QubitCircuit:
    """
    Convert a :class:`qiskit.circuit.QuantumCircuit` object
    from ``qiskit`` to ``qutip_qip``'s :class:`.QubitCircuit`.
    Parameters
    ----------
    qiskit_circuit : :class:`qiskit.circuit.QuantumCircuit`
        The :class:`qiskit.circuit.QuantumCircuit` object
        to be converted to :class:`QubitCircuit`.
    allow_custom_gate : bool
        If False, this function will raise an error if
        gate conversion is done using a custom gate's
        unitary matrix.
    Returns
    -------
    :class:`.QubitCircuit`
        The converted circuit in qutip_qip's
        :class:`.QubitCircuit` format.
    """
    qubit_map = {}
    for qiskit_index, qubit in enumerate(qiskit_circuit.qubits):
        qubit_map[qubit] = _get_qutip_index(
            qiskit_index, total_bits=qiskit_circuit.num_qubits
        )
    clbit_map = {}
    for qiskit_index, clbit in enumerate(qiskit_circuit.clbits):
        clbit_map[clbit] = _get_qutip_index(
            qiskit_index, total_bits=qiskit_circuit.num_clbits
        )
    qutip_circuit = QubitCircuit(
        N=qiskit_circuit.num_qubits, num_cbits=qiskit_circuit.num_clbits
    )
    qutip_circuit.name = qiskit_circuit.name
    for qiskit_gate in qiskit_circuit.data:
        # qiskit_gate stores info about the gate, target
        # qubits and classical bits (for measurements)
        qiskit_instruction = qiskit_gate[0]
        qiskit_qregs = qiskit_gate[1]
        qiskit_cregs = qiskit_gate[2]
        # setting the gate argument values according
        # to the required qutip_qip format
        if not qiskit_instruction.params:
            arg_value = None
        elif len(qiskit_instruction.params) == 1:
            arg_value = qiskit_instruction.params[0]
        else:
            arg_value = qiskit_instruction.params
        # add the corresponding gate in qutip_qip
        if qiskit_instruction.name in _map_gates.keys():
            qutip_circuit.add_gate(
                _map_gates[qiskit_instruction.name],
                targets=_get_mapped_bits(qiskit_qregs, bit_map=qubit_map),
                arg_value=arg_value,
            )
        elif qiskit_instruction.name in _map_controlled_gates.keys():
            qutip_circuit.add_gate(
                _map_controlled_gates[qiskit_instruction.name],
                # The 0th bit is the control bit in qiskit by
                # convention, in case of a controlled operation
                controls=_get_mapped_bits(
                    [qiskit_qregs[0]], bit_map=qubit_map
                ),
                targets=_get_mapped_bits(qiskit_qregs[1:], bit_map=qubit_map),
                arg_value=arg_value,
            )
        elif qiskit_instruction.name == "measure":
            qutip_circuit.add_measurement(
                "measure",
                targets=_get_mapped_bits(qiskit_qregs, bit_map=qubit_map),
                classical_store=clbit_map[qiskit_cregs[0]],
            )
        elif qiskit_instruction.name in _ignore_gates:
            pass
        else:
            if not allow_custom_gate:
                raise RuntimeError(
                    f"{qiskit_instruction.name} is not a \