Volkswagen AG plans to test a quantum-computer-powered navigation app in Lisbon next week, part of a larger plan to include such a feature in its vehicles within the next few years.

The Germany-based company, the world’s biggest auto maker by sales, has been working to commercialize this technology for about three years.

The Lisbon test is timed to coincide with the city’s Web Summit technology conference. Nine public buses ferrying riders between the conference and other parts of the city will be equipped with iPads loaded with the “quantum routing” application, which includes technology from British Columbia-based D-Wave Systems Inc.

The app uses cloud-based quantum-computing services to calculate the fastest route for each of those nine buses in near real-time. The goal is to help prevent traffic jams and cut down travel time, said Martin Hofmann, Volkswagen’s chief information officer.

The Volkswagen app is different from traditional driving navigation apps, which show vehicles which routes are less congested, giving the same information to all vehicles in a given area. The VW app spells out an individualized route for each participating bus.

“We’ll change the way traffic moves, which is a milestone for us,” said Dr. Hofmann, who oversees information technology for Volkswagen’s 12 brands, including Audi, Porsche and Bentley.

Volkswagen's Lisbon test is timed to coincide with the city's Web Summit technology conference. Photo: Volkswagen

Volkswagen expects to roll out the quantum-routing feature in mid-2020 to public-transportation partners in a high-density city, perhaps in Lisbon, Dr. Hofmann said.

Quantum computers are still years away from large-scale commercial applications due to hardware challenges, experts say. But experimentation continues. Researchers at Alphabet Inc.’s Google last week announced they built a machine capable of generating about 1 million random strings of numbers in roughly three minutes, a task that they said would have taken the world’s fastest conventional supercomputer 10,000 years.

Whether such power is truly needed for routing traffic is up for debate, said Dan Garrison, master technology architect at Accenture PLC’s quantum consulting practice. Volkswagen’s pilot project shows that companies are getting better at understanding what can be done with a quantum computer, he said.

Vern Brownell, chief executive of D-Wave Systems, said a quantum-routing application has the potential to solve business problems, including far more complex traffic-optimization problems that are beyond the scope of today’s supercomputers.

An earlier collaboration between Volkswagen and D-Wave involved a simulation three years ago that created specific routes for 10,000 taxis traveling between downtown Beijing and the nearest airport, about 20 miles away, in the fastest time possible without creating a traffic jam.

The Lisbon test, although happening on real streets, will be on a far smaller scale.

Buses in the Lisbon pilot will cover 26 stops, transporting thousands of riders in four directions from the conference center. One bus line, for example, will cover several stations between the conference center and Marquês de Pombal.

A predictive-analytics tool running on a classical computer will identify 45 minutes ahead of time which of the 26 stops is expected to have especially high passenger numbers. To solve that calculation, the German auto maker uses anonymized data from cellphone users that includes GPS positions, date, time and movement.

The quantum computer will calculate in milliseconds the fastest route for each individual bus, taking into account millions of real-time data points about traffic congestion and ridership demand. Each bus will be assigned an individual route every two minutes so they don’t slow down traffic.

The same calculation would take dozens of minutes on a classical computer, Dr. Hofmann said.

“What’s exciting about this work is that it’s being applied in the real world,” said Scott Pakin, a computer scientist at Los Alamos National Laboratory.

Other auto makers including Ford Motor Co. are experimenting with how quantum computing could quickly optimize driving routes and improve the structure of batteries for electric vehicles.

By 2023, 20% of organizations, including businesses and governments, are expected to budget for quantum-computing projects, up from less than 1% in 2018, according to technology research and advisory firm Gartner Inc.

Write to Sara Castellanos at sara.castellanos@wsj.com