text:
\section{Introduction}\label{sec1}
Quantum computing has attracted much attention, because quantum superposition, entanglement and other properties can greatly improve the efficiency of computing \cite{nielsen2002quantum,jiang2021programmable}. In recent years, with the development of quantum computer hardware \cite{zhong2020quantum,arute2019quantum}, quantum software and quantum programming  \cite{broughton2020tensorflow,cross2018ibm,paolini2019qpcf,selinger2004towards} has also been greatly developed. Researchers can write and run many quantum algorithms that have been proposed before but cannot be implemented due to limitations, such as Grover's algorithm \cite{adedoyin2018quantum}, quantum principal component analysis algorithm \cite{he2020exact}, quantum phase estimation \cite{o2019quantum}, and ${etc}$.
In the process of writing quantum programs, some errors will inevitably occur \cite{paltenghi2021bugs,wang2018quanfuzz,miranskyy2020your}.
For example, Zhao \cite{zhao2021identifying} defined a few bugs that focus on misuses of features of the quantum programming language --- Qiskit \cite{cross2018ibm}.
Huang \cite{huang2019statistical} also recorded some bugs in the Scaffold compiler \cite{javadiabhari2015scaffcc}.
For quantum programs we still need to take corresponding measures to find these errors and fix them.
Due to the characteristics of quantum computing, we cannot debug programs as in the classical environment.
This difficulty in debugging quantum programs hinders the development of quantum computing.
An effective quantum program debugging scheme is needed.

Researchers have proposed some methods for debugging quantum programs, including
quantum unit tests \cite{bright2017microsoft}, quantum assertions \cite{huang2019statistical,liu2020quantum,li2019proq,liu2021systematic}, and ${etc}$.
Unit tests are used to determine whether a specific function is correct under a specific condition.
The role of the assertion is that when the program executes to the assertion, the corresponding assertion should be true, and if the assertion is not true, the program should terminate execution.
These methods have corresponding quantum versions.
However, these methods are not very good to meet the needs.
Currently, assertions in the quantum environment include statistical assertions \cite{huang2019statistical} based on classical observations, dynamic runtime assertions \cite{liu2020quantum} that use auxiliary qubits to obtain information indirectly, a projection-based runtime assertion \cite{li2019proq}, and dynamic assertion \cite{liu2021systematic} that extend dynamic runtime assertions \cite{liu2020quantum}.
These assertions have two main shortcomings.
Firstly, they are mostly used when an error has occurred during the running of the program or when the programmer suspects that there is an error somewhere in the program.
Just like people do not directly set breakpoints on the entire program, but often set breakpoints only when the output is not as expected.
Secondly, the use of assertions relies on the prediction of results.
They need to compare the actual output with the expected result to judge whether the program is error.
This is not simple for quantum programs.
Microsoft's ${Q\#}$ \cite{bright2017microsoft} provides a method for unit testing of quantum programs, which tests a unit of a quantum program individually to verify whether it meets expectations, and internally still uses assertions to achieve this goal.
There is another method Quito (quantum input output coverage) \cite{ali2021assessing}.
The biggest contribution of this paper is to define three coverage criteria for the input and output of quantum program debugging.
But the biggest flaw of this method is that it still uses statistical analysis to determine test pass and fail, which certainly does not reduce the complexity of quantum program debugging.
Therefore, they cannot meet the programmer's needs for quantum program debugging very well.

Only unit tests and assertion cannot meet the needs of program debugging. In classical program debugging field, symbolic execution is another important debug method and it has appeared much earlier \cite{king1976symbolic}. With the development of constraint solving technology, symbolic execution has become an effective technology for generating high-coverage test cases \cite{cadar2013symbolic} and been widely used in different areas such as software testing, analysis and verification \cite{zhao40smart,yang2019cache,wang2017cached}.

This paper proposes a quantum symbolic execution (QSE) method, which focuses on generating high-coverage test cases for quantum programs. QSE uses quantum superposition and parallel characteristics to store the test case space with only a few qubits. According to the conditional statements in the debugged program, the test case space is continuously divided into subsets. Elements in the same subset are suitable test cases that can test the corresponding branch in the code to be tested. QSE not only provides a possible way to debug quantum programs, but also avoids the difficult problem of solving constraints in classical symbolic execution.

\section{Related Works}
In this section, we briefly introduce the classical symbolic execution and some existing quantum modules that will be used in QSE.
\subsection{classical symbolic execution (CSE)} \label{sec21}
Programs often have conditional statements, and each branch represents an execution path to the program. In software testing, symbolic execution is a way to generate test cases that cover each execution path. Symbolic execution works by two steps:
\begin{enumerate}[(1)]
	\item creating execution paths, and
	\item using a constraint solver to calculate the answers to the execution paths, i.e., generating test cases.
\end{enumerate}

To formally accomplish this task, symbolic execution maintains two states globally: a symbolic state ${\sigma}$, which maps variables to symbolic expressions, and symbolic path constraints ${PC}$s, which are quantifier-free first-order logical formulas over symbolic expressions.
At the beginning of a symbolic execution, ${\sigma}$ is initialized to an empty map and ${PC}$ is initialized to ${true}$. Both ${\sigma}$ and ${PC}$ are populated during the course of symbolic execution. The update rule of ${\sigma}$ is:
\begin{enumerate}
	\item[$\bullet$] At every read statement ${var=sym\_input()}$ that receives program input, symbolic execution adds the mapping ${var \mapsto s}$ to ${\sigma}$, where ${s}$ is a fresh symbolic value.
	\item[$\bullet$] At every assignment ${v=e}$, symbolic execution updates ${\sigma}$ by mapping ${v}$ to ${\sigma(e)}$, where ${\sigma(e)}$ is the mapping of the symbolic state ${\sigma}$ to the expression ${e}$.
\end{enumerate}
The update rule of ${PC}$ is:
\begin{enumerate}
	\item[$\bullet$] At every conditional statement ${if \; (e) \; S1 \; else \; S2}$, ${PC}$ is updated to
	${PC_1=PC\land \sigma(e)}$ (``then'' branch) and ${PC_2={PC} \land \lnot \sigma(e)}$ (``else'' branch).
\end{enumerate}

For example, the symbolic execution of the code in Fig. \ref{fig1} starts with an empty symbolic state $\sigma$ and a symbolic path constraint ${true}$. After Line 03, ${\sigma=\{x \mapsto x_0, y \mapsto y_0\}}$; after Line 05, a path constraint ${(x_0+y_0<4)\land(x_0>y_0)}$ is created; and after Line 09, a path constraint ${(x_0+y_0\geq4)\land(y_0>1)}$ is created. Finally, there are 4 path constrains: $PC_{11}$, $PC_{12}$, $PC_{21}$, and $PC_{22}$. Each path constraint is solved with a constraint solver to obtain test cases. $\{x=2,y=1\}$, $\{x=1,y=2\}$, $\{x=3,y=2\}$, and $\{x=4,y=1\}$ are the possible outputs of the constraint solver for $PC_{11}$, $PC_{12}$, $PC_{21}$, and $PC_{22}$ respectively, i.e., they are suitable test cases.

All the execution paths of a program can be represented using a tree, called the execution tree.
For example, Fig. \ref{fig2} gives the execution tree of the code in Fig. \ref{fig1}.  The 4 branches correspond to the 4 path constrains.

\begin{figure}[htbp]
	\centering
	\includegraphics[scale=0.3]{1-2.pdf}
	\caption{An example to illustrate symbolic execution}
	\label{fig1}
\end{figure}

\begin{figure}[htbp]
	\centering
	\includegraphics[scale=0.8]{1-1.pdf}
	\caption{The execution tree for the example in Fig. \ref{fig1}}
	\label{fig2}
\end{figure}

\subsection{related quantum modules}\label{sec24}
Suppose ${a}$ and ${b}$ are two ${n}$-qubit binary numbers, quantum adder \cite{chang2019design} ``${A}$'' implements addition of two qubits:
\begin{equation*}
	A(|ab \rangle |0 \rangle ^{\otimes n+1})= |ab \rangle |a+b \rangle.
\end{equation*}
The quantum module is shown in Fig. \ref{fig3}.

Quantum multiplier \cite{2019Quantum} ``${M}$'' implements multiplication of two qubits:
\begin{equation*}
	M(|ab\rangle |0\rangle^{\otimes 2n})= |ab\rangle |a\times b\rangle.
\end{equation*}
The quantum module is shown in Fig. \ref{fig4}.

The quantum comparator \cite{wang2012design} ``${C}$'' is used to compare two binary numbers. ${c_1}$ and ${c_2}$ are two 1-qubit outputs to record the comparison:
\begin{equation*}
	C(|ab\rangle|00\rangle)=|ab\rangle|c_1c_2\rangle.
\end{equation*}
When ${a>b}$, ${\left|c_1c_2\right\rangle=\left|10\right\rangle}$; when ${a<b}$, ${\left|c_1c_2\right\rangle=\left|01\right\rangle}$; and when ${a=b}$, ${\left|c_1c_2\right\rangle=\left|00\right\rangle}$. The module is shown in Fig. \ref{fig5}.
\begin{figure}[htbp]
	\centering
	\subfigure[quantum adder]{
		\includegraphics[scale=1]{9.jpg}\label{fig3}
	}
	\quad
	\subfigure[quantum multiplier]{
		\includegraphics[scale=1]{7.jpg}\label{fig4}
	}
	\quad
	\subfigure[quantum comparator]{
		\includegraphics[scale=1]{8.jpg}\label{fig5}
	}
	\caption{Three quantum modules}
\end{figure}

\section{Quantum symbolic execution}
In this section, we first give the workflow of quantum symbolic execution.
Then we explain how to prepare the initial test case space and use relational operators, logical operators to delineate subspaces.
Then we give the overall framework of QSE.
Finally give an example to illustrate.

\subsection{main idea} \label{sec31}
In Section \ref{sec21}, we briefly describe the process of symbolic execution in the classical environment. Generally speaking, it first traverses the program to collect the path constraints, and then uses the constraint solver to calculate a set of inputs that meet the path constraints.

Quantum symbolic execution is completely different, which works by two steps:
\begin{enumerate}[(1)]
	\item generating a test case space that includes all possible test cases, and
	\item according to the conditional statements in the code to be tested, partitioning the test case space into subspaces, and each subspace contains all the test cases that fit into a path constraint.
\end{enumerate}

Fig. \ref{fig16} contrasts classical symbolic execution and quantum symbolic execution.
\begin{figure}[htbp]
	\centering
	\includegraphics[scale=0.8]{12.jpg}
	\caption{The contrast between classical symbolic execution and quantum symbolic execution.}
	\label{fig16}
\end{figure}

QSE uses two quantum registers: $|s\rangle$ and $|c\rangle$, where
\begin{equation}
	|q\rangle=\frac{1}{\sqrt{2}^n}\sum_{i=0}^{2^{n}-1}|s_i\rangle\otimes|c_i\rangle
\end{equation}
$|s\rangle=|s^{n-1}s^{n-2}\cdots s^0\rangle$ consists of $n$ qubits and $s_i$ is a value used to represent a test case. $|c\rangle=|c^{m-1}c^{m-2}\cdots c^0\rangle$ consists of $m$ qubits and is the flag to subspace. $|s\rangle$ and $|c\rangle$ entangle together to realize the partition of $|s\rangle$: $s_i$ with the same $c_i$ belongs to the same subset, i.e. test cases for the same branch. $|s\rangle$ and $|c\rangle$ are collectively referred to as $|q\rangle$.

The flag $|c\rangle$ plays an important role in QSE, and it is gradually modified as the conditional statements in the code to be tested. Different conditions correspond to different ways to modify $|c\rangle$. Therefore, it is necessary to know how many types of conditions there are when programming. According to \cite{prata2014c, bruce2006java, eric2015python}, the conditions mainly include relational operation in Table \ref{table1} and logical operation in Table \ref{table2}.
\begin{table}
	\caption{relational operation}
	\begin{center}
		\begin{tabular}{cc}
			\hline
			relational operators & meaning  \\
			\hline
			${<}$ & less than   \\
			${<=}$ & less than or equal to \\
			${>}$ & greater than  \\
			${>=}$ & greater than or equal to \\
			${==}$ & equal to  \\
			${!=}$ & not equal to  \\
			\hline
		\end{tabular} \label{table1}
	\end{center}
\end{table}

\begin{table}
	\caption{logical operation}
	\begin{center}
		\begin{tabular}{cc}
			\hline
			logical operators & meaning  \\
			\hline
			${\&\&}$ & AND   \\
			${||}$ & OR  \\
			${!}$ &  NOT  \\
			\hline
		\end{tabular} \label{table2}
	\end{center}
\end{table}

The effects of relational and logical operations on $|c\rangle$ will be described in detail in Sections \ref{relationaloperator} and \ref{logicaloperator}, respectively.

\subsection{Preparation of the test case space}
Prepare $m+n$ qubits and set all of them to $|0\rangle$. The initial state of $|q\rangle$ is
\begin{equation}
	|q\rangle_0 =|0\rangle^{\otimes n}\otimes|0\rangle^{\otimes m}
\end{equation}
i.e., $|s\rangle_0=|0\rangle^{\otimes n}$ and $|c\rangle_0=|0\rangle^{\otimes m}$.

$n$ $H$ quantum gates and $m$ $I$ quantum gates are used to transform the initial state $|q\rangle_0$ to state $|q\rangle_1$, where
$$
H=\frac{1}{\sqrt{2}}\left[
\begin{array}{cc}
	1 & 1 \\
	1 & -1
\end{array}
\right],\ \ I=\left[
\begin{array}{cc}
	1 & 0 \\
	0 & 1
\end{array}
\right]
$$

The quantum preparation of the test case space can be expressed as $U_1$:
\begin{equation}
	U_1 = H^{\otimes n}\otimes I^{\otimes m}
\end{equation}

$U_1$ changes the initial state $|q\rangle_0$ to the test case space:
\begin{equation}\label{U1}
	\begin{split}
		|q\rangle_1=&U_1(|q\rangle_0)\\
		=&H^{\otimes n}(|s\rangle_0)\otimes I^{\otimes m}(|c\rangle_0)\\
		=&(H|0\rangle)^{\otimes n}\otimes (I|0\rangle)^{\otimes m}\\
		=&\frac{1}{\sqrt 2}(|0\rangle+|1\rangle) \otimes \frac{1}{\sqrt 2}(|0\rangle+|1\rangle) \otimes  \cdots  \otimes \frac{1}{\sqrt 2 }(|0\rangle+|1\rangle) \otimes|0\rangle^m\\
		=&\frac{1}{{\sqrt 2 }^n}\left( |0 \cdots 00\rangle  + |0 \cdots 01\rangle +\cdots+|1 \cdots 11\rangle\right)\otimes|0\rangle^m\\
		=&\frac{1}{{\sqrt 2 }^n}\left( |0\rangle  + |1\rangle+\cdots +|2^n-1\rangle\right)\otimes|0\rangle^m\\
		=&\frac{1}{\sqrt{2}^n}\sum_{i=0}^{2^n-1}|i\rangle\otimes|0\rangle^m\\
		=&|s\rangle\otimes|0\rangle^m
	\end{split}
\end{equation}
where $|s\rangle=\frac{1}{\sqrt{2}^n}\sum_{i=0}^{2^n-1}|i\rangle$. The quantum circuit is shown in Fig. \ref{fig6}.

\begin{figure}[htbp]
	\centering
	\includegraphics[scale=1]{4.jpg}
	\caption{The preparation of the test case space}
	\label{fig6}
\end{figure}

Eq. (\ref{U1}) shows that the test case space  $|s\rangle$ stores all integers from 0 to $2^n-1$, which are all the possible test cases. If the code to be tested contains $l$ ($l>1$) variables $x_1,x_2,\cdots,x_l$, $|s\rangle$ is still able to store all possible test cases. Divide the $n$ qubits of $|s\rangle$ into $l$ parts and each part stores all the possible value of a variable. The $i$th part contains $n_i$ qubits $|s_{x_i}\rangle=|s_{x_i}^{n_i-1}s_{x_i}^{n_i-2}\cdots s_{x_i}^{0}\rangle$, where $n=\sum_{i=1}^{l}n_i$. For example, the code in Fig. \ref{fig1} has two variables: $x$ and $y$. They contain 3 and 2 qubits respectively. Hence,
$$
|s\rangle=|s_xs_y\rangle=\frac{1}{\sqrt{2}^3}\sum_{i=0}^{7}|i\rangle\otimes\frac{1}{\sqrt{2}^2}\sum_{i=0}^{3}|i\rangle=\frac{1}{\sqrt{2}^5}\sum_{i=0}^{31}|i\rangle
$$

