Just to add that you also have to balance "risk and cost of not achieving anything" against "potential benefits and possible spin offs"
strong AI, cure to cancer, fusion are strong categories in the latter column, while driverless and flying cars are more in the former camp (although crack AI, and you have driverless cards anyway).
Quantum computing is in the latter camp. Yes we may not achieve the final goal, but in doing so we gain a greater understanding of the quantum world. However if it is managed on a commercial scale, the benefits extend way beyond encryption. remember that most of the progress in the last 30 years has been due to increase in computing power, a curve which using present technologies may well have to stop