def METHOD_NAME():
    a, b = cirq.LineQubit.range(2)
    with pytest.raises(ValueError, match='single qubit'):
        _ = cirq.X.on(a, b)
    x = cirq.X(a)
    with pytest.raises(ValueError, match=r'len\(new_qubits\)'):
        _ = x.with_qubits(a, b)