\subsection{Relational operator} \label{relationaloperator}
Relational operators compare two numbers. Therefore, QSE uses the quantum comparator to divide the test case space. Section 2.2 shows that the quantum comparator has two output qubits: $|c_1c_2\rangle$. Suppose they correspond to some two adjacent qubits in $|c\rangle=|c^{m-1}c^{m-2}\cdots c^0\rangle$, and mark them as $|c^{i}c^{i-1}\rangle$. Combining Table \ref{table1}, we can get the relationship between the relational operators and the state of the output qubits as shown in Table \ref{table3}. In this table, ``$*$'' indicates that there is no requirement for the state of that qubit.

\begin{table}
	\caption{The output of rational operation}
	\begin{center}
		\begin{tabular}{cc}
			\hline
			relational operator & $|c^{i}c^{i-1}\rangle$  \\
			\hline
			${<}$ & $|01\rangle$   \\
			${<=}$ & $|0*\rangle$ \\
			${>}$ & $|10\rangle$  \\
			${>=}$ & $|*0\rangle$ \\
			${==}$ & $|00\rangle$  \\
			${!=}$ & $|01\rangle$ or $|10\rangle$  \\
			\hline
		\end{tabular} \label{table3}
	\end{center}
\end{table}

Sometimes, instead of directly comparing two variables, the code to be tested compares the values of two expressions. Suppose the two expressions are $e_1$ and $e_2$, and their outputs are $|\varphi_1\rangle$ and $|\varphi_2\rangle$ respectively. A quantum comparator is used to compare $|\varphi_1\rangle$ and $|\varphi_2\rangle$. $|c^{i}\rangle$ and $|c^{i-1}\rangle$ record the results of the comparison, i.e., they are the flags to segment the test case space. The segmentation of the test case space by a relational operator is expressed as $U_r$:
\begin{equation}
	U_r = C\otimes e_1\otimes e_2
\end{equation}

$U_r$ can segment the test case space by modifying the state of $|c^ic^{i-1}\rangle$.
\begin{equation}\label{Ur}
	\begin{split}
		&U_r(|s\rangle|0\rangle^{\otimes k}|0\rangle^{\otimes t}|00\rangle)\\
		=&C(e_1(|s\rangle|0\rangle^{\otimes k}) e_2(|s\rangle|0\rangle^{\otimes t}) |00\rangle)\\
		=&C(|s\rangle|\varphi_1\rangle|\varphi_2\rangle|00\rangle)\\
		=&|s\rangle\otimes C(|\varphi_1\rangle|\varphi_2\rangle|00\rangle)\\
		=&|s\rangle|\varphi_1\rangle|\varphi_2\rangle|c^ic^{i-1}\rangle
	\end{split}
\end{equation}
In $|s\rangle\otimes|c^ic^{i-1}\rangle$, due to the entanglement between $|s\rangle$ and $|c^ic^{i-1}\rangle$, different states of $|c^ic^{i-1}\rangle$ correspond to different subspaces of $|s\rangle$. The circuit is shown in Fig. \ref{fig7}.

\begin{figure}[htbp]
	\centering
	\includegraphics[scale=1]{13.jpg}
	\caption{The segmentation of the test case space by relational operations.}
	\label{fig7}
\end{figure}

In the following, we use $|c^ic^{i-1}\rangle_e$ to indicate that $|c^ic^{i-1}\rangle$ is in the output state of $e$, and $|c^ic^{i-1}\rangle_{\overline{e}}$ to indicate that $|c^ic^{i-1}\rangle$ is not in the output state of $e$, where $e=(e_1\circ e_2)$ and $\circ\in\{<,\leq,>,\geq,=,\neq\}$. For example, if $e=(e_1<e_2)$, $|c^ic^{i-1}\rangle_e=|01\rangle$, and $|c^ic^{i-1}\rangle_{\overline{e}}=|10\rangle$ or $|11\rangle$ or other non-$|01\rangle$ states.

\subsection{Logical operators} \label{logicaloperator}
\subsubsection{$T$ module}
Usually, the inputs to a logical operator are the outputs of rational operator(s). A rational operator has two outputs $|c^ic^{i-1}\rangle$. Hence, Module $T$ is defined firstly to facilitate later descriptions.

$T$ is a control module that acts on two qubits $|c^ic^{i-1}\rangle$. According to Table \ref{table3},  $|c^ic^{i-1}\rangle$ have 6 states. Therefore, there are also 6 cases of $T=\{T_<,T_{\leq},T_>,T_{\geq},T_=,T_{\neq}\}$. Their circuits are shown in Fig. \ref{fig21}.

\begin{figure}[htbp]
	\centering
	\subfigure[$T_<$]{
		\includegraphics[scale=1]{T1.jpg}\label{figT1}
	}
	\hspace{1cm}
	\subfigure[$T_{\leq}$]{
		\includegraphics[scale=1]{T2.jpg}\label{figT2}
	}
	\hspace{1cm}
	\subfigure[$T_>$]{
		\includegraphics[scale=1]{T3.jpg}\label{figT3}
	}
	\\
	\subfigure[$T_{\geq}$]{
		\includegraphics[scale=1]{T4.jpg}\label{figT4}
	}
	\hspace{1cm}
	\subfigure[$T_=$]{
		\includegraphics[scale=1]{T5.jpg}\label{figT5}
	}
	\hspace{1cm}
	\subfigure[$T_{\neq}$]{
		\includegraphics[scale=1]{T6.jpg}\label{figT6}
	}
	\caption{Six cases of Module $T$}
\label{fig21}
\end{figure}

For example, in Fig. \ref{figT1}, because it is $T_<$, the state of $|c^ic^{i-1}\rangle$ is $|01\rangle$. Hence, we place a 0-control on qubit $|c^i\rangle$ and a 1-control on $|c^{i-1}\rangle$.
Thus, these two control qubits represent that the result of the previous relational operation is ``less than''.

\subsubsection{Logical operators}
There are 3 logical operators. We will give their quantum circuits one by one.

\begin{enumerate}[(1)]
	\item AND
\end{enumerate}

Suppose there is an expression ${e_1\&\&e_2}$, where $e_1$ and $e_2$ are two rational operations. The logical AND in QSE is shown in Fig. \ref{fig91}, where $T_{e_1},T_{e_2}\in T$, $|c_1^i c_1^{i-1}\rangle$ are the flags of ${e_1}$, and $|c_2^i c_2^{i-1}\rangle$ are the flags of ${e_2}$. The output of logical AND is $|c_{A}\rangle$: if and only if both $e_1$ and $e_1$ are satisfied, $|c_{A}\rangle$ becomes $|1\rangle$; otherwise, it remains unchanged in $|0\rangle$ state. That is to say, $|c_{A}\rangle$ becomes a flag of logical AND.

\begin{figure}[htbp]
	\centering
	\subfigure[The inputs are relational operations.]{
		\includegraphics[scale=1]{15.jpg}\label{fig91}
	}
	\hspace{1cm}
	\subfigure[The inputs are logical operations.]{
		\includegraphics[scale=1]{151.jpg}\label{fig92}
	}
	\caption{logical AND for QSE}
\label{fig9}
\end{figure}

Define
\begin{equation}
	U_{Ar} = T_{e_1}\text{-}T_{e_2}\text{-NOT}
\end{equation}
Then,
\begin{equation}\label{UAr}
	\begin{split}
		&U_{Ar}(|c_1^i c_1^{i-1}\rangle\otimes|c_2^i c_2^{i-1}\rangle\otimes|0\rangle)\\
		=&T_{e_1}\text{-}T_{e_2}\text{-NOT}(|c_1^i c_1^{i-1}\rangle\otimes|c_2^i c_2^{i-1}\rangle\otimes|0\rangle)\\
		=&|c_1^i c_1^{i-1}\rangle_{e_1}\otimes|c_2^i c_2^{i-1}\rangle_{e_2}\otimes|1\rangle+|c_1^i c_1^{i-1}\rangle_{\overline{e_1}}\otimes|c_2^i c_2^{i-1}\rangle_{{e_2}}\otimes|0\rangle\\
		&+|c_1^i c_1^{i-1}\rangle_{{e_1}}\otimes|c_2^i c_2^{i-1}\rangle_{\overline{e_2}}\otimes|0\rangle+|c_1^i c_1^{i-1}\rangle_{\overline{e_1}}\otimes|c_2^i c_2^{i-1}\rangle_{\overline{e_2}}\otimes|0\rangle
	\end{split}
\end{equation}

If $e_1$ and $e_2$ are two logical operations, it is only necessary to replace $|c_1^i c_1^{i-1}\rangle$ with $|c_1\rangle$, $|c_2^i c_2^{i-1}\rangle$ with $|c_2\rangle$, and $ T_{e_1}$ and $T_{e_2}$ with 1-control, as shown in Fig. \ref{fig92}, where $|c_1\rangle$ and $|c_2\rangle$ are the outputs of $e_1$ and $e_2$ respectively. Now
\begin{equation}
	U_{Al} = \text{CC-NOT}
\end{equation}
and
\begin{equation}\label{UAl}
	\begin{split}
		&U_{Al}(|c_1\rangle\otimes|c_2\rangle\otimes|0\rangle)\\
		=&\text{CC-NOT}(|c_1\rangle\otimes|c_2\rangle\otimes|0\rangle)\\
		=&|1\rangle\otimes|1\rangle\otimes|1\rangle+|0\rangle\otimes|1\rangle\otimes|0\rangle+|1\rangle\otimes|0\rangle\otimes|0\rangle+|0\rangle\otimes|0\rangle\otimes|0\rangle
	\end{split}
\end{equation}

\begin{enumerate}[(2)]
	\item OR
\end{enumerate}

For logical OR, there is an expression ${e_1||e_2}$. Fig. \ref{fig101} shows the logical OR in QSE if $e_1$ and $e_2$ are two rational operations. The output of logical OR is $|c_{O}\rangle$: as long as one of $e_1$ and $e_1$ is satisfied, $|c_{O}\rangle$ becomes $|1\rangle$; otherwise, it remains unchanged in $|0\rangle$ state. That is to say, $|c_{O}\rangle$ becomes a flag of logical OR.

\begin{figure}[htbp]
	\centering
	\subfigure[The inputs are relational operations.]{
		\includegraphics[scale=1]{16.jpg}\label{fig101}
	}
	\hspace{1cm}
	\subfigure[The inputs are logical operations.]{
		\includegraphics[scale=1]{161.jpg}\label{fig102}
	}
	\caption{logical OR for QSE}
\label{fig10}
\end{figure}

Define
\begin{equation}
	U_{Or} =  T_{e_1}\text{-}T_{e_2}\text{-NOT}\otimes T_{e_2}\text{-NOT}\otimes T_{e_1}\text{-NOT}
\end{equation}
Then,
\begin{equation}\label{UA}
	\begin{split}
		&U_{Or}(|c_1^i c_1^{i-1}\rangle\otimes|c_2^i c_2^{i-1}\rangle\otimes|0\rangle)\\
		=&T_{e_1}\text{-}T_{e_2}\text{-NOT}\otimes T_{e_2}\text{-NOT}(T_{e_1}\text{-NOT}(|c_1^i c_1^{i-1}\rangle\otimes|c_2^i c_2^{i-1}\rangle\otimes|0\rangle))\\
		=&T_{e_1}\text{-}T_{e_2}\text{-NOT}\otimes T_{e_2}\text{-NOT}(|c_1^i c_1^{i-1}\rangle_{e_1}\otimes|c_2^i c_2^{i-1}\rangle\otimes|1\rangle+|c_1^i c_1^{i-1}\rangle_{\overline{e_1}}\otimes|c_2^i c_2^{i-1}\rangle\otimes|0\rangle)\\
		=&T_{e_1}\text{-}T_{e_2}\text{-NOT}(|c_1^i c_1^{i-1}\rangle_{e_1}\otimes|c_2^i c_2^{i-1}\rangle_{e_2}\otimes|0\rangle
		+|c_1^i c_1^{i-1}\rangle_{e_1}\otimes|c_2^i c_2^{i-1}\rangle_{\overline{e_1}}\otimes|1\rangle\\
		&+|c_1^i c_1^{i-1}\rangle_{\overline{e_1}}\otimes|c_2^i c_2^{i-1}\rangle_{e_2}\otimes|1\rangle
		+|c_1^i c_1^{i-1}\rangle_{\overline{e_1}}\otimes|c_2^i c_2^{i-1}\rangle_{\overline{e_1}}\otimes|0\rangle)\\
		=&|c_1^i c_1^{i-1}\rangle_{e_1}\otimes|c_2^i c_2^{i-1}\rangle_{e_2}\otimes|1\rangle
		+|c_1^i c_1^{i-1}\rangle_{e_1}\otimes|c_2^i c_2^{i-1}\rangle_{\overline{e_1}}\otimes|1\rangle\\
		&+|c_1^i c_1^{i-1}\rangle_{\overline{e_1}}\otimes|c_2^i c_2^{i-1}\rangle_{e_2}\otimes|1\rangle
		+|c_1^i c_1^{i-1}\rangle_{\overline{e_1}}\otimes|c_2^i c_2^{i-1}\rangle_{\overline{e_1}}\otimes|0\rangle
	\end{split}
\end{equation}

If $e_1$ and $e_2$ are two logical operations, the quantum circuit is shown in Fig. \ref{fig102} and represented as $U_{Ol}$. The migration principle is the same as in Fig. \ref{fig9} and will not be repeated.

\begin{enumerate}[(3)]
	\item NOT
\end{enumerate}

NOT does not need to be implemented with any quantum circuits. For $!e$, not matter $e$ is a rational operation or a logical operation, $e$ divides $|s\rangle$ into two subsets: one satisfies $e$ and the other does not. $!e$ just reverses the satisfiability and does not affect the division of the two subsets. Therefore, there is no need for quantum circuits to change the division of the subsets or to divide the subsets further.

\subsection{Divide the test case space}
Programs often have complex $e$ or the branch statements are nested. Therefore, multiple quantum operations are needed to be connected to continuously divide the test case space.

Define
\begin{equation}
	U_2 = U^{\otimes k}
\end{equation}
where $U\in\{U_r,U_{Ar},U_{Al},U_{Or},U_{Ol}\}$ and $k$ is a positive integer. Act $U_2$ on $|q\rangle_1$:
\begin{equation}\label{U2}
	\begin{split}
		|q\rangle_2=&U_2(|q\rangle_1)\\
		=&U^{\otimes k}(|s\rangle\otimes|0\rangle^m)\\
		=&\frac{1}{\sqrt{2}^n}\sum_{i=0}^{2^{n}-1}|s_i\rangle\otimes|c_i\rangle
	\end{split}
\end{equation}

According to the definitions of $U_r,U_{Ar},U_{Al},U_{Or},U_{Ol}$ in Section \ref{relationaloperator} and Section \ref{logicaloperator}, the qubits $|0\rangle^m$ in $|q\rangle_1$ is gradually modified based on the relational and the logical operators in the program to be tested. Eventually, through the entanglement of $|s\rangle$ and $|c\rangle$, the test case space is divided into multiple subsets. The values belonging to the same subset are test cases that can cover the same branch.

\section{Experiments}
\subsection{An example}
\subsubsection{The division of the test space}
The program shown in Fig. \ref{fig1} is used as an example to further illustrate how QSE works. There are 3 branch statements in the program. Coupled with the process of preparing the test case space, the quantum circuit consists of 4 parts as shown in Fig. \ref{fig13}.

\begin{figure}[htbp]
	\centering
	\includegraphics[scale=1]{6new.jpg}
	\caption{QSE circuit for example in Fig. \ref{fig1}}
	\label{fig13}
\end{figure}

\begin{enumerate}[(1)]
	\item Prepare the test case space
\end{enumerate}

