As an initial matter, let's ask "what is the classical computational complexity of solving 'mate-in-$n$' type games?" For example, is it even in $\mathcal{NP}$ to know, given a certain chess position, that white can mate in $10$ or fewer moves?

It's been known for a while that we can consider such questions as a "quantified boolean formula" (QBF) question. Let's rephrase our question as:

$$\exists w_1\forall b_1\exists w_2\forall b_2\cdots\exists w_n:\phi(w_1,b_1,w_2,b_2,\cdots,w_n)?$$

This "mate-in-$n$" statement can be read as "given a state of the board $\phi$ encoding the rules of chess, does there exist a move by white such that for moves by black, there is a countermove by white such that... the moves applied to the board $\phi$ will lead to a mate by white?"

This "mate-in-$n$" is precisely a way to think about the polynomial hierarchy $\mathcal{PH}$. The mate-in-$10$ is at the $10^{th}$ level of the hierarchy (or maybe it's the $20^{th}$) because there are $20$ iterations of for-alls and there-exists. $\phi$ is easy to evaluate (polynomial evaluation of whether there's a mate or not). The number of qubits would be polynomial in $n$ I think (high thousands?).

Letting $n$ vary polynomialy distinguishes $\mathcal{PH}$ from $\mathcal{PSPACE}$. Magically, although we know that $\mathcal{BQP}\subseteq\mathcal{PSPACE}$, it's likely that $\mathcal{BQP}$ and $\mathcal{PH}$ are incomparable. I think the implication is that certain well-framed QBF-style questions can be answered faster than classical algorithms.

For chess proper, most games can be completed in about $50$ moves or less. So we can say "is there a mate-in-$50$ for white, given the starting position?"

Chess has a lot of asymmetry that may make it difficult to frame in the right way. Weichi (Go) may be a better candidate for pondering. I suspect a toy game, based on forrelation, can be built where a quantum computer can outperform a classical computer.

**EDIT**

To think about how to utilize such an algorithm, let's take the QBF a little bit more. The output of the QBF is either a "YES" (a forced mate is possible) or "NO" (a forced mate is not possible).

Say we are **white**, and we have a quantum QBF-solver that can be fed a given board position with **black** to move, and will spit out whether there's a winning strategy for **black** (i.e. YES or NO). It is our turn to move.

We can cycle through all of the available moves for **white** by making a putative move, and ask our quantum QBF-solver whether **black** has a winning response. If we find a move where **black** doesn't have a winning response we can take that line.

In the comments, you suggest that chess isn't likely played out in $50$ moves starting from the initial board, and that $6000$ moves is more likely.

Nonetheless even accepting $6000$ is the better estimate, I maintain that the number of qubits is polynomial in the depth of the tree you are willing to review, otherwise you haven't got a practical algorithm.

4

Related:Chess SE: Will quantum computers solve chess? – Sanchayan Dutta – 2019-04-01T04:20:01.3902

You'd perhaps like Scott Aaronson's article The Limits of Quantum (especially p. ~67) and blog post NAND now for something completely different. Also, check Bremermann's article on the theoretical limitations of solving chess and this review for a brief discussion on NAND trees.

– Sanchayan Dutta – 2019-04-01T07:52:35.357I don't agree with all of the pessimism in the Chess.SE thread, and I don't agree with the framing of the question as "black-to-move/white-to-move/black-to-move..." not fitting into a quantum algorithm. I do like thinking about such "high-concept," easy-to-state questions. Although specific to chess, research on deep neural networks is cracking the problem much faster than quantum computers likely ever will, but asking about "what kind of games, if any,

coulda quantum computer tackle" is attractive. – Mark S – 2019-04-03T16:45:06.307