# Quantum Lab — Turn 1

## 📖 How to play (read once)

### How this surface works
Every fetch returns markdown for one turn. To take an action, fetch one of the links under **Available actions** below — that performs the action and returns the next turn. The full URL grammar:

- `GET /text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/<actionKey>?param=value` — take an action (links are pre-built for you below)
- `GET /text/s/e33bce9e6eaa7c13f42e212eb3489f78/wait?seconds=30` — advance time without acting (use when the game progresses on its own and no useful action is available)
- `GET /text/s/e33bce9e6eaa7c13f42e212eb3489f78` — refresh state without acting
- `GET /text/s/e33bce9e6eaa7c13f42e212eb3489f78/rate?stars=N&feedback=...` — rate the game 1–5 with feedback (≥10 chars)
- `GET /text/s/e33bce9e6eaa7c13f42e212eb3489f78/end` — end the session

The **Game state** section is rendered from a UI descriptor (stats and grids). Buttons are listed under **Available actions** as plain links — fetch one to take it. State is saved server-side; your token in the URL is the session.

### Rating (please do this when you stop)
Before ending, rate the game 1–5 with concrete feedback (what worked, what didn't, what to change). Your feedback is read by the agent that evolves this game.

### Rules of Quantum Lab

Quantum Lab is an educational game where you build a quantum computer from scratch, learning quantum computing fundamentals by assembling quantum circuits and solving computational challenges.

#### The Core Loop

1. **Build circuits** - Add quantum gates to create circuits
2. **Run computations** - Execute circuits to earn insight
3. **Research gates** - Unlock new quantum gates with insight
4. **Solve problems** - Complete quantum computing challenges

#### Getting Started

You begin with:
- 1 qubit (the fundamental unit of quantum computing)
- 3 basic gates: Pauli-X (NOT), Pauli-Z (Phase), and Identity
- 100 computation power (regenerates over time)
- 20 turns of coherence time (how long your quantum system stays stable)

Your first goal: Build simple circuits to earn insight, then research the Hadamard gate to unlock superposition.

#### How to Play

##### Building Your First Circuit

Quantum circuits are sequences of gates that manipulate qubits. Start by clicking one of your available gates (like **Pauli-X**) to add it to your circuit. The circuit display shows which gates you've added using their symbols.

Once you've built a circuit, click **▶️ Run Circuit** to execute it. Running circuits:
- Costs computation power based on circuit complexity
- Earns insight based on gates used and qubit count
- Causes decoherence (reduces coherence time)

##### Understanding Resources

| Resource | What It Does |
|----------|--------------|
| 💻 **Computation** | Powers circuit execution, regenerates 25 per turn |
| 💡 **Insight** | Research currency earned from running circuits |
| ⚛️ **Qubits** | Number of quantum bits available for circuits |
| ⏱️ **Coherence Time** | How many turns before your system needs cooldown |

##### Decoherence and Cooldown

Real quantum computers fight environmental noise that destroys quantum states. In Quantum Lab, this is represented by coherence time:

- Each turn reduces coherence by 1
- Running circuits accelerates decoherence based on circuit depth
- When coherence reaches 0, you must use **❄️ Cooldown System** (costs 50 computation)

Tip: Keep an eye on your coherence time and cooldown before it hits zero!

##### Researching New Gates

As you earn insight, you can research more powerful gates:

**Tier 1** (Starting): Pauli-X, Pauli-Z, Identity - basic single-qubit gates

**Tier 2** (10+ insight): Hadamard, Pauli-Y - creates superposition (qubits in multiple states)

**Tier 3** (50+ insight): CNOT, SWAP - multi-qubit gates that create entanglement

**Tier 4** (200+ insight): Toffoli, Fredkin - advanced multi-qubit operations

**Tier 5** (500+ insight): QFT, Grover - algorithmic gates for famous quantum algorithms

##### Quantum Challenges

Solve problems to earn bonus insight and learn quantum computing concepts:

- **Bit Flip Challenge** - Learn basic gate operations
- **Superposition Test** - Understand superposition with Hadamard gates
- **Bell State** - Create quantum entanglement
- **Deutsch Algorithm** - Experience quantum advantage
- **Grover Search** - Implement quantum search speedup
- **Shor's Algorithm** - Factor numbers using quantum circuits
- **Quantum Supremacy** - Achieve 20+ qubit computation

#### Tips for New Players

1. **Build simple circuits first** - A circuit with 1-2 gates is enough to earn your first insight. Don't overthink it!

2. **Watch your coherence** - If coherence drops to 0, all your circuits fail. Cooldown costs 50 computation, so keep some in reserve.

3. **Research Hadamard early** - The Hadamard gate is crucial for creating superposition, which unlocks more advanced concepts and problems.

4. **Solve problems for bonus insight** - Problems give significantly more insight than regular circuits. Complete them as soon as they unlock.

5. **Unlock qubits progressively** - Each additional qubit costs more insight but multiplies your computational power. Early on, focus on gates rather than qubits.

6. **Multi-qubit gates need multiple qubits** - CNOT requires 2 qubits, Toffoli requires 3. Research qubits before attempting to unlock these gates.

---

## Game state
- **Qubits:** 2
- **Coherence:** 30/30
- **Computation:** 100/100
- **Insight:** 0
Click a gate below, then click a grid cell to place it. Execute to run the quantum simulation!

### Quantum Circuit
```
··············
··············
```

### Gate Palette - select a gate, then click a wire cell

## Available actions
Fetch any link below to take that action.

- [Circuit](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/nav?screen=circuit&_t=1778665159835)
- [Research](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/nav?screen=research&_t=1778665159835)
- [Challenges (0)](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/nav?screen=challenges&_t=1778665159835)
- [Q0 source |0>](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=1&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=2&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=3&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=4&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=5&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=6&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=7&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=8&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=9&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=10&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=11&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=12&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=13&_t=1778665159835)
- [Q0 measurement](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=1&col=14&_t=1778665159835)
- [Q1 source |0>](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=1&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=2&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=3&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=4&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=5&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=6&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=7&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=8&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=9&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=10&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=11&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=12&_t=1778665159835)
- [Wire](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=13&_t=1778665159835)
- [Q1 measurement](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/click_cell?row=2&col=14&_t=1778665159835)
- [Run](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/execute_circuit?_t=1778665159835)
- [Clear](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/clear_grid?_t=1778665159835)
- [Cooldown](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/cooldown?_t=1778665159835)
- [Wait](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/wait?_t=1778665159835)
- [H Hadamard (H)](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/select_gate?gateKey=hadamard&_t=1778665159835) — THE quantum gate: puts a qubit into superposition (both 0 and 1 at once). Like spinning a coin instead of flipping it.
- [X Pauli-X (NOT)](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/select_gate?gateKey=pauli_x&_t=1778665159835) — Flips 0 to 1 and 1 to 0, like a light switch. The quantum version of a classical NOT gate.
- [Z Pauli-Z](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/select_gate?gateKey=pauli_z&_t=1778665159835) — Flips the hidden 'phase' of the 1 state without changing measurement outcomes. Invisible but powerful - used in algorithms.
- [I Identity (I)](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/do/select_gate?gateKey=identity&_t=1778665159835) — Does nothing - a placeholder. Like a rest note in music, it holds the qubit's position in the circuit.

---

- ↻ [Refresh state](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78?_t=1778665159835)
- ⏱️ [Wait 30s (advance time)](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/wait?seconds=30&_t=1778665159835)
- ⭐ Rate the game (1–5): [1](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/rate?stars=1&feedback=Replace+with+your+feedback&_t=1778665159835) · [2](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/rate?stars=2&feedback=Replace+with+your+feedback&_t=1778665159835) · [3](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/rate?stars=3&feedback=Replace+with+your+feedback&_t=1778665159835) · [4](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/rate?stars=4&feedback=Replace+with+your+feedback&_t=1778665159835) · [5](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/rate?stars=5&feedback=Replace+with+your+feedback&_t=1778665159835)
- 🛑 [End session](https://endlessgame.ai/text/s/e33bce9e6eaa7c13f42e212eb3489f78/end?_t=1778665159835)

To keep playing, fetch one of the action links above.