3 and 2 qubits are used to represent variables $x$ and $y$ respectively. Hence, 5 $H$ quantum gates   transform the initial state $|0\rangle^{\otimes 5}$ to state $|s_x\rangle\otimes|s_y\rangle$, i.e.,
\begin{equation*}
	\begin{split}
		&H^{\otimes 5}(|0\rangle^{\otimes 5})=(H|0\rangle)^{\otimes 3}\otimes (H|0\rangle)^{\otimes 2}\\
		=&\frac{1}{\sqrt{2}^3}\sum_{i=0}^{7}|i\rangle\otimes\frac{1}{\sqrt{2}^2}\sum_{i=0}^{3}|i\rangle=|s_x\rangle\otimes|s_y\rangle
	\end{split}
\end{equation*}
That is to say, $|s_x\rangle$ stores $0\sim7$ and $|s_y\rangle$ stores $0\sim3$. This is the test case space.

\begin{enumerate}[(2)]
	\item $x+y<4$?
\end{enumerate}

The outermost branch statement is to determine whether $x+y$ is less than 4. The quantum adder ``$A$'' is used to get the sum of $x$ and $y$. We add a $|0\rangle$ qubit as the highest bit of $|s_y\rangle$ to make  $|s_y\rangle$ and  $|s_x\rangle$ both have 3 qubits. The quantum comparator ``$C$'' is used to compare $|s_x+s_y\rangle$ and $|4\rangle$, and the output is $|c^1c^0\rangle$. If $x+y<4$, $|c^1c^0\rangle=|01\rangle$; otherwise, $|c^1c^0\rangle=|*0\rangle$. The whole process can be described with the following equation.
\begin{equation*}
	\begin{split}
		&(C\otimes A)(|s_x\rangle|s_y\rangle\otimes|0\rangle|4\rangle|0\rangle|0\rangle)=C(A(|s_x\rangle|s_y\rangle|0\rangle)\otimes|4\rangle|0\rangle|0\rangle)\\
		=&C((|0\rangle|0\rangle|0\rangle+|0\rangle|1\rangle|1\rangle+|0\rangle|2\rangle|2\rangle+|0\rangle|3\rangle|3\rangle\\
		&+|1\rangle|0\rangle|1\rangle+|1\rangle|1\rangle|2\rangle+|1\rangle|2\rangle|3\rangle+|1\rangle|3\rangle|4\rangle\\
		&+|2\rangle|0\rangle|2\rangle+|2\rangle|1\rangle|3\rangle+|2\rangle|2\rangle|4\rangle+|2\rangle|3\rangle|5\rangle\\
		&+|3\rangle|0\rangle|3\rangle+|3\rangle|1\rangle|4\rangle+|3\rangle|2\rangle|5\rangle+|3\rangle|3\rangle|6\rangle\\
		&+|4\rangle|0\rangle|4\rangle+|4\rangle|1\rangle|5\rangle+|4\rangle|2\rangle|6\rangle+|4\rangle|3\rangle|7\rangle\\
		&+|5\rangle|0\rangle|5\rangle+|5\rangle|1\rangle|6\rangle+|5\rangle|2\rangle|7\rangle+|5\rangle|3\rangle|8\rangle\\
		&+|6\rangle|0\rangle|6\rangle+|6\rangle|1\rangle|7\rangle+|6\rangle|2\rangle|8\rangle+|6\rangle|3\rangle|9\rangle\\
		&+|7\rangle|0\rangle|7\rangle+|7\rangle|1\rangle|8\rangle+|7\rangle|2\rangle|9\rangle+|7\rangle|3\rangle|10\rangle)\otimes|4\rangle|0\rangle|0\rangle)\\
		=&|0\rangle|0\rangle C(|0\rangle|4\rangle|0\rangle|0\rangle)+|0\rangle|1\rangle C(|1\rangle|4\rangle|0\rangle|0\rangle)+|0\rangle|2\rangle C(|2\rangle|4\rangle|0\rangle|0\rangle)\\
		&+|0\rangle|3\rangle C(|3\rangle|4\rangle|0\rangle|0\rangle)+|1\rangle|0\rangle C(|1\rangle|4\rangle|0\rangle|0\rangle)+|1\rangle|1\rangle C(|2\rangle|4\rangle|0\rangle|0\rangle)\\
		&+|1\rangle|2\rangle C(|3\rangle|4\rangle|0\rangle|0\rangle)+|1\rangle|3\rangle C(|4\rangle|4\rangle|0\rangle|0\rangle)+|2\rangle|0\rangle C(|2\rangle|4\rangle|0\rangle|0\rangle)\\
		&+|2\rangle|1\rangle C(|3\rangle|4\rangle|0\rangle|0\rangle)+|2\rangle|2\rangle C(|4\rangle|4\rangle|0\rangle|0\rangle)+|2\rangle|3\rangle C(|5\rangle|4\rangle|0\rangle|0\rangle)\\
		&+|3\rangle|0\rangle C(|3\rangle|4\rangle|0\rangle|0\rangle)+|3\rangle|1\rangle C(|4\rangle|4\rangle|0\rangle|0\rangle)+|3\rangle|2\rangle C(|5\rangle|4\rangle|0\rangle|0\rangle)\\
		&+|3\rangle|3\rangle C(|6\rangle|4\rangle|0\rangle|0\rangle)+|4\rangle|0\rangle C(|4\rangle|4\rangle|0\rangle|0\rangle)+|4\rangle|1\rangle C(|5\rangle|4\rangle|0\rangle|0\rangle)\\
		&+|4\rangle|2\rangle C(|6\rangle|4\rangle|0\rangle|0\rangle)+|4\rangle|3\rangle C(|7\rangle|4\rangle|0\rangle|0\rangle)+|5\rangle|0\rangle C(|5\rangle|4\rangle|0\rangle|0\rangle)\\
		&+|5\rangle|1\rangle C(|6\rangle|4\rangle|0\rangle|0\rangle)+|5\rangle|2\rangle C(|7\rangle|4\rangle|0\rangle|0\rangle)+|5\rangle|3\rangle C(|8\rangle|4\rangle|0\rangle|0\rangle)\\
		&+|6\rangle|0\rangle C(|6\rangle|4\rangle|0\rangle|0\rangle)+|6\rangle|1\rangle C(|7\rangle|4\rangle|0\rangle|0\rangle)+|6\rangle|2\rangle C(|8\rangle|4\rangle|0\rangle|0\rangle)\\
		&+|6\rangle|3\rangle C(|9\rangle|4\rangle|0\rangle|0\rangle)+|7\rangle|0\rangle C(|7\rangle|4\rangle|0\rangle|0\rangle)+|7\rangle|1\rangle C(|8\rangle|4\rangle|0\rangle|0\rangle)\\
		&+|7\rangle|2\rangle C(|9\rangle|4\rangle|0\rangle|0\rangle)+|7\rangle|3\rangle C(|10\rangle|4\rangle|0\rangle|0\rangle)\\
		=&|0\rangle|0\rangle |0\rangle|4\rangle|0\rangle|1\rangle+|0\rangle|1\rangle |1\rangle|4\rangle|0\rangle|1\rangle+|0\rangle|2\rangle |2\rangle|4\rangle|0\rangle|1\rangle+|0\rangle|3\rangle |3\rangle|4\rangle|0\rangle|1\rangle\\
		&+|1\rangle|0\rangle |1\rangle|4\rangle|0\rangle|1\rangle+|1\rangle|1\rangle |2\rangle|4\rangle|0\rangle|1\rangle+|1\rangle|2\rangle |3\rangle|4\rangle|0\rangle|1\rangle+|1\rangle|3\rangle |4\rangle|4\rangle|0\rangle|0\rangle\\
		&+|2\rangle|0\rangle |2\rangle|4\rangle|0\rangle|1\rangle+|2\rangle|1\rangle |3\rangle|4\rangle|0\rangle|1\rangle+|2\rangle|2\rangle |4\rangle|4\rangle|0\rangle|0\rangle+|2\rangle|3\rangle |5\rangle|4\rangle|1\rangle|0\rangle\\
		&+|3\rangle|0\rangle |3\rangle|4\rangle|0\rangle|1\rangle+|3\rangle|1\rangle |4\rangle|4\rangle|0\rangle|0\rangle+|3\rangle|2\rangle |5\rangle|4\rangle|1\rangle|0\rangle+|3\rangle|3\rangle |6\rangle|4\rangle|1\rangle|0\rangle\\
		&+|4\rangle|0\rangle |4\rangle|4\rangle|0\rangle|0\rangle+|4\rangle|1\rangle |5\rangle|4\rangle|1\rangle|0\rangle+|4\rangle|2\rangle |6\rangle|4\rangle|1\rangle|0\rangle+|4\rangle|3\rangle |7\rangle|4\rangle|1\rangle|0\rangle\\
		&+|5\rangle|0\rangle |5\rangle|4\rangle|1\rangle|0\rangle+|5\rangle|1\rangle |6\rangle|4\rangle|1\rangle|0\rangle+|5\rangle|2\rangle |7\rangle|4\rangle|1\rangle|0\rangle+|5\rangle|3\rangle |8\rangle|4\rangle|1\rangle|0\rangle\\
		&+|6\rangle|0\rangle |6\rangle|4\rangle|1\rangle|0\rangle+|6\rangle|1\rangle |7\rangle|4\rangle|1\rangle|0\rangle+|6\rangle|2\rangle |8\rangle|4\rangle|1\rangle|0\rangle+|6\rangle|3\rangle |9\rangle|4\rangle|1\rangle|0\rangle\\
		&+|7\rangle|0\rangle |7\rangle|4\rangle|1\rangle|0\rangle+|7\rangle|1\rangle |8\rangle|4\rangle|1\rangle|0\rangle+|7\rangle|2\rangle |9\rangle|4\rangle|1\rangle|0\rangle+|7\rangle|3\rangle |10\rangle|4\rangle|1\rangle|0\rangle
	\end{split}
\end{equation*}

\begin{enumerate}[(3)]
	\item $x>y$?
\end{enumerate}

If $x+y<4$, it needs to be further judged whether $x$ is greater than $y$. Hence, a $T_<$-$C$ module acts on the subspace $|s_x\rangle|s_y\rangle\otimes|c^3c^2c^1c^0\rangle$.
\begin{equation*}
	\begin{split}
		&T_<\text{-}C(|0\rangle|0\rangle |0001\rangle+|0\rangle|1\rangle |0001\rangle+|0\rangle|2\rangle |0001\rangle+|0\rangle|3\rangle |0001\rangle\\
		&+|1\rangle|0\rangle |0001\rangle+|1\rangle|1\rangle |0001\rangle+|1\rangle|2\rangle |0001\rangle+|1\rangle|3\rangle |0000\rangle\\
		&+|2\rangle|0\rangle |0001\rangle+|2\rangle|1\rangle |0001\rangle+|2\rangle|2\rangle |0000\rangle+|2\rangle|3\rangle |0010\rangle\\
		&+|3\rangle|0\rangle |0001\rangle+|3\rangle|1\rangle |0000\rangle+|3\rangle|2\rangle |0010\rangle+|3\rangle|3\rangle |0010\rangle\\
		&+|4\rangle|0\rangle |0000\rangle+|4\rangle|1\rangle |0010\rangle+|4\rangle|2\rangle |0010\rangle+|4\rangle|3\rangle |0010\rangle\\
		&+|5\rangle|0\rangle |0010\rangle+|5\rangle|1\rangle |0010\rangle+|5\rangle|2\rangle |0010\rangle+|5\rangle|3\rangle |0010\rangle\\
		&+|6\rangle|0\rangle |0010\rangle+|6\rangle|1\rangle |0010\rangle+|6\rangle|2\rangle |0010\rangle+|6\rangle|3\rangle |0010\rangle\\
		&+|7\rangle|0\rangle |0010\rangle+|7\rangle|1\rangle |0010\rangle+|7\rangle|2\rangle |0010\rangle+|7\rangle|3\rangle |0010\rangle)\\
		=&|0\rangle|0\rangle |0001\rangle+|0\rangle|1\rangle |0101\rangle+|0\rangle|2\rangle |0101\rangle+|0\rangle|3\rangle |0101\rangle\\
		&+|1\rangle|0\rangle |1001\rangle+|1\rangle|1\rangle |0001\rangle+|1\rangle|2\rangle |0101\rangle+|1\rangle|3\rangle |0000\rangle\\
		&+|2\rangle|0\rangle |1001\rangle+|2\rangle|1\rangle |1001\rangle+|2\rangle|2\rangle |0000\rangle+|2\rangle|3\rangle |0010\rangle\\
		&+|3\rangle|0\rangle |1001\rangle+|3\rangle|1\rangle |0000\rangle+|3\rangle|2\rangle |0010\rangle+|3\rangle|3\rangle |0010\rangle\\
		&+|4\rangle|0\rangle |0000\rangle+|4\rangle|1\rangle |0010\rangle+|4\rangle|2\rangle |0010\rangle+|4\rangle|3\rangle |0010\rangle\\
		&+|5\rangle|0\rangle |0010\rangle+|5\rangle|1\rangle |0010\rangle+|5\rangle|2\rangle |0010\rangle+|5\rangle|3\rangle |0010\rangle\\
		&+|6\rangle|0\rangle |0010\rangle+|6\rangle|1\rangle |0010\rangle+|6\rangle|2\rangle |0010\rangle+|6\rangle|3\rangle |0010\rangle\\
		&+|7\rangle|0\rangle |0010\rangle+|7\rangle|1\rangle |0010\rangle+|7\rangle|2\rangle |0010\rangle+|7\rangle|3\rangle |0010\rangle
	\end{split}
\end{equation*}

If and only if $|c^1c^0\rangle=|01\rangle$, $|s_x\rangle$ and $|s_y\rangle$ need to be compared, i.e., $|c^3c^2\rangle$ is changed according to $|s_x\rangle$ and $|s_y\rangle$: if $|s_x\rangle>|s_y\rangle$, $|c^3c^2\rangle=|10\rangle$; otherwise, $|c^3c^2\rangle=|0*\rangle$. As long as $|c^1c^0\rangle\neq|01\rangle$, $|c^3c^2\rangle$ remains unchanged at state $|00\rangle$.

\begin{enumerate}[(4)]
	\item $y>1$?
\end{enumerate}

If $x+y\geq4$, it needs to be further judged whether $y$ is greater than $1$. Hence, a $T_\geq$-$C$ module acts on the subspace $|s_y\rangle|1\rangle\otimes|c^3c^2c^1c^0\rangle$.
\begin{equation*}
	\begin{split}
		&T_\geq\text{-}C(|0\rangle|1\rangle |0001\rangle+|1\rangle|1\rangle |0101\rangle+|2\rangle|1\rangle |0101\rangle+|3\rangle|1\rangle |0101\rangle\\
		&+|0\rangle|1\rangle |1001\rangle+|1\rangle|1\rangle |0001\rangle+|2\rangle|1\rangle |0101\rangle+|3\rangle|1\rangle |0000\rangle\\
		&+|0\rangle|1\rangle |1001\rangle+|1\rangle|1\rangle |1001\rangle+|2\rangle|1\rangle |0000\rangle+|3\rangle|1\rangle |0010\rangle\\
		&+|0\rangle|1\rangle |1001\rangle+|1\rangle|1\rangle |0000\rangle+|2\rangle|1\rangle |0010\rangle+|3\rangle|1\rangle |0010\rangle\\
		&+|0\rangle|1\rangle |0000\rangle+|1\rangle|1\rangle |0010\rangle+|2\rangle|1\rangle |0010\rangle+|3\rangle|1\rangle |0010\rangle\\
		&+|0\rangle|1\rangle |0010\rangle+|1\rangle|1\rangle |0010\rangle+|2\rangle|1\rangle |0010\rangle+|3\rangle|1\rangle |0010\rangle\\
		&+|0\rangle|1\rangle |0010\rangle+|1\rangle|1\rangle |0010\rangle+|2\rangle|1\rangle |0010\rangle+|3\rangle|1\rangle |0010\rangle\\
		&+|0\rangle|1\rangle |0010\rangle+|1\rangle|1\rangle |0010\rangle+|2\rangle|1\rangle |0010\rangle+|3\rangle|1\rangle |0010\rangle)\\
		=&|0\rangle|1\rangle |0001\rangle+|1\rangle|1\rangle |0101\rangle+|2\rangle|1\rangle |0101\rangle+|3\rangle|1\rangle |0101\rangle\\
		&+|0\rangle|1\rangle |1001\rangle+|1\rangle|1\rangle |0001\rangle+|2\rangle|1\rangle |0101\rangle+|3\rangle|1\rangle |1000\rangle\\
		&+|0\rangle|1\rangle |1001\rangle+|1\rangle|1\rangle |1001\rangle+|2\rangle|1\rangle |1000\rangle+|3\rangle|1\rangle |1010\rangle\\
		&+|0\rangle|1\rangle |1001\rangle+|1\rangle|1\rangle |0000\rangle+|2\rangle|1\rangle |1010\rangle+|3\rangle|1\rangle |1010\rangle\\
		&+|0\rangle|1\rangle |0100\rangle+|1\rangle|1\rangle |0010\rangle+|2\rangle|1\rangle |1010\rangle+|3\rangle|1\rangle |1010\rangle\\
		&+|0\rangle|1\rangle |0110\rangle+|1\rangle|1\rangle |0010\rangle+|2\rangle|1\rangle |1010\rangle+|3\rangle|1\rangle |1010\rangle\\
		&+|0\rangle|1\rangle |0110\rangle+|1\rangle|1\rangle |0010\rangle+|2\rangle|1\rangle |1010\rangle+|3\rangle|1\rangle |1010\rangle\\
		&+|0\rangle|1\rangle |0110\rangle+|1\rangle|1\rangle |0010\rangle+|2\rangle|1\rangle |1010\rangle+|3\rangle|1\rangle |1010\rangle
	\end{split}
