  In this paper, we study quantum algorithms for computing the exact value of
the treewidth of a graph. Our algorithms are based on the classical algorithm
by Fomin and Villanger (Combinatorica 32, 2012) that uses $O(2.616^n)$ time and
polynomial space. We show three quantum algorithms with the following
complexity, using QRAM in both exponential space algorithms: $\bullet$
$O(1.618^n)$ time and polynomial space; $\bullet$ $O(1.554^n)$ time and
$O(1.452^n)$ space; $\bullet$ $O(1.538^n)$ time and space. In contrast, the
fastest known classical algorithm for treewidth uses $O(1.755^n)$ time and
space. The first two speed-ups are obtained in a fairly straightforward way.
The first version uses additionally only Grover's search and provides a
quadratic speedup. The second speedup is more time-efficient and uses both
Grover's search and the quantum exponential dynamic programming by Ambainis et
al. (SODA '19). The third version uses the specific properties of the classical
algorithm and treewidth, with a modified version of the quantum dynamic
programming on the hypercube. Lastly, as a small side result, we also give a
new classical time-space tradeoff for computing treewidth in $O^*(2^n)$ time
and $O^*(\sqrt{2^n})$ space.
