Quandoom: A Quantum Computing Take on the Classic DOOM

Gábor Bíró September 29, 2024
4 min read

The convergence of the video game industry and quantum computing is opening up exciting, albeit challenging, new frontiers. One of the most intriguing examples of this intersection is Quandoom, an adaptation of the iconic first-person shooter DOOM, theoretically designed to run on a quantum computer. But how feasible is such a quantum leap in game development today?

Quandoom: A Quantum Computing Take on the Classic DOOM
Source: Forrás: https://github.com/Lumorti

The Technical Hurdles of Quandoom

The Quandoom project sets ambitious goals that starkly illustrate the current limitations and immense resource requirements of fault-tolerant quantum computing:

  • Running the game natively would theoretically require a quantum computer with **72,376 logical qubits** and the execution of approximately **80 million quantum gates** per frame.
  • For comparison: the current record-holder for the highest number of physical qubits in a general-purpose gate-based quantum computer (as of late 2024) is significantly lower, often numbering in the hundreds or low thousands (e.g., Atom Computing's previously announced 1,225 qubit system). Furthermore, these are physical qubits, not the error-corrected logical qubits implied by Quandoom's requirements.

This vast gap highlights how far we currently are from having quantum hardware capable of natively running applications of such complexity.

Simulation on Classical Computers: A Workaround

Since no existing quantum computer can run Quandoom, the developer, Luke Mortimer, devised a creative workaround to demonstrate the concept:

  • He created a lightweight **QASM (Quantum Assembly Language)** simulator designed to run on conventional classical computers. QASM is a common intermediate representation for quantum circuits.
  • Remarkably, this simulator itself consists of only about 150 lines of C++ code.
  • Running the *simulation* of Quandoom on an average laptop achieves a frame rate of 10-20 frames per second.
  • Executing this simulation requires **5-6 GB of RAM**, which underscores the significant classical resources needed just to simulate the complex quantum operations involved, even for a simplified version of the game.

The game (as a simulation) can be downloaded from GitHub, and running it involves simply dragging the QASM file onto the simulator's executable.

A Unique Gameplay Experience Shaped by Constraints

Quandoom isn't merely a technical proof-of-concept; it offers a unique gameplay experience dictated by the theoretical constraints of quantum computation:

  • It utilizes **wireframe graphics**, reminiscent of vector graphics arcade shooters from the 1980s.
  • This "X-ray mode" aesthetic serves a dual purpose: it lends the game a unique look while significantly simplifying the visual computations, making them more manageable within a quantum framework.
  • The game lacks colors, music, and sound effects, further reducing computational overhead.
  • Enemies are confined to a single room.
  • The Imp enemy's characteristic fireball attack is replaced with an instant-hit weapon (like the pistol or chaingun from the original DOOM).

These substantial modifications were necessary compromises due to the limitations imposed by quantum computing principles, particularly the fundamental requirement for **quantum operations to be reversible**. Implementing complex game logic, physics, and rendering while adhering to reversibility is a major challenge.

Quandoom gameplay showing wireframe graphics
Source: https://github.com/Lumorti

Development Process and Future Prospects

Luke Mortimer, the creator of Quandoom, spent approximately a year developing the project:

  • This involved writing around 8,000 lines of C++ code to build a small 3D engine and implement the game logic using quantum register representations.
  • He employed innovative techniques necessary for quantum algorithm design, such as an **ancilla system** (using temporary qubits for intermediate calculations), a **garbage collection system** (to uncompute temporary results and maintain reversibility), and a **quantum subroutine system**.
  • Currently, only the first level (E1M1) is playable in this simulated form. However, the project's GitHub page indicates potential for future expansion and the release of the C++ source code if there is sufficient community interest.

Summary

The Quandoom project is more than just an interesting experiment blending gaming and quantum computing; it serves as a unique benchmark highlighting both the potential applications and the current practical limitations of the technology. While natively running complex games like DOOM on quantum computers remains a distant prospect, requiring significant breakthroughs in hardware scale and error correction, Quandoom creatively demonstrates the *kind* of thinking required to map classical problems onto quantum architectures.

This initiative can inspire developers and researchers to continue exploring the boundaries of quantum computation, devise novel quantum algorithms, and perhaps uncover entirely new forms of interaction and gameplay uniquely suited to the quantum realm in the future.

Gábor Bíró September 29, 2024