Key insights
- Quandoom tries to escape
Doom
on quantum hardware, but the performance requirements are too high. - It's a complex coding challenge that requires 8,000 lines of C++, quantum subroutines, and parallelization.
- Quandoom simplified
Doom
Limit graphics and gameplay to the bare essentials.
Doom has long held a unique place in tech culture. Since its release in 1993, the first-person shooter has been the focus of countless hardware experiments. From running on a WiFi-enabled toothbrush to running on 100 pounds of moldy potatoes, enterprising programmers have pushed the game to its limits. But what about running? Doom on a quantum computer?
Enter Quandoom, a bold project from GitHub user Lumorti that's taking time Doom taking it to a whole new level by trying to run it on quantum computing hardware.
Doom meets quantum computing
Although quantum computing is still very experimental and in its infancy, it holds enormous potential for computing power. But it's not ready for Doom – or any other game, for that matter. While Lumorti, who works as a quantum computing researcher at the Institute of Photonic Sciences (ICFO) in Barcelona, developed Quandoom, a version of Doom's first level adapted for quantum hardware. The catch? There is no quantum computer powerful enough to run the game in its current form.
Quandoom requires a whopping 72,376 qubits and 80 million quantum gates to operate. For reference, Atom Computing's current most advanced quantum computer only supports 1,225 qubits. That's a far cry from the 70,000+ qubits required for Quandoom, making this experiment firmly rooted in the theoretical realm.
However, thanks to QASM, a quantum assembly simulator, it is possible to simulate the game on classical computers. This will allow regular users to run Quandoom on a laptop – albeit at 10 to 20 frames per second and without many of the modern gaming amenities we're used to, like music or enemies moving between rooms.
What it takes to port Doom to the quantum
A look at the technical requirements for Quandoom shows: This is not a standard port. According to Lumorti's GitHub page, creating Quandoom was a huge programming challenge. The game was written in 8,000 lines of C++ and includes quantum subroutines for rendering the game, handling player movement, and interacting with game objects. To give an idea of how complex this is, Lumorti shared some features of the code:
“At the moment I'm still cleaning up the engine code, but basically I have about 8,000 lines of C++ functions that enable a number of reversible binary and arithmetic operations on quantum registers, for example 'flipIfLessThanOrEqualTo', which flips all the qubits in a register when the value of another register is less than a certain value.
There is also a parallelization system that splits the rendering process across multiple cores. Even if the game is just a wireframe version of DoomOn the first level, it's notable that quantum computing's parallelization capabilities – which allow it to process multiple possibilities simultaneously – could one day be used for gaming.
Challenges and simplifications in “quantum demise”
It's important to remember that Quandoom is far from that Doom Experience that most gamers know and love. The graphics are simplified to simple wireframes and many features of the original game have been omitted or significantly changed. As Lumorti himself puts it, there is no music or sounds, enemies don't move between rooms, and the iconic goblin fireball now behaves like a hitscan instead of a projectile.
Still, the idea behind Quandoom isn't necessarily to reproduce that Doom experience, but to explore what is possible on quantum hardware. As Lumorti noted:
“Everything is done with whole numbers. With functions like that, I then wrote a small 3D engine as well as the entire game logic.”
This means that while Quandoom doesn't offer the same gameplay depth as the original, it does show the potential for quantum computing in areas outside of its typical research applications, such as gaming.
A quantum future for gaming?
While we're still a long way from full-fledged games on quantum hardware, projects like Quandoom show that we're starting to think about the possibilities. Currently, Doom Running with a toothbrush or a conference badge is still far more practical, but the day may come when quantum games become a reality. Until then, we'll have to make do with QASM simulators and simplified graphics.