def METHOD_NAME():
    dev = square_virtual_device(control_r=1.0, num_qubits=2)
    with pytest.raises(ValueError, match="Qubit not part of the device."):
        dev.distance(TwoDQubit(0, 0), TwoDQubit(2, 2))
    assert np.isclose(dev.distance(TwoDQubit(0, 0), TwoDQubit(1, 0)), 1.0)
    dev = PasqalVirtualDevice(control_radius=1.0, qubits=[cirq.LineQubit(0), cirq.LineQubit(1)])
    assert np.isclose(dev.distance(cirq.LineQubit(0), cirq.LineQubit(1)), 1.0)
    dev = PasqalVirtualDevice(
        control_radius=1.0, qubits=[cirq.GridQubit(0, 0), cirq.GridQubit(1, 0)]
    )
    assert np.isclose(dev.distance(cirq.GridQubit(0, 0), cirq.GridQubit(1, 0)), 1.0)