\end{equation*}

If and only if $|c^0\rangle=|0\rangle$, $|s_y\rangle$ and $|1\rangle$ need to be compared, i.e., $|c^3c^2\rangle$ is changed according to $|s_y\rangle$ and $|1\rangle$: if $|s_y\rangle>|1\rangle$, $|c^3c^2\rangle=|10\rangle$; otherwise, $|c^3c^2\rangle=|0*\rangle$. As long as $|c^0\rangle\neq|0\rangle$, $|c^3c^2\rangle$ remains unchanged.

Finally, the state of the subspace $|s_x\rangle|s_y\rangle\otimes|c^3c^2c^1c^0\rangle$ is
\begin{equation}\label{example}
	\begin{split}
		&{|0\rangle|0\rangle |0001\rangle}+{|0\rangle|1\rangle |0101\rangle}+{|0\rangle|2\rangle |0101\rangle}+{|0\rangle|3\rangle |0101\rangle}\\
		+&{|1\rangle|0\rangle |1001\rangle}+{|1\rangle|1\rangle |0001\rangle}+{|1\rangle|2\rangle |0101\rangle}+{|1\rangle|3\rangle |1000\rangle}\\
		+&{|2\rangle|0\rangle |1001\rangle}+{|2\rangle|1\rangle |1001\rangle}+{|2\rangle|2\rangle |1000\rangle}+{|2\rangle|3\rangle |1010\rangle}\\
		+&{|3\rangle|0\rangle |1001\rangle}+{|3\rangle|1\rangle |0000\rangle}+{|3\rangle|2\rangle |1010\rangle}+{|3\rangle|3\rangle |1010\rangle}\\
		+&{|4\rangle|0\rangle |0100\rangle}+{|4\rangle|1\rangle |0010\rangle}+{|4\rangle|2\rangle |1010\rangle}+{|4\rangle|3\rangle |1010\rangle}\\
		+&{|5\rangle|0\rangle |0110\rangle}+{|5\rangle|1\rangle |0010\rangle}+{|5\rangle|2\rangle |1010\rangle}+{|5\rangle|3\rangle |1010\rangle}\\
		+&{|6\rangle|0\rangle |0110\rangle}+{|6\rangle|1\rangle |0010\rangle}+{|6\rangle|2\rangle |1010\rangle}+{|6\rangle|3\rangle |1010\rangle}\\
		+&{|7\rangle|0\rangle |0110\rangle}+{|7\rangle|1\rangle |0010\rangle}+{|7\rangle|2\rangle |1010\rangle}+{|7\rangle|3\rangle |1010\rangle}
	\end{split}
\end{equation}

There are 4 cases of the state $|c^3c^2c^1c^0\rangle$:
\begin{itemize}
	\item {$|1001\rangle$}: $|c^1c^0\rangle=|01\rangle$ indicates $x+y<4$ and $|c^3c^2\rangle=|10\rangle$ indicates $x>y$. Hence, $|1001\rangle$ indicates $x+y<4 \ \&\&\  x>y$, which corresponds to $PC_{11}$ in classical symbolic execution.
	\item {$|0*01\rangle$}: $|c^1c^0\rangle=|01\rangle$ indicates $x+y<4$ and $|c^3c^2\rangle=|0*\rangle$ indicates $x\leq y$. Hence, $|0*01\rangle$ indicates $x+y<4 \ \&\&\  x\leq y$, which corresponds to $PC_{12}$ in classical symbolic execution.
	\item {$|10*0\rangle$}: $|c^1c^0\rangle=|*0\rangle$ indicates $x+y\geq 4$ and $|c^3c^2\rangle=|10\rangle$ indicates $y>1$. Hence, $|10*0\rangle$ indicates $x+y\geq 4 \ \&\&\  y>1$, which corresponds to $PC_{21}$ in classical symbolic execution.
	\item {$|0**0\rangle$}: $|c^1c^0\rangle=|*0\rangle$ indicates $x+y\geq 4$ and $|c^3c^2\rangle=|0*\rangle$ indicates $y\leq1$. Hence, $|0**0\rangle$ indicates $x+y\geq 4 \ \&\&\  y\leq1$, which corresponds to $PC_{22}$ in classical symbolic execution.
\end{itemize}

These 4 states of $|c^3c^2c^1c^0\rangle$ divide $|s_x\rangle|s_y\rangle$ into 4 subsets. As shown in Eq. \ref{example},
\begin{itemize}
	\item Subset $\{|1\rangle|0\rangle,|2\rangle|0\rangle,|3\rangle|0\rangle,|2\rangle|1\rangle\}$ contains all the test cases that can test the branch $x+y<4 \ \&\&\  x>y$.
	\item Subset $\{|0\rangle|0\rangle,|0\rangle|1\rangle,|0\rangle|2\rangle,|0\rangle|3\rangle,|1\rangle|1\rangle,|1\rangle|2\rangle\}$ contains all the test cases that can test the branch $x+y<4 \ \&\&\  x\leq y$.
	\item Subset $\{|2\rangle|2\rangle,|3\rangle|2\rangle,|4\rangle|2\rangle,|5\rangle|2\rangle,|6\rangle|2\rangle,|7\rangle|2\rangle,|1\rangle|3\rangle,|2\rangle|3\rangle,|3\rangle|3\rangle,|4\rangle|3\rangle, \\
	|5\rangle|3\rangle,|6\rangle|3\rangle,|7\rangle|3\rangle\}$ contains all the test cases that can test the branch $x+y\geq 4 \ \&\&\  y>1$.
	\item Subset $\{|4\rangle|0\rangle,|5\rangle|0\rangle,|6\rangle|0\rangle,|7\rangle|0\rangle,|3\rangle|1\rangle,|4\rangle|1\rangle,|5\rangle|1\rangle,|6\rangle|1\rangle,|7\rangle|1\rangle\}$ contains all the test cases that can test the branch $x+y\geq 4 \ \&\&\  y\leq1$.
\end{itemize}

\subsubsection{Running on a quantum computer}\label{sec412}
We use the ${ibmq \_ qasm \_ simulator}$ quantum computer on the ${IBM \; Quantum}$ platform to perform the example. The circuit is shown in Fig. \ref{fig14}. This experiment uses 28 qubits, with $q_0$ as the lowest bit and $q_{25}$ as the highest bit:
\begin{itemize}
	\item $q_2q_1q_0$ represent $|s_x\rangle$;
	\item $q_5q_4q_3$ represent $|s_y\rangle$;
	\item $q_9q_8q_7q_6$ represent $|s_x+s_y\rangle$;
	\item $q_{12}q_{11}q_{10}$ are the auxiliary qubits of the quantum adder ``$A$'';
	\item $q_{16}q_{15}q_{14}q_{13}$ are used to represent constant $\left|4\right\rangle$ and $q_{17}$ is used to represent constant $\left|1\right\rangle$;
	\item $q_{23}q_{22}q_{21}q_{20}q_{19}q_{18}$ are the auxiliary qubits of the quantum comparator ``$C$'';
	\item $q_{24}q_{25}$ are the flags $|c^3c^2\rangle$ and $q_{26}q_{27}$ are the flags $|c^1c^0\rangle$.
\end{itemize}

\begin{figure}[htbp]
	\centering
	\includegraphics[scale=0.15]{18.jpg}
	\caption{circuit implementation of QSE}
	\label{fig14}
\end{figure}

The three purple bars in the figure are three quantum comparators. At the end of the circuit, $q_0q_1q_2q_3q_4q_5$ and $q_{24}q_{25}q_{26}q_{27}$ are measured and they have 32 results as shown in Fig. \ref{fig15}. The abscissa displays all the results and the default state of qubits that are not measured is 0. The ordinate represents the probability of each state in a total of 8192 measurements.

\begin{figure}[htbp]
	\centering
	\includegraphics[scale=0.35]{result1.jpg}
	\caption{measurement results for the circuit in Fig. \ref{fig14}}
	\label{fig15}
\end{figure}

The 32 results can be divided into four test case spaces. Fig. \ref{fig30}(a) gives the measurement results whose $|c_3c_2c_1c_0\rangle=|1001\rangle$, i.e., $x+y<4 \ \&\&\  x>y$.  Fig. \ref{fig30}(b) gives the measurement results whose $|c_3c_2c_1c_0\rangle=|0*01\rangle$, i.e., $x+y<4 \ \&\&\  x\leq y$.  Fig. \ref{fig30}(c) gives the measurement results whose $|c_3c_2c_1c_0\rangle=|10*0\rangle$, i.e., $x+y \geq 4 \ \&\&\  y>1$. Fig. \ref{fig30}(d) gives the measurement results whose $|c_3c_2c_1c_0\rangle=|0**0\rangle$, i.e., $x+y \geq 4 \ \&\&\  y \leq 1$.

\begin{figure}[htbp]
	\centering
	\subfigure[$x+y<4 \ \&\&\  x>y$]
	{ \includegraphics[scale=0.3]{result2.pdf}}
	\subfigure[$x+y<4 \ \&\&\  x\leq y$]
	{ \includegraphics[scale=0.3]{result3.pdf}}
	\subfigure[$x+y \geq 4 \ \&\&\  y>1$]
	{ \includegraphics[scale=0.3]{result4.pdf}}
	\subfigure[$x+y \geq 4 \ \&\&\  y \leq 1$]
	{ \includegraphics[scale=0.3]{result5.pdf}}
	\caption{Four test case spaces}
	\label{fig30}
\end{figure}

\subsection{Experiment data}

8 real programs are used to evaluate the performance of QSE. They come from 2 references: \cite{2014Solving} and \cite{2018VulDeePecker} as shown in Table \ref{table4}. The ``Operations'' column describes the type of operations appearing in the path conditions. The ``Line of code'' column lists the number of source code lines in the program, excluding comments and empty lines.

\begin{center}
	\begin{table}
		\centering
		\caption{Programs for the experiments}
		\begin{tabular}{cccc}
			\hline
			Program & Operations & Line of code & From \\
			\hline
			dart & Polynomials & 11 & \cite{2014Solving}\\
			power & Exponential function & 20 & \cite{2014Solving}\\
			stat & Mean and std. dev. computation & 62 & \cite{2014Solving}\\
			tcas & Constant equality checks & 82 & \cite{2014Solving}\\
			early & Polynomials & 14 & \cite{2014Solving}\\
			basic00181 & Constant equality checks & 30 & \cite{2018VulDeePecker}\\
			snp3-ok & Constant equality checks & 24 & \cite{2018VulDeePecker}\\
			CWE789 & Integer computation & 141 & \cite{2018VulDeePecker}\\
			\hline
		\end{tabular}\label{table4}
	\end{table}
\end{center}

Firstly we compare the complexity and the time consumption of CSE and QSE. The comparison results are shown in Table \ref{table5}.
The main factor that affects the complexity of CSE are the number of path constraints.
The main factor that affects the complexity of QSE is the number of subspace divisions. Table \ref{table5} shows that the complexity of QSE is less than that of CSE. We also compare the actual time consumption of CSE and QSE. The tool to realize CSE is JDart \cite{2016JDart}, which supports the z3 constraint solver \cite{2012Solving}. In most cases, the time consumption of QSE is also smaller than that of CSE.

\begin{center}
	\begin{table}
		\centering
		\caption{The comparison of complexity and time consumption of CSE and QSE.}
		\begin{tabular}{ccccc}\hline
			\multicolumn{1}{c}{\multirow{3}{*}{Program}} & \multicolumn{2}{c}{CSE}  & \multicolumn{2}{c}{QSE} \\
			\cline{2-5}
			& number of & \multicolumn{1}{c}{\multirow{2}{*}{time/s}} & number of & \multicolumn{1}{c}{\multirow{2}{*}{time/s}} \\
			& path constraints & & subspace divisions & \\
			\hline
			dart & 4 & 0.48 & 3 & 0.45 \\
			power & 11 & 1.32 & 7 & 1.05 \\
			stat & 3 & 0.36 & 2 & 0.3 \\
			tcas & 5 & 0.6 & 4 & 0.6 \\
			early & 2 & 0.24 & 1 & 0.15 \\
			basic00181 & 3 & 0.36 & 2 & 0.3 \\
			snp3-ok & 1 & 0.12 & 1 & 0.15 \\
			CWE789 & 6 & 0.72 & 3 & 0.45 \\
			\hline
		\end{tabular}\label{table5}
	\end{table}
\end{center}

We also show the impact of test case space on program branch coverage. In the example given in Section \ref{sec412}, three qubits are used for each variable. In fact, more or fewer qubits can affect the performance of QSE. Too few qubits make it impossible for QSE to cover all branches. Consider the more extreme case: there are 4 branches in the program, but only 1 qubit is used to store variables, i.e., there are only 2 test cases in the test case space. Such a test case space is unlikely to cover all branches. Isn't the more qubits used, the better? No. Too many qubits will increase the difficulty of QSE, and lead to the waste of quantum resources. Therefore, the smallest number of qubits that can cover all branches is the best choice. Fig \ref{fig35} shows the relationship between the number of qubits used by variables in the three programs in Table \ref{table5} and the program branch coverage. The best numbers of qubits for the three programs are 2, 4 and 5 respectively.

\begin{figure}[htbp]
	\centering
	\includegraphics[scale=0.7]{zhexian.pdf}
	\caption{The relationship between the number of qubits and branch coverage}
	\label{fig35}
\end{figure}

\section{Conclusion}
This paper proposes a quantum symbolic execution for the first time to generate high-coverage test cases. It is completely different from not only classical symbolic executions, but also quantum debugging schemes. QSE divides the test case space into subsets according to the conditional statements in the debugged program, and a subset contains all test cases that can test the same program branch. QSE not only provides a possible way to debug quantum programs, but also avoids the difficult problem of solving constraints in classical symbolic execution, which obviously reduces the difficulty and improves the efficiency of the work.\\

\noindent\textbf{Funding} This work is supported by the National Natural Science Foundation of China under Grants No.61502016.

\noindent\textbf{Data availability} All data generated or analysed during this study are included in this article.


text:
\section{Introduction}\label{sec:intro}

We consider the initial value problem for a non-linear heat equation of the form
\begin{equ}\label{eq:PDE}
\begin{cases}
\partial_t u = \Delta u + B(u, Du) + P(u) \quad &\text{ on } [0,T]\times \mathbb{T}^d
\\
u(0,\cdot) = u_0(\cdot) \in C^\infty(\mathbb{T}^d,E)\;,
\end{cases}
\end{equ}
where $\mathbb{T}^d = \mathbb{R}^d/2\pi\mathbb{Z}^d$ is the $d$-dimensional torus,
$E$ is a vector space (over $\mathbb{R}$) of dimension $2\leq \dim(E) < \infty$, $B\colon E\times E^d\to E$ is a bilinear map, $Du = (\partial_1 u,\ldots, \partial_d u)$, and $P \colon E\to E$ is a polynomial of degree at most $3$.
In what follows, we assume $B$ is \textit{not a total derivative}, i.e.,
if we write $B$ for $y=(y_1,\ldots, y_d)\in E^d$ as
\begin{equ}
B(\cdot,y) = B_1(\cdot,y_1)+\ldots + B_d(\cdot,y_d)\;,
\end{equ}
where $B_i\colon E\times E\to E$ is bilinear, then we assume that $B_i$ is not symmetric for some $1\leq i\leq d$.
We note that $B_i$ is symmetric if and only if there exists a bilinear map $\tilde B_i\colon E\times E\to E$ such that $\partial_i \tilde B_i(u,u) = B_i(u,\partial_i u)$ for all smooth $u$.

