def METHOD_NAME(self):
    """Test if a virtual circuit with one swap gate is transformed into
    a circuit with physical qubits.
    [Circuit with virtual qubits]
      v0:--X---.---M(v0->c0)
           |   |
      v1:--X---|---M(v1->c1)
               |
      v2:-----(+)--M(v2->c2)
     Initial layout: {v[0]: 2, v[1]: 1, v[2]: 0}
    [Circuit with physical qubits]
      q2:--X---.---M(q2->c0)
           |   |
      q1:--X---|---M(q1->c1)
               |
      q0:-----(+)--M(q0->c2)
    """
    v = QuantumRegister(3, "v")
    cr = ClassicalRegister(3, "c")
    circuit = QuantumCircuit(v, cr)
    circuit.swap(v[0], v[1])
    circuit.cx(v[0], v[2])
    circuit.measure(v[0], cr[0])
    circuit.measure(v[1], cr[1])
    circuit.measure(v[2], cr[2])
    q = QuantumRegister(3, "q")
    expected = QuantumCircuit(q, cr)
    expected.swap(q[2], q[1])
    expected.cx(q[2], q[0])
    expected.measure(q[2], cr[0])
    expected.measure(q[1], cr[1])
    expected.measure(q[0], cr[2])
    dag = circuit_to_dag(circuit)
    pass_ = ApplyLayout()
    pass_.property_set["layout"] = Layout({v[0]: 2, v[1]: 1, v[2]: 0})
    after = pass_.run(dag)
    self.assertEqual(circuit_to_dag(expected), after)