Bloch Maze is a 2D puzzle game that combines classic maze navigation with the fundamental principles of quantum computing. The puzzle is completely open-sourced on my GitHub repository here: https://github.com/chutommy/bloch-maze

The Concept

The core idea behind Bloch Maze is to give the player an intuitive feel for how quantum states change when they pass through quantum gates. Instead of just pushing a character through a maze, the player must manipulate their character’s quantum state to match a target state at the exit.

You start at the entrance with a given state, for example, the zero state |0❭. Your goal is to reach the exit with a specific final state, like ❘+❭. To do this, you navigate the maze and pass through different cells that represent quantum gates, each altering your current state.

Game Mechanics

The gameplay revolves around the player’s quantum state and the gates that transform it.

  • Quantum States: The player’s state is one of six basic quantum states: ❘0❭, ❘1❭, ❘+❭, ❘-❭, ❘R❭, or ❘L❭.
  • Quantum Gates: Spread throughout the maze are cells corresponding to common quantum gates:
    • X, Y, Z: The Pauli gates.
    • H: The Hadamard gate.
    • S: The Phase gate.
    • 0, 1: Reset gates that force the player into the ❘0❭ or ❘1❭ state.

Each time the player moves onto a gate, their state transitions according to the rules of quantum mechanics. For example, applying an H (Hadamard) gate to the ❘0❭ state transforms it into the ❘+❭ state. If you arrive at the exit with the wrong state, you fail the level and must try again. This creates a puzzle where the path you take is just as important as reaching the destination.