It is easy to show that, for $\eta>-\frac12$, a solution $u$ to~\eqref{eq:PDE} exists for $T>0$ sufficiently small depending (polynomially) on $|u_0|_{\CC^\eta}$, where $\CC^\eta= B^{\eta}_{\infty,\infty}$ is the H\"older--Besov space of regularity $\eta$ (see Section~\ref{subsec:Besov} for a definition of $B^\alpha_{p,q}$).
Furthermore, the map $\CC^\eta \ni u_0\mapsto u$ is locally Lipschitz once the target space is equipped with a suitable norm and $T$ is taken sufficiently small on each ball in $\CC^\eta$.
(If each $B_i$ were symmetric, this would hold for $\eta>-1$.)

The goal of this article is to prove a corresponding local ill-posedness result for a family of function spaces that carry sufficiently irregular Gaussian fields.
Leaving precise definitions for later, the main result of this article can be stated as follows.

\begin{theorem}\label{thm:main_informal}
Suppose that $X$ is an $E$-valued Gaussian Fourier series (GFS) on $\mathbb{T}^d$ whose Fourier truncations $\{X^N\}_{N\geq 1}$ satisfy Assumption~\ref{assump:GFS} below.
Then there exists another $E$-valued GFS $Y$, defined on a larger probability space, such that $Y\stackrel{\mbox{\tiny law}}{=} X$ and, for every $\delta>0$,
\begin{equ}
\lim_{N\to\infty}\mathbb{P}\Big[\sup_{t\in [0,\delta]} \Big|\int_{\mathbb{T}^d}u_t(x)\mathop{}\!\mathrm{d} x\Big| > \delta^{-1}\Big] = 1\;,
\end{equ}
where $u$ is the solution to~\eqref{eq:PDE} with $u_0=X^N+Y^N$.
\end{theorem}

We formulate a more general and precise statement in Theorem~\ref{thm:main} below.
See the end of Section~\ref{sec:prelim} for a description of the proof and of the structure of the article.
The definition of an $E$-valued GFS is given in Section~\ref{subsec:GFS}.

\begin{remark}
The Gaussian free field $X$ on $\mathbb{T}^d$ with $\mathbb{E}|X_k|^2 = |k|^{-2}$ for $k\neq 0$ (see e.g.~\cite{Sheffield_GFF}) is a GFS (for any $d\geq 1$) and $X$ satisfies
Assumption~\ref{assump:GFS} for $d=3$ (but not other values of $d$).
\end{remark}

There is considerable interest in studying partial differential equations (PDEs) with random initial conditions in connection to local and global well-posedness;
for dispersive PDEs, see for instance~\cite{Bourgain94, Burq_Tzvetkov_08,Oh_Pocovnicu_16,Pocovnicu17} and the review article~\cite{BOP19}; for recent work on parabolic PDEs, see~\cite{Sourav_flow, CCHS22, Hairer_Le_Rosati_22}.
Furthermore, there have been many developments in the past decade in the study of \textit{singular stochastic} PDEs with both parabolic~\cite{Hairer14,GIP15,BCCH21} and dispersive~\cite{GKO18,GKOT21,Tolomeo21} dynamics, for which it is often important to understand the effect of irregularities of (random) initial condition.

In~\cite{Sourav_flow,CCHS22}, it is shown that~\eqref{eq:PDE} is locally \textit{well-posed}\footnote{Strictly speaking, only the DeTurck--Yang--Mills heat flow, which is a special form of~\eqref{eq:PDE}, was considered in~\cite{Sourav_flow,CCHS22} but the methods therein apply to the general form of~\eqref{eq:PDE}; furthermore, only mollifier approximations were considered in~\cite{CCHS22},
but the methods apply to Fourier truncations.}
for the GFF $X$ on $\mathbb{T}^3$, in the sense that, if $u_0 = X^N$, then $u$ converges in probability as $N\to\infty$ to a continuous process with values in $\CC^{\eta}$ for $\eta<-1/2$, at least over short random time intervals; we discuss these works in more detail at the end of this section.
Theorem~\ref{thm:main_informal} therefore shows the importance of taking precisely the GFF $X$ in these works, rather than another Gaussian field which has the same regularity as $X$ when measured in any normed space.
We note that $Y$ in Theorem~\ref{thm:main_informal} can therefore clearly \textit{not} be taken independent of $X$.

We now state a corollary of Theorem~\ref{thm:main_informal} and of the construction of $Y$ which elaborates on this last point and is of analytic interest.
Consider a Banach space $(\mathcal{I},\|\cdot\|)$ of distributions with (continuous) inclusions $C^\infty\subset \mathcal{I} \subset \mathcal{S}'(\mathbb{T}^d,\mathbb{R})$.
Let
\begin{equ}
(\hat\mathcal{I},\|\cdot\|)\;,\qquad \hat\mathcal{I}\subset \mathcal{S}'(\mathbb{T}^d,E)\;,
\end{equ}
denote the Banach space of all $E$-valued distributions of the form $\sum_{a\in A} x^aT^a$, where each $x^a\in \mathcal{I}$ and $\{T^a\}_{a\in A}$ is some fixed basis of $E$, with norm $\|\sum_{a\in A} x^aT^a\| \eqdef \sum_a \|x^a\|$.
We say that there is norm inflation for~\eqref{eq:PDE} at $x\in \hat\mathcal{I}$ if, for every $\delta>0$, there exists a solution $u$ to~\eqref{eq:PDE} such that
\begin{equ}\label{eq:norm_inflation}
\|x-u_0\|<\delta\qquad \text{ and } \qquad \Big|\int_{\mathbb{T}^d} u_t(x)\mathop{}\!\mathrm{d} x\Big|> \delta^{-1}\;.
\end{equ}
This notion of norm inflation is slightly stronger than the usual one introduced by Christ--Colliander--Tao~\cite{CCT03}
for which only $x=0$ and $\|u_t\| > \delta^{-1}$ are considered in~\eqref{eq:norm_inflation}.
Norm inflation (in the sense that $\|u_t\| > \delta^{-1}$) at arbitrary points were studied by Xia~\cite{Xia15}, and Oh~\cite{Oh17} showed that, for the cubic non-linear Schr\"odinger equation, there is norm inflation at every point in negative Sobolev spaces at and below the critical scaling.

