The greatest—and perhaps only—foreign policy accomplishment of the Trump administration has been the development of a coherent and genuinely bipartisan policy toward Xi Jinping’s China. The administration rightly declared Beijing a strategic rival and placed Huawei, China’s multinational telecommunications giant, on the Commerce Department’s so-called “entity list” as a national-security threat. This prevents U.S. companies from doing business with Huawei.

China is a dangerous rival in artificial intelligence and machine learning....