The U.S. and China will likely reach a trade deal within the next six months — but that won't end tensions between the world's two largest economies, according to a political risk consultant.

Tensions between Washington and Beijing have increasingly turned toward technology in recent weeks. The U.S. placed Huawei on a blacklist that restricts American firms from doing business with the Chinese tech giant earlier this month, while China is said to be considering limiting rare earth exports to America — which are materials critical in the production of things like iPhones and electric vehicles.

"The technology war is not going to end," Alastair Newton, director of Alavan Business Advisory and a former British diplomat, told CNBC's "Squawk Box" on Wednesday. "Technology is where this battle is going to be fought out, even if we do get a trade deal on bilateral goods."

Newton said he wouldn't be surprised if U.S. President Donald Trump and Chinese President Xi Jinping, who will be meeting at the G-20 summit in Japan at the end of June, "shake hands on an outlined deal" that could be finalized by October.

Another analyst also predicted that trade talks might resume at the G-20 meeting in June, but she was less optimistic about a deal.

"I would be looking at the G-20 as a natural venue for the presidents to agree to resume negotiations, and maybe walk back tensions a little bit, but not as a place for an actual agreement," J.P. Morgan's Global Market Strategist, Hannah Anderson, told CNBC on Wednesday.

Whether there will be a deal or not, tensions on the trade front might not go away. Newton predicted that Trump could turn his attention to Europe and take the tariff fight there.

— CNBC's Weizhen Tan contributed to this report.