def METHOD_NAME(self):
    """Test that if vf2postlayout runs that we've updated the final layout."""
    qubits = 3
    qc = QuantumCircuit(qubits)
    for i in range(5):
        qc.cx(i % qubits, int(i + qubits / 2) % qubits)
    initial_pm = PassManager([SetLayout([1, 3, 4])])
    cmap = FakeVigoV2().coupling_map
    initial_pm += common.generate_embed_passmanager(cmap)
    first_layout_circ = initial_pm.run(qc)
    out_pass = ApplyLayout()
    out_pass.property_set["layout"] = first_layout_circ.layout.initial_layout
    out_pass.property_set[
        "original_qubit_indices"
    ] = first_layout_circ.layout.input_qubit_mapping
    out_pass.property_set["final_layout"] = Layout(
        {
            first_layout_circ.qubits[0]: 0,
            first_layout_circ.qubits[1]: 3,
            first_layout_circ.qubits[2]: 2,
            first_layout_circ.qubits[3]: 4,
            first_layout_circ.qubits[4]: 1,
        }
    )
    # Set a post layout like vf2postlayout would:
    out_pass.property_set["post_layout"] = Layout(
        {
            first_layout_circ.qubits[0]: 0,
            first_layout_circ.qubits[2]: 4,
            first_layout_circ.qubits[1]: 2,
            first_layout_circ.qubits[3]: 1,
            first_layout_circ.qubits[4]: 3,
        }
    )
    out_pass(first_layout_circ)
    self.assertEqual(
        out_pass.property_set["final_layout"],
        Layout(
            {
                first_layout_circ.qubits[0]: 0,
                first_layout_circ.qubits[2]: 1,
                first_layout_circ.qubits[4]: 4,
                first_layout_circ.qubits[1]: 3,
                first_layout_circ.qubits[3]: 2,
            }
        ),
    )