The growth of cities and the resulting increase in vehicular traffic poses significant challenges to the environment and citizens' Quality of Life. To address these challenges, a new algorithm has been proposed that leverages the Quantum Annealing paradigm and D-Wave's machines to optimize the control of traffic lights in cities. The algorithm considers traffic information collected from a wide urban road network to define activation patterns that holistically reduce congestion. An in-depth analysis of the model's behaviour has been conducted by varying its main parameters. Robustness tests have been performed on different traffic scenarios, and a thorough discussion on how to configure D-Wave's quantum annealers for optimal performance is presented. Comparative tests show that the proposed model outperforms traditional control techniques in several traffic conditions, effectively containing critical congestion situations, reducing their presence, and preventing their formation. The results obtained put in evidence the state-of-the-art of these quantum machines, their actual capabilities in addressing the problem, and opportunities for future applications.