qiskit/mapper/_mapping.py
def return_last_measurements(dag_circuit, removed_meas, final_layout):
    """Returns the measurements to a quantum circuit, removed by
    `remove_last_measurements` after the swap mapper is finished.

    This operation is done in-place on the input DAG circuit.

    Parameters:
        dag_circuit (qiskit.dagcircuit._dagcircuit.DAGCircuit): DAG circuit.
        removed_meas (list): List of measurements previously removed.
        final_layout (dict): Qubit layout after swap mapping.
    """
    if any(removed_meas) and 'measure' not in dag_circuit.basis.keys():
        dag_circuit.add_basis_element("measure", 1, 1, 0)
    for meas in removed_meas:
        new_q_label = final_layout[meas['qargs'][0]]
        dag_circuit.apply_operation_back(name='measure', qargs=[new_q_label],
                                         cargs=meas['cargs'])
Returns the measurements to a quantum circuit, removed by
    `remove_last_measurements` after the swap mapper is finished.

    This operation is done in-place on the input DAG circuit.

    Parameters:
        dag_circuit (qiskit.dagcircuit._dagcircuit.DAGCircuit): DAG circuit.
        removed_meas (list): List of measurements previously removed.
        final_layout (dict): Qubit layout after swap mapping.
    
Returns the measurements to a quantum circuit, removed by
`remove_last_measurements` after the swap mapper is finished.

This operation is done in-place on the input DAG circuit.
Returns the measurements to a quantum circuit removed by ` remove_last_measurements ` after the swap mapper is finished . This operation is done in - place on the input DAG circuit .
def return_last_measurements(dag_circuit, removed_meas, final_layout):
    if any(removed_meas) and 'measure' not in dag_circuit.basis.keys():
        dag_circuit.add_basis_element("measure", 1, 1, 0)
    for meas in removed_meas:
        new_q_label = final_layout[meas['qargs'][0]]
        dag_circuit.apply_operation_back(name='measure', qargs=[new_q_label],
                                         cargs=meas['cargs'])
def return_last_measurements ( dag_circuit , removed_meas , final_layout ) : if any ( removed_meas ) and 'measure' not in dag_circuit . basis . keys ( ) : dag_circuit . add_basis_element ( "measure" , 1 , 1 , 0 ) for meas in removed_meas : new_q_label = final_layout [ meas [ 'qargs' ] [ 0 ] ] dag_circuit . apply_operation_back ( name = 'measure' , qargs = [ new_q_label ] , cargs = meas [ 'cargs' ] )
Returns the measurements to a quantum circuit, removed by
`remove_last_measurements` after the swap mapper is finished.
Returns the measurements to a quantum circuit removed by ` remove_last_measurements ` after the swap mapper is finished .
"""Returns the measurements to a quantum circuit, removed by
    `remove_last_measurements` after the swap mapper is finished.

    This operation is done in-place on the input DAG circuit.

    Parameters:
        dag_circuit (qiskit.dagcircuit._dagcircuit.DAGCircuit): DAG circuit.
        removed_meas (list): List of measurements previously removed.
        final_layout (dict): Qubit layout after swap mapping.
    """
dag_circuit
None
removed_meas
List of measurements previously removed.
List of measurements previously removed .
final_layout
Qubit layout after swap mapping.
Qubit layout after swap mapping .