Table of Contents
Fetching ...

Quantum Wave Function Collapse for Procedural Content Generation

Raoul Heese

TL;DR

This work proposes a quantum version of the famous (classical) wave function collapse algorithm based on the idea that a quantum circuit can be prepared in such a way that it acts as a special-purpose random generator for content of a desired form.

Abstract

Quantum computers exhibit an inherent randomness, so it seems natural to consider them for procedural content generation. In this work, a quantum version of the famous (classical) wave function collapse algorithm is proposed. This quantum wave function collapse algorithm is based on the idea that a quantum circuit can be prepared in such a way that it acts as a special-purpose random generator for content of a desired form. The proposed method is presented theoretically and investigated experimentally on simulators and IBM Quantum devices.

Quantum Wave Function Collapse for Procedural Content Generation

TL;DR

This work proposes a quantum version of the famous (classical) wave function collapse algorithm based on the idea that a quantum circuit can be prepared in such a way that it acts as a special-purpose random generator for content of a desired form.

Abstract

Quantum computers exhibit an inherent randomness, so it seems natural to consider them for procedural content generation. In this work, a quantum version of the famous (classical) wave function collapse algorithm is proposed. This quantum wave function collapse algorithm is based on the idea that a quantum circuit can be prepared in such a way that it acts as a special-purpose random generator for content of a desired form. The proposed method is presented theoretically and investigated experimentally on simulators and IBM Quantum devices.
Paper Structure (28 sections, 13 equations, 11 figures)

This paper contains 28 sections, 13 equations, 11 figures.

Figures (11)

  • Figure 1: Exemplary nearest neighbor adjacency configuration for on a two-dimensional grid consisting of $N=9$ segments. The adjacency relationship for each of the four directions right ($d=1$), up ($d=2$), left ($d=3$), and down ($d=4$) can be represented as a directed graph with adjacency matrix $\alpha^d$.
  • Figure 2: Visualization of pattern-based rules. (a) Visualization scheme. The center tile corresponds to the target segment $i$ with a target value of $v$, whereas the adjacent tiles represent the required values $v_1,\dots,v_4 \in \{1,2\}$ of the four adjacent segments in the respective directions $d=1,\dots,d=4$. (b) Pattern-based rules $r_1^{\mathrm P}(v=2, P=P_1, u=1)$ and $r_2^{\mathrm P}(v=1, P=P_2, u=1)$, \ref{['eqn:rP']}, that can be used for the generation of images with black and white checkerboard patterns.
  • Figure 3: for the generation of $3 \times 3$ images with checkerboard patterns defined by the rules from \ref{['fig:patterns2d']}. In each iteration $k \in [1,9]$, three steps take place: (i) a segment identifier $s(k)$ with the smallest entropy is drawn, (ii) a corresponding value $v_{s(k)}$ is drawn according to the pattern-based ruleset, and (iii) the newly generated identifier-value pair is added as a segment to the content instance $C(k)$. For $s(k)$ and $v(k)$, the uniformly distributed set of possible choices are listed. The choices for $s(k)$ depend on the Shannon entropy $H_k$ of each undefined segment (see appendix), as shown on the right. The choices for $v(k)$ depend on the fulfillment of the two rules $r_1^{\mathrm P}$ and $r_2^{\mathrm P}$, as listed.
  • Figure 4: circuit with $\sigma = (1,\dots,N)$. (a) Circuit layout with an exemplary alphabet $A$ with $W=16$ symbols, which requires a set $\mathcal{Q}_i$ of $q=4$ qubits for each segment with $i \in [1,N]$. In each iteration $k \in [1,N]$, the operator $U_k$ prepares the qubits from $\mathcal{Q}_k$ in a superposition state $\ket{C'}_{k}$, entangled with (a subset of) the qubits from $\mathcal{Q}_1,\dots,\mathcal{Q}_{k-1}$. All qubits are measured to obtain $p(C)$ (see appendix). (b) Gate decomposition of $U_k$ into the components of $U_k^{\mathrm{coin}}$, which consists of pairs $U_k^{\mathrm{ctrl}}(C') \otimes U_k^{\mathrm{init}}(C')$. Each of these pairs represent a conditional loading of a probability distribution. The combined control operators act on the qubits from $\mathcal{Q}_k^+$, whereas the initialization operators act on the qubits from $\mathcal{Q}_k$ (see appendix).
  • Figure 5: for the generation of $3 \times 3$ images with black and white checkerboard patterns in analogy to \ref{['fig:cgeneration2d']}. (a) Predefined segment order $\sigma = (1,2,3,6,5,4,7,8,9)$. (b) Circuit layout with the same symbols as in \ref{['fig:qwfccircuit']}. (c) Generated content instances $C_1$ and $C_2$ with $p(C_1)=p(C_2)=\frac{1}{2}$.
  • ...and 6 more figures