Norm inflation captures a strong form of ill-posedness of~\eqref{eq:PDE}:~\eqref{eq:norm_inflation} in particular shows that the solution map $C^\infty\ni u_0 \mapsto u\in C([0,T],\mathcal{S}')$ is discontinuous at $x$ in $\hat\mathcal{I}$, even locally in time.
See~\cite{Iwabuchi_Ogawa_15,Carles_Kappeler_17,Oh_Wang_18, Kishimoto19} and~\cite{BP08,Cheskidov_Dai_14, Molinet_Tayachi_15} where norm inflation of various types is shown for dispersive and parabolic PDEs respectively.

Consider now a family of non-negative numbers $\sigma^2 = \{\sigma^2(k)\}_{k\in\mathbb{Z}^d}$.
We say that $\mathcal{I}$ \textit{carries the GFS with variances $\sigma^2$} if
\begin{equ}\label{eq:GFS_conv}
\lim_{N\to\infty}\|X-X^N\| = 0 \quad \text{in probability}
\end{equ}
whenever $\{X_k\}_{k\in\mathbb{Z}^d}$ is a family of (complex) Gaussian random variables such that $\mathbb{E}|X_k|^2=\sigma^2(k)$ and $X^N \eqdef \sum_{|k|\leq N} X_k e^{\mathbf{i}\scal{k,\cdot}}$
is a real GFS for every $N\geq 1$ (see Definition~\ref{def:GFS}), and
where $X$ is a real GFS.
\begin{example}
For $d=1$ and $\eta<-\frac12$, $\mathcal{I}\eqdef\CC^\eta$ carries the GFS with variances $\sigma^2\equiv 1$, which corresponds to white noise on $\mathbb{T}^1$ and which satisfies Assumption~\ref{assump:GFS}.
\end{example}

\begin{corollary}\label{cor:norm_inflation}
Suppose $\mathcal{I}$ carries the GFS with variances $\sigma^2= \{\sigma^2(k)\}_{k\in\mathbb{Z}^d}$ satisfying the bounds in Assumption~\ref{assump:GFS}.
Suppose that the law of $X$ in~\eqref{eq:GFS_conv} has full support in $\mathcal{I}$.
Then there is norm inflation for~\eqref{eq:PDE} at every point in $\hat\mathcal{I}$.
\end{corollary}
The proof of Corollary~\ref{cor:norm_inflation} is given at the end of Section~\ref{subsec:main_results}.
We note that a simple criterion for the law of $X$ to have full support in $\mathcal{I}$ is that every $\sigma^2(k)>0$ and that the smooth functions are dense in $\mathcal{I}$ (see Remark~\ref{rem:full_support}).

Note that the Besov space $\CC^{-1/2}=B^{-1/2}_{\infty,\infty}$ is an `endpoint' case since~\eqref{eq:PDE} is well-posed on $\CC^{\eta}$ for every $\eta>-\frac12$.
In Proposition~\ref{prop:Besov_reg} below, we show that $\CC^{-1/2}$
carries a GFS with variances $\sigma^2$ satisfying the bounds in Assumption~\ref{assump:GFS}.
Corollary~\ref{cor:norm_inflation}, together with Remark~\ref{rem:full_support} and Proposition~\ref{prop:Besov_reg}, therefore gives a probabilistic proof of the following result, which appears to be folklore.
\begin{corollary}\label{cor:endpoint}
There is norm inflation for~\eqref{eq:PDE} at every point in $\CC^{-1/2}(\mathbb{T}^d,E)$.
\end{corollary}
We remark that $\CC^{-1}$ is the scaling critical space for~\eqref{eq:PDE}, so our results show ill-posedness above scaling criticality.
Norm inflation of the same type as~\eqref{eq:norm_inflation} in $\CC^{-2/3}$
was shown for the cubic non-linear heat equation (NLH) $\partial_t u= \Delta u \pm u^3$ by the author and Oh--Wang~\cite{COW22}
using a Fourier analytic approach taking its roots in~\cite{Iwabuchi_Ogawa_15, Oh17, Kishimoto19}.
The method of~\cite{COW22} can likely be adapted to yield norm inflation for~\eqref{eq:PDE} in $\CC^{-1/2}$, and we expect that the methods of this article can similarly be adapted to show (probabilistic) norm inflation for the cubic NLH.
We remark, however, that our method appears not to reach
$B^{-1/2}_{\infty,q}$ for $q<\infty$ (see Proposition~\ref{prop:Besov_reg}\ref{pt:<-1}),
while the method in~\cite{COW22} for the cubic NLH does extend to $B^{-2/3}_{\infty,q}$ for $q>3$.

Corollary~\ref{cor:endpoint} should be contrasted with the 3D Navier--Stokes equations (NSE) for which norm inflation (in a slightly weaker sense than~\eqref{eq:norm_inflation}) was shown in the scaling critical space $\CC^{-1}$ by Bourgain--Pavlovi{\'c}~\cite{BP08} and which is locally well-posed in $\CC^\eta$ for $\eta>-1$ (the main difference with~\eqref{eq:PDE} is that the non-linearity in NSE \textit{is} a total derivative).
In fact, norm inflation for NSE has been shown in $B^{-1}_{\infty,q}$ for $q>2$ by Yoneda~\cite{Yoneda10} and for all $q\in [1,\infty]$ by Wang~\cite{Wang15}.
We remark that our analysis (and generality of results) relies on the fact that any space carrying $X$ as in Theorem~\ref{thm:main_informal}, in particular $\CC^{-1/2}$, is scaling \textit{subcritical}.
See also~\cite{Choffrut_Pocovnicu_18} and~\cite{Forlano_Okamoto_20} where norm inflation is established for the fractional non-linear Schr{\"o}dinger and non-linear wave equations respectively above the critical scaling.

We finish the introduction by describing one of the motivations for this study.
The author and Chandra--Hairer--Shen in~\cite{CCHS20,CCHS22} analysed the stochastic quantisation equations of the Yang--Mills (YM) and YM--Higgs (YMH) theories on $\mathbb{T}^2$ and $\mathbb{T}^3$ respectively (see also the review article~\cite{Chevyrev22_YM}).
In~\cite{CCHS22}, the authors in particular constructed a candidate state space for the YM(H) measure on $\mathbb{T}^3$.
A related construction was also proposed by Cao--Chatterjee~\cite{Sourav_state,Sourav_flow}.
An ingredient in the construction of~\cite{CCHS22} is a metric space $\mathcal{I}$ of distributions such that the solution map of the
DeTurck--YM(H) heat flow (or of any equation of the form~\eqref{eq:PDE}, see~\cite[Prop.~2.9]{CCHS22}) extends continuously locally in time to $\mathcal{I}$
and such that suitable smooth approximations of the GFF on $\mathbb{T}^3$ converge in $\mathcal{I}$; essentially the same space was identified in~\cite{Sourav_flow}.
The works~\cite{Sourav_flow,CCHS22} thus
provide a local \textit{well-posedness} result for~\eqref{eq:PDE} with the GFF on $\mathbb{T}^3$ as initial condition.

In contrast, our results provide a corresponding \textit{ill-posedness} result. Indeed, the GFF on $\mathbb{T}^3$ satisfies Assumption~\ref{assump:GFS} and the
DeTurck--YM(H) heat flow is an example of equation~\eqref{eq:PDE} covered by our results (see Examples~\ref{ex:YM_flow} and~\ref{ex:YMH_flow}).
Theorem~\ref{thm:main_informal} and Corollary~\ref{cor:norm_inflation} therefore imply
that the metric space $\mathcal{I}$ in~\cite{CCHS22} is not a vector space, and, more importantly, that this situation is unavoidable.
That is, there exists no Banach space
of distributions which carries the GFF on $\mathbb{T}^3$ and admits a continuous extension of the DeTurck--YM(H) heat flow.
Since the 3D YM measure (at least in a regular gauge) is expected to be a perturbation of the standard 3D GFF,
this suggests that every sensible state space for the 3D YM(H) measure is necessarily non-linear (cf.~\cite{Chevyrev19YM,CCHS20} in which natural \textit{linear} state spaces for the 2D YM measure were constructed).

A non-existence result in the same spirit was shown for iterated integrals of Brownian paths by Lyons~\cite{TerryPath} (see also~\cite[Prop.~1.29]{Lyons07} and~\cite[Prop.~1.1]{FrizHairer20});
the construction of the field $Y$ in Theorem~\ref{thm:main_informal} is inspired by a similar one in~\cite{TerryPath}.

\section{Preliminaries and main result}\label{sec:prelim}

\subsection{Fourier series and Besov spaces}
\label{subsec:Besov}

We recall the definition of Besov spaces that we use later.
Thorough references on this topic include~\cite{BookChemin,Triebel};
see also~\cite[Appendix~A]{GIP15} and~\cite[Appendix~A]{MW17_Phi43} for concise summaries.
Let $\chi_{-1},\chi \in C^\infty(\mathbb{R}^d,R)$ take values in $[0,1]$ such that $\supp \chi_{-1}\subset B_0(4/3)$ and $\supp \chi\subset B_0(8/3)\setminus B_0(3/4)$, where $B_x(r)=\{y\in\mathbb{R}^d\,:\,|x-y|\leq r\}$, and
$
\sum_{\ell=-1}^\infty \chi_\ell = 1
$,
where $\chi_\ell \eqdef \chi(2^{-\ell}\cdot)$ for $\ell\geq 0$.

Let $\mathbf{i}=\sqrt{-1}$ and, for $k\in\mathbb{Z}^d$, let $e_k = e^{\mathbf{i} \scal{k,\cdot}}\in C^\infty(\mathbb{T}^d)$ denote the orthonormal Fourier basis; here and below, we equip $\mathbb{T}^d = \mathbb{R}^d/2\pi\mathbb{Z}^d$ with the normalised Lebesgue measure of total mass $1$.
For $f\in \mathcal{S}'(\mathbb{T}^d)$ denote $f_k = \scal{f,e_k} = \int_{\mathbb{T}^d} f(x) e_{-k}(x)\mathop{}\!\mathrm{d} x$
and, for
$\ell\geq -1$, define
$\Delta_\ell f\in C^\infty(\mathbb{T}^d)$ by
\begin{equ}
\Delta_\ell f = \sum_{k\in\mathbb{Z}^d} \chi_\ell(k) f_k e_k \;.
\end{equ}
For $s\in \mathbb{R}$ and $1\leq p,q \leq \infty$, we define the Besov norm of $f\in C^\infty(\mathbb{T}^d)$ by
\begin{equ}
|f|_{B^\alpha_{p,q}} \eqdef  \Big(\sum_{\ell\geq -1} 2^{\alpha \ell q}|\Delta_\ell f|_{L^p(\mathbb{T}^d)}^q\Big)^{1/q} < \infty\;.
\end{equ}
We let $B^\alpha_{p,q}$ be the space obtained by completing $C^\infty(\mathbb{T}^d)$ with this norm, which one can identify with a subspace of distributions $\mathcal{S}'(\mathbb{T}^d)$.
We use the shorthand $\CC^\alpha = B^\alpha_{\infty,\infty}$.

We let $\CP_t = e^{t\Delta}\colon \mathcal{S}'(\mathbb{T}^d) \to C^\infty(\mathbb{T}^d)$ for $t>0$ denote the heat flow
(with $\CP_0=\mathrm{id}$ as usual).
In particular, $\CP_t e_k = e^{-|k|^2 t} e_k$ for all $k\in\mathbb{Z}^d$.
We denote by $\Pi_N\colon \mathcal{S}'(\mathbb{T}^d) \to C^\infty(\mathbb{T}^d)$ the Fourier truncation operator
\begin{equ}
\Pi_N\xi = \sum_{|k|\leq N} \xi_k e_k\;.
\end{equ}

\subsection{Assumptions on the equation}\label{subsec:assumps_equ}

Consider $E,B,P$ as in Section~\ref{sec:intro}.
Without loss of generality, we will assume $B_1$ is not symmetric
and henceforth make the following assumption.

\begin{assumption}\label{assump:not-deriv}
Fix a basis $\{T^a\}_{a\in A}$ of $E$.
There exist $a\neq b \in A$ such that $B_1(T^a,T^b) \neq B_1(T^b,T^a)$.
\end{assumption}

The next two examples show that our results cover the DeTurck--YM(H) heat flow.

\begin{example}[Yang--Mills heat flow with DeTurck term]\label{ex:YM_flow}
Let $E=\mathfrak{g}^d$, where $\mathfrak{g}$ is a non-Abelian finite-dimensional Lie algebra with Lie bracket $[\cdot,\cdot]$.
We write elements of $E$ as $X=\sum_{j=1}^d X^j\mathop{}\!\mathrm{d} x^j$, $X^j\in\mathfrak{g}$.
The DeTurck--YM heat flow is
\begin{equ}
\partial_t X^j = \Delta X^j + \sum_{i=1}^d[X^i,2\partial_i X^j - \partial_j X^i + [X^i,X^j]]\;,\quad 1\leq j\leq d\;.\label{eq:DYM}\tag{DYM}
\end{equ}
To bring this into the form~\eqref{eq:PDE},
we write elements of $E^d$ as $(\partial_1 Y,\ldots, \partial_d Y)\in E^d$, $\partial_i Y = \sum_j \partial_i Y^j\mathop{}\!\mathrm{d} x^j \in E$, $\partial_i Y^j \in \mathfrak{g}$.
Define
$B\colon E\times E^d\to E$ by
\begin{equ}
B(X,Y)=\sum_{i,j=1}^d[X^i, 2\partial_i Y^j -\partial_j Y^i] \mathop{}\!\mathrm{d} x^j\;,
\end{equ}
so that the corresponding $B_i\colon E\times E\to E$ is
\begin{equ}
B_i(X,Y) = \sum_{j=1}^d  [X^i,2Y^j - \delta_{i,j} Y^j ]\mathop{}\!\mathrm{d} x^j\;.
\end{equ}
Then $B_i$ is not symmetric for every $1\leq i\leq d$
since $B_i(X,Y) = [X^i, Y^i]\mathop{}\!\mathrm{d} x^i + \sum_{j\neq i} c_j\mathop{}\!\mathrm{d} x^j$ for some $c_j\in\mathfrak{g}$ and $[X^i, Y^i]$ is \textit{anti-symmetric} and non-zero for some $X,Y\in E$ since $\mathfrak{g}$ is non-Abelian.
Equation~\eqref{eq:DYM} therefore satisfies Assumption~\ref{assump:not-deriv}.
\end{example}

\begin{example}\label{ex:YMH_flow}
The same example as above shows that the DeTurck--YM--Higgs heat flow (with or without the cube of the Higgs field, see~\cite[Eq.~(1.9) resp.~(2.2)]{CCHS22})
satisfies Assumption~\ref{assump:not-deriv}.
\end{example}

\begin{example}
If $\dim(E)=1$, then Assumption~\ref{assump:not-deriv} is never satisfied.
\end{example}

\subsection{Gaussian Fourier series}\label{subsec:GFS}

\begin{definition}\label{def:GFS}
A \textit{complex Gaussian Fourier series (GFS)} is an $\mathcal{S}'(\mathbb{T}^d,\C)$-valued random variable $X$ such that $\{X_k\}_{k\in \mathbb{Z}^d}$ is a family of complex Gaussians
with $\mathbb{E} X_k^2 = 0$ for all $k \neq 0$ and $X_k$ and $X_n$ are independent for all $k,n\in\mathbb{Z}^d$ such that $k\notin \{-n,n\}$.
Here, as before, we denote $X_k\eqdef \scal{X,e_k}$.
A \textit{real GFS} is a complex GFS
$X$ such that $X_{-k}=\overline X_k$ for all $k\in \mathbb{Z}^d$.
An \textit{$E$-valued GFS} is an $\mathcal{S}'(\mathbb{T}^d,E)$-valued random variable such that $X = \sum_{a\in A}X^aT^a$ with $\{X^a\}_{a\in A}$ a family of independent real GFSs.
\end{definition}
The sequence $\{\mathbb{E}|X_k|^2\}_{k\in \mathbb{Z}^d}$ uniquely determines the law of a real GFS $X$.
Conversely, a real GFS can be constructed from any sequence $\{\sigma^2(k)\}_{k\in \mathbb{Z}^d}$ with polynomial growth by taking a set $\mathfrak{K}\subset \mathbb{Z}^d$ such that $\mathfrak{K}\cap(-\mathfrak{K}) = {\centernot\Circle}$ and $\mathfrak{K}\cup (-\mathfrak{K}) = \mathbb{Z}^d\setminus\{0\}$,
defining $\{X_{k}\}_{k\in \mathfrak{K}}$ as a family of independent complex Gaussians with $\mathbb{E}|X_k|^2=\sigma^2(k)$ and $\mathbb{E} X_k^2=0$, and setting $X_{-k}=\overline X_k$ for all $k \in \mathfrak{K}$,
and $X_0$ as a real Gaussian with $\mathbb{E}|X_0|^2=\sigma^2(0)$.
\begin{assumption}\label{assump:GFS}
Suppose $\{X^N\}_{N\geq 1}$ is a family of $E$-valued GFSs such that\footnote{For $k\in\mathbb{Z}^d$, we use the shorthand $\log k=\log |k|$ and $k^\gamma=|k|^\gamma$.}
\begin{equ}
C^{-1} k^{-d+1}|\log k|^{-1}|\log\log k|^{-1} \leq \sigma^2_N(k) \eqdef \mathbb{E}|X^N_k|^2 \leq C k^{-d+1}\;,
\end{equ}
for all $k_0 \leq |k|\leq N$, and $\sigma^2_N(k) \leq C$ for $0\leq |k|<k_0$, where $k_0,C>0$
are independent of $N$,
and $\sigma^2(k)=0$ for $|k|>N$.
\end{assumption}
\begin{example}
Let $X$ be an $E$-valued GFS with $\mathbb{E}|X_k|^2 = k^{-d+1}$ for $k\neq 0$.
Then $X^N\eqdef \Pi_N X$ satisfies Assumption~\ref{assump:GFS}.
\end{example}
\begin{remark}
The upper bound $\sigma^2(k) \leq C k^{-d+1}$ in Assumption~\ref{assump:GFS} can be relaxed to $\sigma^2(k) \leq C k^\gamma$ for $\gamma\in (-d+1-\eps,-d+1]$ for some sufficiently small $\eps>0$ without changing the statement of Theorem~\ref{thm:main} below.
We restrict to $\gamma=-d+1$ only for simplicity.
\end{remark}
\begin{remark}\label{rem:Besov_moments}
By a standard Kolmogorov-type argument (similar to and simpler than the proof of Lemma~\ref{lem:non_zero_modes}),
the upper bound in Assumption~\ref{assump:GFS} implies that, for every $\eta<-\frac12$,
$|X^N|_{\CC^\eta}$ has moments of all orders bounded uniformly in $N$.
\end{remark}
\begin{remark}
The logarithmic factors in Assumption~\ref{assump:GFS} are considered to allow for endpoint cases; we will see in Proposition~\ref{prop:Besov_reg} that they allow for $X^N \eqdef \Pi_N X$ to converge to a GFS $X$ in $\CC^{-1/2}$, which would not be the case without these factors.
This allows us to show norm inflation for~\eqref{eq:PDE} in $\CC^{-1/2}$ (Corollary~\ref{cor:endpoint}).
If these logarithmic factors are dropped, then
$|\Pi_0 u_T| > c\log\log\log N$
in~\eqref{eq:prob_norm_inflation} can be replaced by $\inf_{t\in [N^{-2+\eps},T]}|\Pi_0 u_t| > c\log N$ for any $\eps>0$.
\end{remark}
\subsection{Main result}\label{subsec:main_results}

\begin{definition}
For a distribution $\xi\in\mathcal{S}'(\mathbb{T}^d,\C)$, we define $\CR\xi \in \mathcal{S}'(\mathbb{T}^d,\C)$ as the unique distribution such that, for all $k\in\mathbb{Z}^d$,
\begin{equ}
(\CR\xi)_k\eqdef  \scal{\CR\xi,e_k}
=
\begin{cases}
\mathbf{i}\xi_k &\quad \textnormal{ if } k_1>0\;,\\
-\mathbf{i}\xi_{k} &\quad \textnormal{ if } k_1<0\;,\\
\xi_k &\quad \textnormal{ if } k_1=0\;.
\end{cases}
\end{equ}
\end{definition}
If $\xi$ satisfies the reality condition $\xi_{-n}=\overline{\xi_n}$, then so does $\CR\xi$.
Furthermore, if $X$ is a real GFS, then so is $\CR X$ and $\CR X\stackrel{\mbox{\tiny law}}{=} X$.
Recall now Assumption~\ref{assump:not-deriv}.

\begin{definition}\label{def:Y}
For an $E$-valued GFS $X$, we define another $E$-valued GFS $Y=\sum_{c\in A} Y^cT^c$ by setting, for each $c\neq b$, $Y^c \stackrel{\mbox{\tiny law}}{=} X^c$ and independent of $X$, and setting $Y^b = \CR X^a$.
\end{definition}
Note that $Y$ can be defined on a larger probability space than that of $X$ and that $Y\stackrel{\mbox{\tiny law}}{=} X$ by construction. The following is the main result of this article.
\begin{theorem}\label{thm:main}
Suppose $B$ satisfies Assumption~\ref{assump:not-deriv} and $\{X^N\}_{N\geq 1}$ satisfies Assumption~\ref{assump:GFS}.
Define $Y^N$ as in Definition~\ref{def:Y}, $u_0 \eqdef X^N + Y^N$, and let $u$ be the solution to~\eqref{eq:PDE}.
Then there exist $M,c>0$ such that, for every $\eps>0$, if we set $T = (\log N)^{-M}$ for $N\geq 2$,
\begin{equ}\label{eq:prob_norm_inflation}
\lim_{N\to\infty}\mathbb{P}[u \textnormal{ exists on } [0,T]\times \mathbb{T}^d\;\;\&\;\; |\Pi_0 u_T| > c\log\log\log N] = 1\;.
\end{equ}
\end{theorem}

The proof of Theorem~\ref{thm:main} is given in Section~\ref{sec:proof_thm}.
Before continuing, we note that Theorem~\ref{thm:main} clearly proves Theorem~\ref{thm:main_informal}.
We can now also give the proof of Corollary~\ref{cor:norm_inflation}.

\begin{proof}[Proof of Corollary~\ref{cor:norm_inflation}]
Let $X$ be an $E$-valued GFS with $\mathbb{E}|X^a_k|^2 = \sigma^2(k)$ for every $a\in A$,
and let $Y$ be defined as in Definition~\ref{def:Y}.
It follows from the assumption that $\mathcal{I}$ carries the GFS with variances $\sigma^2(k)$ that the law of $Z\eqdef X+Y$ is a Gaussian measure on the Banach space $\hat\mathcal{I}$
and that
\begin{equ}\label{eq:Z_conv_prob}
\lim_{N\to\infty}\|Z^N-Z\| = 0\quad  \text{in probability.}
\end{equ}
By the assumption that the law of $X^a$ has full support in $\mathcal{I}$, it follows that $Z$ has full support in $\hat\mathcal{I}$.
(One only needs to be careful about the component $T^b$ for which $Z^b = X^b + \CR X^a$ since this is not independent of $Z^a = X^a+Y^a$. However, since $X^b$ is independent of $\{X^a\}_{a\neq b}$ and of $Y$, we indeed obtain that the law of $Z$ has full support in $\hat\mathcal{I}$.)

Now, for every $x\in\hat\mathcal{I}$ and $\delta>0$, one has $\eps\eqdef \mathbb{P}[\|Z-x\| < \delta/2]>0$.
Furthermore,
it follows from~\eqref{eq:Z_conv_prob} that, for all $N$ sufficiently large,
\begin{equ}
\mathbb{P}[\|Z^N-x\| < \delta]>\eps/2\;.
\end{equ}
The conclusion follows from Theorem~\ref{thm:main} (or, more simply, Theorem~\ref{thm:main_informal}).
\end{proof}

\begin{remark}\label{rem:full_support}
In the context of Corollary~\ref{cor:norm_inflation},
a sufficient condition for the law of the real GFS $X$ in~\eqref{eq:GFS_conv} to have full support in $\mathcal{I}$ is that $\sigma^2(k)>0$ for all $k\in\mathbb{Z}^d$ and that the smooth functions are dense in $\mathcal{I}$.
Indeed, the condition $\sigma^2(k)>0$ implies that the Cameron--Martin space of $X$ contains all trigonometric functions, which are dense in the smooth functions.
\end{remark}

We briefly outline the proof of Theorem~\ref{thm:main} and the structure of the rest of the article.
Dropping the reference to $N$,
in Section~\ref{sec:decor} we show that all the quadratic terms in $B(\CP_t(X+Y),D\CP_t(X+Y))$ are controlled uniformly in $N\geq 1$ and $t\in(0,1)$ \textit{except} for the spatial mean
\begin{equ}
J \eqdef \Pi_0 [B_1(\CP_t X^aT^a,\partial_1\CP_tY^bT^b)+B_1(\CP_t Y^bT^b,\partial_1 \CP_t X^aT^a))]\;.
\end{equ}
In Section~\ref{sec:cor} we show that $J - \mathbb{E} J$ is controlled uniformly in $N,t$, together with an upper bound $\mathbb{E} J\leq C N^2\wedge t^{-1}$ uniformly in $N,t$ and a lower bound as $t\to0$ and $N>t^{-1/2}$
\begin{equ}\label{eq:heuristic}
t^{-1}|\log t|^{-1}(\log|\log t|)^{-1}\leq C \mathbb{E} J\;.
\end{equ}
Finally, in Section~\ref{sec:determin},
we show that the solution $u_t$ to~\eqref{eq:PDE}
tracks closely the first Picard iterate $\CP_t u_0 + \int_0^t B(\CP_s u_0,D\CP_s u_0)\mathop{}\!\mathrm{d} s$ at all times $t \leq (\log N)^{-M}$.
Since this first Picard iterates blows up like $\log \log \log N$ at time $t= (\log N)^{-M}$ due to~\eqref{eq:heuristic},
this allows us to conclude the proof of Theorem~\ref{thm:main} in Section~\ref{sec:proof_thm}.
In Appendix~\ref{app:GFS}, we give conditions under which the Besov space $B^{\alpha}_{\infty,q}$ for $\alpha\in\mathbb{R}$ and $q\in [1,\infty]$
carries the GFS with a specified covariance $\sigma^2$.

\section{Decorrelated terms}\label{sec:decor}

In the remainder of the article, we will use $x\lesssim y$ to denote that $x\leq Cy$ for some fixed proportionality constant $C>0$,
and likewise let
$x\asymp y$ to denote $C^{-1}x \leq y \leq Cx$.
We let $x \gg 1$ and $x\ll 1$ denote $x>C$ and $0<x<C^{-1}$ respectively for some sufficiently large fixed $C>0$.

In this section, we let $X$ and $Y$ be real GFSs such that $\mathbb{E} X_k Y_n = 0$ for all $k\neq -n$ and such that there exists $C>0$ such that, for all $k\in\mathbb{Z}^d$
\begin{equ}
\mathbb{E}|X_k|^2 + \mathbb{E}|Y_k|^2 \leq  C (|k|+1)^{-d+1}\;
\end{equ}
We will apply the results of this section to
the three cases $X=Y$, $\CR X=Y$, or $X$ and $Y$ are independent.
We record the following lemma, the proof of which is straightforward and we omit.

\begin{lemma}\label{lem:correlations}
Consider $m,n,\bar m,\bar n\in \mathbb{Z}^d$ with $m+n\neq 0$. Then
$\mathbb{E} X_mY_n X_{\bar m}Y_{\bar n} = 0$
unless $(-m,-n)=(\bar m,\bar n)$ or $(-m,-n)=(\bar n,\bar m)$.
\end{lemma}
Let $\pi_0 \xi = \xi - \Pi_0 \xi$ denote the projection onto the zero-mean distributions.
\begin{lemma}\label{lem:non_zero_modes}
Consider $1\leq i\leq d$, $\delta>1-\frac d4$ and $\beta <0$ such that $\beta+2(1-\delta) < 0$.
Then every moment of $\sup_{t\in (0,1)} t^{\delta}|\pi_0(\CP_t X \partial_i \CP_t Y)|_{\CC^\beta}$ is finite and depends only on $C,\delta,\beta$.
Furthermore, if $X$ and $Y$ are independent, then the same holds for $\sup_{t\in (0,1)} t^{\delta}|(\CP_t X \partial_i \CP_t Y)|_{\CC^\beta}$.
\end{lemma}

\begin{proof}
Let us denote $Z_t = t^\delta\CP_t X \partial_i \CP_t Y$ for $t\in (0,1]$ and
$Z_0=0$.
We will show that there exists $\kappa>0$ such that for all $p\geq 1$
\begin{equ}\label{eq:moment_bound}
\mathbb{E}|\pi_0(Z_u-Z_t)|^p_{\CC^\beta} \lesssim |u-t|^{\kappa p}
\end{equ}
uniformly over $0\leq t < u \leq 1$,
from which the first statement follows by Kolmogorov's continuity theorem~\cite[Thm.~A.10]{FV10}.
The second statement will be shown in a similar way.
It suffices to consider $t<u\leq 2t$.

For every $p\geq 1$ and $\ell\geq 0$,
\begin{equ}\label{eq:E1}
\mathbb{E} |\Delta_\ell \pi_0(Z_u-Z_t)|_{L^{2p}}^{2p}
= \int_{\mathbb{T}^d} \mathbb{E} |(\Delta_\ell \pi_0(Z_u-Z_t))(x)|^{2p} \mathop{}\!\mathrm{d} x\;.
\end{equ}
By equivalence of Gaussian moments,
the final integral is bounded above by a constant $C(p)>0$
times
\begin{equ}\label{eq:E2}
\int_{\mathbb{T}^d} (\mathbb{E} |(\Delta_\ell \pi_0(Z_u-Z_t))(x)|^2)^p \mathop{}\!\mathrm{d} x = \int_{\mathbb{T}^d} \Big|\mathbb{E} \Big(\sum_{k\neq 0} \chi_\ell(k)\mathbf{F}^k_{t,u} e_k(x)\Big)^2\Big|^p \mathop{}\!\mathrm{d} x\;,
\end{equ}
where $\mathbf{F}^k_{t,u}\eqdef\scal{Z_u-Z_t,e_k}$ is the $k$-th Fourier coefficient of $Z_u-Z_t$
\begin{equ}
\mathbf{F}^k_{t,u} =
\sum_{m+n=k} \psi_{t,u}(m^2+n^2) \mathbf{i} n_i
X_m Y_n\;,
\end{equ}
where
\begin{equ}
\psi_{t,u}(x) = u^\delta e^{- x u} - t^\delta e^{- x t}\;.
\end{equ}
For $0\neq k\neq -\bar k$, observe that $\mathbb{E} \mathbf{F}^k_{t,u} \mathbf{F}^{\bar k}_{t,u} = 0$
due to Lemma~\ref{lem:correlations}.
Hence
\begin{equ}
\mathbb{E} \Big(\sum_{k\neq 0} \chi_\ell(k)\mathbf{F}^k_{t,u} e_k(x)\Big)^2 = \sum_{k\neq 0}\chi_\ell(k)^2 \mathbb{E} |\mathbf{F}^k_{t,u}|^2\;.
\end{equ}
Again by Lemma~\ref{lem:correlations}, for $k\neq 0$,
\begin{equs}
\mathbb{E} |\mathbf{F}^k_{t,u}|^2 &= \sum_{m+n=k} \psi_{t,u}(m^2+n^2)^2
(n_i^2\mathbb{E} X_m Y_n X_{-m}Y_{-n} + n_im_i\mathbb{E} X_mY_nX_{-n}Y_{-m})
\\
&\lesssim \sum_{m+n=k} \psi_{t,u}(m^2+n^2)^2
n_i^2 (|m|+1)^{-d+1}(|n|+1)^{-d+1}\;.\label{eq:sum_F}
\end{equs}
Since $\delta\leq 1$, observe that, for $\kappa>0$ small, uniformly in $x\geq 1$ and $0<t<u\leq2t<1$,
\begin{equ}\label{eq:psi_bound}
\psi_{t,u}(x)^2 \lesssim
t^{2\delta} e^{-2x t}|t-u|^\kappa x^\kappa + e^{-2xu}|t-u|^{2\delta}
\lesssim
e^{-2xt}t^{2\delta-\kappa}|t-u|^\kappa x^\kappa
\lesssim |t-u|^\kappa x^{-2\delta+2\kappa}\;,
\end{equ}
where we used
that $e^{-x}x^p\lesssim 1$ for any $p>0$ in the final bound.

We split the sum~\eqref{eq:sum_F} into two parts with $|m| \leq 2|k|$ and $|m|>2|k|$.
The first part is bounded above by a multiple of
\begin{equ}
|t-u|^\kappa k^{-4\delta+4\kappa}
\sum_{1 \leq |m|\leq 2|k|}
m^{-d+1}|k-m|^{-d+3}
\lesssim
|t-u|^\kappa k^{-d+4+4\kappa-4\delta}\;,
\end{equ}
where we used~\eqref{eq:psi_bound} and
\begin{equ}
\sum_{1\leq |m|\leq|k|/2} m^{-d+1}|k-m|^{-d+3}
\asymp
\sum_{|k|/2\leq |m|\leq2|k|} m^{-d}|k-m|^{-d+3}
\asymp k^{-d+4}\;.
\end{equ}
The second part is bounded by a multiple of
\begin{equ}
|t-u|^\kappa
\sum_{|m|> 2|k|}
m^{-4\delta+4\kappa} m^{-2d+4}
\asymp |t-u|^\kappa k^{-4\delta+4\kappa+4-d}\;,
\end{equ}
where we again used~\eqref{eq:psi_bound} and the fact that $-4\delta+4\kappa-2d+4<-d$ for $\kappa>0$ small since $\delta>1-\frac d4$ by assumption.
In conclusion, $\mathbb{E} |\mathbf{F}^k_{t,u}|^2 \lesssim |t-u|^\kappa k^{-4\delta+4\kappa+4-d}$,
and thus
\begin{equ}\label{eq:E3}
\mathbb{E} \Big(\sum_{k\neq 0} \chi_\ell(k)\mathbf{F}^k_{t,u} e_k(x)\Big)^2 \lesssim
|t-u|^\kappa 2^{\ell (-4\delta +4\kappa+4)}\;.
\end{equ}
Consequently, by~\eqref{eq:E1},~\eqref{eq:E2}, and~\eqref{eq:E3},
\begin{equs}
\mathbb{E} |\pi_0(Z_u-Z_t)|_{B^{\beta}_{2p,2p}}^{2p} &= \sum_{\ell\geq -1}2^{2p\ell\beta} \mathbb{E}|\Delta_\ell \pi_0(Z_u-Z_t) |_{L^{2p}}^{2p}
\lesssim
|t-u|^{\kappa p}
2^{2p\ell\beta+\ell(4-4\delta +4\kappa)p}\;.
\end{equs}
Since $2\beta+4-4\delta<0$, we can take $\kappa>0$ sufficiently small such that the series is summable in $\ell$.
Since we can take $p$ arbitrarily large,~\eqref{eq:moment_bound} follows from the Besov embedding $B^{\alpha}_{p,q} \hookrightarrow B^{\alpha-d/p}_{\infty,q}$ (see, e.g.,~\cite[Lem.~A.2]{GIP15}), which completes the proof of the first statement.

For the second statement, since $\mathbb{E}\mathbf{F}^0_{t,u}\mathbf{F}^k_{t,u}=0$ for $k\neq 0$, it suffices to show
$\mathbb{E}|\mathbf{F}^0_{t,u}|^2 \lesssim |t-u|^\kappa$ uniformly in $0<t<u\leq 2t<1$.
If $X$ and $Y$ are independent, then clearly
$\mathbb{E} X_mY_n X_{\bar m}Y_{\bar n} = \mathbb{E} X_mX_{\bar m}\mathbb{E} Y_nY_{\bar n}$, and thus, for $\kappa>0$ small,
\begin{equ}
\mathbb{E} |\mathbf{F}^0_{t,u}|^2 = \sum_{m\in\mathbb{Z}^d} \psi_{t,u}(2m^2)^2
(m_i^2\mathbb{E} |X_m|^2 \mathbb{E} |Y_m|^2)
\lesssim \sum_{m\neq 0} \psi_{t,u}(2m^2)^2
m_i^2 m^{-2d+2} \lesssim |t-u|^\kappa\;,
\end{equ}
where the final bound follows from~\eqref{eq:psi_bound} and the fact that $-4\delta-2d+4<-d$.
\end{proof}

\section{Correlated terms}\label{sec:cor}

We now take  $\{X^N\}_{N \geq 1}$ satisfying Assumption~\ref{assump:GFS}.
We will drop $N$ from our notation, writing simply $X$ for $X^N$.
Recall that Assumption~\ref{assump:not-deriv} is in place.
We define $Z\colon [0,1]\to \mathbb{R}$ by
\begin{equ}
Z_t = \sum_{n_1>0} 2 e^{-2n^2t} n_1|X^a_n|^2\;.
\end{equ}
The importance of $Z_t$ is that, if $\xi\in C^\infty(\mathbb{T}^d,\mathbb{R})$ and $1\leq i\leq d$,
then
\begin{equs}
\Pi_0 (\xi \partial_i\CR \xi) &=
\sum_n \mathbf{i} n_i\xi_{-n}(\CR\xi)_{n}
=
\sum_{n_1>0}
(-n_i)
|\xi_n|^2
+ \sum_{n_1<0}
n_i
|\xi_n|^2
+ \sum_{n_1=0}
\mathbf{i} n_i
|\xi_n|^2
\\
&=
\begin{cases}
-\sum_{n_1>0} 2 n_1|\xi_n|^2 &\quad\textnormal{ if } i=1\;,\\
0 &\quad\textnormal{ if } i\neq 1\;.
\end{cases}
\end{equs}
(If $i\neq 1$, the 1st and 2nd sums cancels and the 3rd is $0$, and if $i=1$, the 3rd sum is still $0$ but the 1st and 2nd sums are equal.)
Similarly
\begin{equs}
\Pi_0 (\CR\xi \partial_i \xi) &=
\sum_n \mathbf{i} n_i (\CR\xi)_{-n} \xi_{n}
=
\sum_{n_1>0}
n_i
|\xi_n|^2
+ \sum_{n_1<0}
(-n_i)
|\xi_n|^2
+ \sum_{n_1=0}
\mathbf{i} n_i
|\xi_n|^2
\\
&=
\begin{cases}
\sum_{n_1>0} 2 n_1|\xi_n|^2 &\quad\textnormal{ if } i=1\;,\\
0 &\quad\textnormal{ if } i\neq 1\;.
\end{cases}
\end{equs}
Therefore
\begin{equ}
\Pi_0(\CP_t \CR X^a \partial_i \CP_t X^a)
=
- \Pi_0(\CP_t X^a \partial_i \CP_t \CR X^a)
=
\begin{cases}
Z_t &\quad\textnormal{ if } i=1\;,\\
0 &\quad\textnormal{ if } i\neq 1\;.
\end{cases}
\end{equ}
Hence, for $X,Y$ related as in Definition~\ref{def:Y}, by Lemma~\ref{lem:non_zero_modes}, the quantity which we expect to be well-behaved uniformly in $N$ is
\begin{equ}
B(\CP_t (X+Y), D\CP_t(X+Y)) + (B_1(T^a,T^b)-B_1(T^b,T^a))Z_t\;.
\end{equ}
The following lemma shows that $Z_t$ is well approximated by its expectation.

\begin{lemma}\label{lem:Z-EZ}
Let $\delta> 1 -\frac d4$.
Then
$\sup_{t\in (0,1)} t^{\delta}( Z_t-\mathbb{E} Z_t)$ has moments of all orders bounded uniformly in $N$.
\end{lemma}

\begin{proof}
Define $W_t =t^{\delta} ( Z_t-\mathbb{E} Z_t)$.
We will show that there exists $\kappa>0$ such that, for all $p\geq 1$,
\begin{equ}
\mathbb{E} |W_u-W_t|^p \lesssim |t-u|^{\kappa p}\;,
\end{equ}
uniformly in $0\leq t < u \leq 1$ and $N\geq 1$,
from which the conclusion follows by Kolmogorov's continuity theorem~\cite[Thm.~A.10]{FV10}.
It suffices to consider $t<u\leq 2t$ and, by equivalence of Gaussian moments, $p=2$.

Since $X^a_n$ and $X^a_m$ are independent if $n\neq m$ with $n_1,m_1>0$, and $\mathbb{E} |X^a_n|^4 - (\mathbb{E} |X_n^a|^2)^2 \leq \sigma^4(n) \lesssim n^{-2d+2}$,
we obtain
\begin{equ}
\mathbb{E}(W_u - W_t)^2 \asymp \sum_{n_1>0} \psi_{t,u}(n^2)^2 n_1^2 ( \mathbb{E} |X^a_n|^4 - (\mathbb{E} |X_n^a|^2)^2)
\lesssim \sum_{n_1>0} \psi_{t,u}(n^2)^2  n^{-2d+4}\;,
\end{equ}
where
\begin{equ}
\psi_{t,u}(x) = t^{\delta}e^{-2xt}-u^{\delta}e^{-2xu}\;.
\end{equ}
Recall from~\eqref{eq:psi_bound} that, for $\kappa>0$ small, uniformly in $0<t<u\leq 2t<1$ and $x\geq 1$,
\begin{equ}
\psi_{t,u}(x)^2 \lesssim |t-u|^\kappa x^{-2\delta+2\kappa}\;.
\end{equ}
We can take $\kappa>0$ sufficiently small such that $-2d+4-4\delta+4\kappa < -d$,
and therefore
\begin{equation*}
\mathbb{E}(W_u - W_t)^2
\lesssim |t-u|^\kappa \sum_{n_1>0} n^{-2d+4-4\delta+4\kappa}
\asymp |t-u|^\kappa\;.\qedhere
\end{equation*}
\end{proof}
We now show that $\mathbb{E} Z_t$ explodes as $N\to\infty$ and $t\to 0$ in a controlled manner.
\begin{lemma}\label{lem:E_Z}
It holds that
\begin{equ}\label{eq:_Z_upper}
\mathbb{E} Z_t \lesssim N^2 \wedge t^{-1}
\end{equ}
uniformly in $t\in (0,1)$ and in $N\geq 1$.
Furthermore,
\begin{equ}\label{eq:_Z_lower}
\mathbb{E} Z_t \gtrsim t^{-1}|\log t|^{-1} (\log |\log t| )^{-1}
\end{equ}
uniformly in $0<t\ll 1$ and $N>t^{-1/2}$.
\end{lemma}

\begin{proof}
Using the upper bound in Assumption~\ref{assump:GFS},
$\mathbb{E} Z_t$ is bounded above by a multiple of
\begin{equ}
\sum_{1\leq |n|\leq N} e^{-n^2 t} n^{-d+2}
\lesssim
\int_1^{2N}  e^{-r^2 t} r\mathop{}\!\mathrm{d} r
=
\int_{t^{1/2}}^{2N t^{1/2}}  e^{- u^2} u t^{-1/2} t^{-1/2}\mathop{}\!\mathrm{d} u
\asymp t^{-1} \wedge N^2\;.
\end{equ}
On the other hand,
using the lower bound in Assumption~\ref{assump:GFS},
$\mathbb{E} Z_t$ is bounded below by $cK$ where $c>0$ is uniform in $t\ll 1$ and $N>t^{-1/2}$, and
\begin{align*}
K
&=\sum_{3\leq |n|\leq N} e^{-n^2 t} n^{-d+2}|\log n|^{-1}|\log \log n|^{-1}
\\
&\gtrsim
\int_4^{N/2}  e^{-r^2 t} r|\log r|^{-1}|\log \log r|^{-1}\mathop{}\!\mathrm{d} r
\\
&=
\int_{4t^{1/2}}^{N t^{1/2}/2}  e^{- u^2} u t^{-1/2} |\log (ut^{-1/2})|^{-1}|\log \log (ut^{-1/2})|^{-1}t^{-1/2}\mathop{}\!\mathrm{d} u
\\
&\gtrsim t^{-1}|\log t|^{-1} (\log |\log t| )^{-1}\;.\qedhere
\end{align*}
\end{proof}
Define the deterministic processes $H,I \colon [0,1] \to E$ by
\begin{equ}\label{eq:H_I_def}
H_t \eqdef (B_1(T^a,T^b)-B_1(T^b,T^a))\mathbb{E} Z_t\;,\qquad I_t \eqdef \int_0^t H_s\mathop{}\!\mathrm{d} s\;.
\end{equ}
Observe that, by~\eqref{eq:_Z_upper}, uniformly in $t\in (0,1)$ and $N\geq1$,
\begin{equ}\label{eq:I_bound_upper}
|I_t| = \int_0^t |H_s|\mathop{}\!\mathrm{d} s
\lesssim \int_0^{t\wedge N^{-2}} N^2 \mathop{}\!\mathrm{d} s + \int_{t\wedge N^{-2}}^t s^{-1} \mathop{}\!\mathrm{d} s
= (N^2 t)\wedge 1 + \log((N^{2}t)\vee 1) \;,
\end{equ}
while by~\eqref{eq:_Z_lower}, uniformly in $0<t\ll1$ and $N>t^{-1/2}$,
\begin{equ}\label{eq:I_bound_lower}
|I_t|
\gtrsim \int_{N^{-2}}^t s^{-1}|\log s|^{-1} (\log |\log s| )^{-1} \mathop{}\!\mathrm{d} s
= \log\log\log N -\log\log\log (t^{-1})\;.
\end{equ}

\begin{lemma}\label{lem:int_I_bound}
For $a,b>-1$ and $p\geq 1$
\begin{equ}
\int_0^t (t-s)^a|I_s|^p s^b \mathop{}\!\mathrm{d} s
\lesssim  t^{a+b+1}(\log N)^p
\end{equ}
uniformly in $N\geq 2$ and $t>N^{-2}$.
\end{lemma}

\begin{proof}
Following~\eqref{eq:I_bound_upper}, we have
\begin{align*}
\int_0^t (t-s)^a|I_s|^p s^b \mathop{}\!\mathrm{d} s
&\lesssim \int_0^{N^{-2}} (t-s)^a N^{2p} s^{b+k} \mathop{}\!\mathrm{d} s
+\int_{N^{-2}}^t (t-s)^a  s^b (\log N )^p \mathop{}\!\mathrm{d} s
\\
&\asymp (N^{-2})^{a+b+1}
+ t^{a+b+1}(\log N)^p
\lesssim t^{a+b+1}(\log N)^p\;.\qedhere
\end{align*}
\end{proof}

\section{Deterministic bounds}\label{sec:determin}

In this section, we let $H,I\colon [0,1]\to E$ be defined as in~\eqref{eq:H_I_def} from some $\{X^N\}_{N\geq 1}$ satisfying Assumption~\ref{assump:GFS}.
We consider $N\gg1$ and suppress it from our notation.

We further fix $\delta \in (1-\frac d4,1)$ and $\beta\in (-1,0)$ such that $\hat\beta\eqdef \beta+2(1-\delta)\in (-\frac12,0)$.
We also fix $\eta \in (-\frac23,-\frac12)$ such that $\eta + \hat\beta>-1$.
For $\CQ \colon (0,T)\to \CC^\beta$,
define the norm
\begin{equ}
|\CQ|_{\CC^\beta_{\delta;T}} \eqdef \sup_{t\in (0,T)} t^{\delta}|\CQ|_{\CC^\beta}\;.
\end{equ}

\begin{lemma}\label{lem:deterministic}
Suppose $u_0\in C^\infty$ and define the functions $\CN_t = B(\CP_t u_0,D\CP_t u_0)$ and $\CQ_t = \CN_t - H_t$.
Then there exist $\kappa>0$ small and $C>0$ large, not depending on $N$, such that for all $T\in(0,1)$ with
\begin{equ}\label{eq:small_time}
T^\kappa \leq \frac{1}{C(\log N)^3(1+|\CQ|_{\CC^\beta_{\delta;T}}+|u_0|_{\CC^\eta})^{3}}\;,
\end{equ}
it holds that the solution $u$ to~\eqref{eq:PDE} exists on $[0,T]$ and
\begin{equ}
\sup_{t\in [0,T]}|u_t -\CP_t u_0 - I_t|_{\CC^{\hat\beta}} \leq C(1+|\CQ|_{\CC^\beta_{\delta;T}})\;.
\end{equ}
\end{lemma}

\begin{proof}
We decompose
$
u_t =
\CP_t u_0 + R_t + I_t
$
where $R$ solves the fixed point
\begin{equs}
R_t &= \CM_t(R) \eqdef \int_0^t \CP_{t-s}(B(u_s, Du_s) + P(u_s)) \mathop{}\!\mathrm{d} s - I_t\label{eq:CM_def}
\\
&= \int_0^t \CP_{t-s} [\CQ_s + B(u_s, D R_s ) + B( R_s + I_s, D\CP_s u_0) + P(u_s)]\mathop{}\!\mathrm{d} s\;,
\end{equs}
where we used that $H_t$ and $I_t$ are constant in space in the final equality.
Define the Banach space $\CX = \CX_T = \{f \in C((0,T), C^1)\,:\, |f|_\CX<\infty\}$ with norm
\begin{equ}
|f|_{\CX} \eqdef \sup_{t\in (0,T)} |f_t|_{\CC^{\hat\beta}} +
t^{-\hat\beta/2}|f_t|_{L^\infty} + t^{-\frac{\hat\beta}2+\frac12} |f_t|_{C^1}\;.
\end{equ}
We will show that, for $T$ satisfying~\eqref{eq:small_time}, $\CM$ is a contraction on the ball of radius $K\asymp 1+|\CQ|_{\CC^\beta_{\delta;T}}$ in $\CX$, from which the conclusion follows.

Define $\CY_t = \int_0^t \CP_{t-s} \CQ_s\mathop{}\!\mathrm{d} s$. Recalling the heat flow estimates for $\alpha<0$ and $\gamma\geq 0$
\begin{equ}
t^{-\alpha/2}|\CP_t f|_{L^\infty} + t^{1/2-\alpha/2}|\CP_t f|_{C^1} + t^{\gamma/2}|\CP_t f|_{\alpha+\gamma}\lesssim  |f|_{\CC^\alpha}
\end{equ}
we obtain
\begin{equ}
|\CY_t|_{\CC^{\hat\beta}} \lesssim |\CQ|_{\CC^\beta_{\delta;t}}\int_0^t (t-s)^{\beta/2-\hat\beta/2} s^{-\delta}\mathop{}\!\mathrm{d} s \asymp |\CQ|_{\CC^\beta_{\delta;t}}\;.
\end{equ}
Similarly
$
|\CY_t|_{L^\infty} \mathop{}\!\mathrm{d} s
\lesssim
|\CQ|_{\CC^\beta_{\delta;t}}t^{\hat\beta/2}
$
and $|\CY_t|_{C^1} \lesssim |\CQ|_{\CC^\beta_{\delta;t}}t^{\hat\beta/2-\frac12}$ (in the last bound we used $\beta>-1$ so that $\beta/2 - \frac12 >-1$),
thus $
|\CY|_{\CX} \lesssim |\CQ|_{\CC^\beta_{\delta;T}}$.
Furthermore,
\begin{equs}
t^{-\hat\beta/2}\int_0^t |\CP_{t-s} B(\CP_s u_0, DR_s) + B(R_s,D\CP_s u_0)|_{L^\infty}\mathop{}\!\mathrm{d} s
&\lesssim |R|_{\CX}|u_0|_{\CC^\eta} t^{-\hat\beta/2}\int_0^t s^{\eta/2+\hat\beta/2-\frac12} \mathop{}\!\mathrm{d} s
\\
&\asymp t^{\frac12+\frac\eta2}|R|_{\CX}|u_0|_{\CC^\eta}\;,
\end{equs}
where we used $\hat\beta+\eta>-1$,
and
\begin{equ}
t^{-\hat\beta/2}\int_0^t |\CP_{t-s} B(R_s, DR_s)|_{L^\infty}\mathop{}\!\mathrm{d} s
\lesssim |R|_{\CX}^2 t^{-\hat\beta/2}\int_0^t s^{\hat\beta-\frac12} \mathop{}\!\mathrm{d} s
\asymp |R|_{\CX}^2t^{\frac12+\hat\beta/2}\;,
\end{equ}
where we used $\hat\beta>\frac12$.
Moreover, by Lemma~\ref{lem:int_I_bound} with $p=1$,
\begin{equ}
t^{-\hat\beta/2}\int_0^t |\CP_{t-s} B(I_s, D\CP_su_0)|_{L^\infty}\mathop{}\!\mathrm{d} s
\lesssim t^{-\hat\beta/2}\int_0^t |I_s|s^{\eta/2-1/2} \mathop{}\!\mathrm{d} s
\lesssim |u_0|_{\CC^\eta}  t^{\frac12+\eta/2-\hat\beta/2} \log N
\end{equ}
and
\begin{equ}
t^{-\hat\beta/2}\int_0^t |\CP_{t-s} B(I_s, DR_s)|_{L^\infty}\mathop{}\!\mathrm{d} s
\lesssim |R|_{\CX}t^{-\hat\beta/2}\int_0^t |I_s|s^{\hat\beta/2-1/2} \mathop{}\!\mathrm{d} s
\lesssim t^{\frac12}|R|_{\CX} \log N\;.
\end{equ}
Exactly the same bounds hold for the norm $|\cdot|_{C^1}$ with $t^{-\hat\beta/2}$ replaced by $t^{-\hat\beta/2+\frac12}$ in the first terms.
Finally, the same bounds obviously hold for the norm $|\cdot|_{\CC^{\hat\beta}} \lesssim |\cdot|_{L^\infty}$.
This bounds the first set of terms in the definition~\eqref{eq:CM_def} of $\CM_t$.
It remains to bound $\int_0^t \CP_{t-s} P(u_s)\mathop{}\!\mathrm{d} s$ for which we have, by Lemma~\ref{lem:int_I_bound} with $p=3$,
\begin{equs}
t^{-\hat\beta/2}\int_0^t |\CP_{t-s} P(u_s)|_{L^\infty}\mathop{}\!\mathrm{d} s
&\lesssim t^{-\hat\beta/2}\int_0^t(1+ s^{\eta/2}|u_0|_{\CC^\eta} + s^{\hat\beta/2}|R|_{\CX}
+ |I_s|)^3 \mathop{}\!\mathrm{d} s
\\
&\lesssim t^{-\hat\beta/2}(t + t^{3\eta/2+1}|u_0|_{\CC^\eta}^3 + t^{3\hat\beta/2+1}|R|^3_{\CX} + t(\log N)^3)\;.
\end{equs}
Again the same bound obviously for the norm $|\cdot|_{\CC^{\hat\beta}}$,
and also for the norm $|\cdot|_{C^1}$ with $t^{-\hat\beta/2}$ replaced by $t^{-\hat\beta/2+\frac12}$ in the first term.
In conclusion, for $\kappa=\min\{\frac12+\frac\eta2+\frac{\hat\beta}2,\frac12+{\hat\beta},\frac{3\eta}{2}+1\}$,
\begin{equ}
|\CM(R)|_{\CX} \lesssim |\CQ|_{\CC^\beta_{\delta;T}}
+ T^\kappa(\log N)^3 (1+|R|_{\CX} +|u_0|_{\CC^\eta})^3\;.
\end{equ}
In exactly the same way,
\begin{equ}
|\CM(R) - \CM(\bar R)|_{\CX} \lesssim T^{\kappa}(\log N)^3|R-\bar R|_\CX(1+|u_0|_{\CC^\eta} + |R|_{\CX}+|\bar R|_{\CX})^2\;.
\end{equ}
It follows that for $K\asymp 1+|\CQ|_{\CC^\beta_{\delta;T}}$
and $T^\kappa(\log N)^3(K + |u_0|_{\CC^\eta})^3\lesssim K$, $\CM$ is a contraction on the ball in $\CX$ of radius $K$ as desired.
\end{proof}

\section{Proof of Theorem~\ref{thm:main}}\label{sec:proof_thm}

We are now ready for the proof of Theorem~\ref{thm:main}.
Consider $M>3/\kappa$ for the $\kappa$ from Lemma~\ref{lem:deterministic}, and define $T= (\log N)^{-M}$ for $N\gg1$.
Define $\CN,\CQ\colon [0,1]\to C^\infty$ as in Lemma~\ref{lem:deterministic}
and $I\colon[0,1]\to E$ as in~\eqref{eq:H_I_def}.
Consider $\delta,\beta,\eta,\hat\beta$ as in the previous section.

The moments of $|u_0|_{\CC^\eta}$ are bounded uniformly in $N$ (Remark~\ref{rem:Besov_moments}), and, by Lemmas~\ref{lem:non_zero_modes} and~\ref{lem:Z-EZ}, so are
the moments of $|\CQ|_{\CC^\beta_{\delta;1}}$.
Therefore, $\lim_{N\to\infty}\mathbb{P}[\eqref{eq:small_time}] = 1$.
Hence, by Lemma~\ref{lem:deterministic},
\begin{equ}
\lim_{N\to\infty}\mathbb{P}\big[u \textnormal{ exists on } [0,T]\times\mathbb{T}^d \;\; \&\;\;
|u_T - \CP_T u_0 - I_T|_{\CC^{\hat\beta}} \leq C(1+|\CQ|_{\CC^\beta_{\delta;1}})\big] = 1\;.
\end{equ}
Finally, since $|I_T| \gtrsim \log\log\log N$ by~\eqref{eq:I_bound_lower}, and
\begin{equ}
|\Pi_0(u_T - \CP_Tu_0 - I_T)| + |\Pi_0\CP_Tu_0| < |I_T|/2 \Rightarrow
|\Pi_0 u_T| > |I_T|/2 \;,
\end{equ}
we obtain~\eqref{eq:prob_norm_inflation} for $c>0$ sufficiently small, which concludes the proof of Theorem~\ref{thm:main}. \qed

redpajama_set_name: RedPajamaArXiv