China made a risky choice revealing ambitions to dominate the tech world, Condoleezza Rice told CNBC on Wednesday.

"The Chinese, I think, made a bit of a mistake when they went out and said we're going to surpass the U.S. in quantum computing and AI [artificial intelligence] by 2030," said Rice, who was secretary of State and national security adviser under former President George W. Bush.

"I told some of my Chinese friends that it was a big mistake" because the U.S. and other nations were already nervous about how China might use technology for spying, she told CNBC's Becky Quick on "Squawk Box" from the KPMG Women's Leadership Summit in Minnesota.

Chinese smartphone and networking giant Huawei finds itself at the center of Trump administration concerns about how closely companies are tied to the government. Huawei has maintained that it is independent.

Shortly after President Donald Trump on May 15 declared a national emergency over threats against American technology, the Commerce Department, effectively, blacklisted Huawei from conducting business with U.S. companies. About a week later, the agency put a 90-day hold on the move.

"I think any Chinese company is going to do what the Chinese government tells them to do," said Rice, former Stanford provost and now a professor at the university's graduate school of business. Whether in surveillance, so-called social credit, or promoting national interests, Rice said she thinks "it's very clear that China is going to use these tools in ways that, I think, would make us all uncomfortable."

As Washington and Beijing head into trade negotiations at next week's G-20 summit in Japan, Rice said she's hoping the countries can negotiate a deal on intellectual property protections and market access to end the punitive tariffs they have levied on each other.

On Tuesday, Trump announced plans to sit down with Chinese President Xi Jinping for an "extended meeting" at the summit where the two leaders are expected to discuss their ongoing trade war and technology disputes. Shortly after Trump's tweet, Chinese state media said Xi hopes to talk about the fair treatment of Chinese companies by the U.S., in perhaps a reference to the Huawei ban.