# Quantum Recurrent Neural Networks: Predicting the Dynamics of Oscillatory and Chaotic Systems
## 2 Fundamental Quantum Computing Concepts
### Superpositions  
Superposition in a quantum system allows a qubit to exist in multiple states simultaneously until it is measured. This characteristic differentiates a quantum bit from a classical bit, which can only be in one state at any given time. In a single qubit system, the state of a qubit can be described as a linear combination of the basis states \(|0\rangle\) and \(|1\rangle\). Mathematically, this is represented as:  
\[|\psi\rangle=\alpha|0\rangle+\beta|1\rangle, \tag{1}\]  
where \(\alpha\) and \(\beta\) are complex numbers representing the probability amplitudes for the qubit being in state \(|0\rangle\) and \(|1\rangle\), respectively. According to the Born's rule, the probabilities of finding the qubit in either state upon measurement are \(|\alpha|^{2}\) and \(|\beta|^{2}\), with the condition that \(|\alpha|^{2}+|\beta|^{2}=1\). For example, if \(\alpha=\sqrt{0.3}\) and \(\beta=\sqrt{0.7}\), the qubit has a 30% probability of being measured in state \(|0\rangle\) and a 70% probability of being in state \(|1\rangle\). Extending the concept of superposition to a two-qubit system, we find a more complex scenario. In a two-qubit system, the combined state can be represented as a superposition of all four possible states of the two qubits. The state vector for such a system is given by:  
\[|\Psi\rangle=\alpha|00\rangle+\beta|01\rangle+\gamma|10\rangle+\delta|11\rangle, \tag{2}\]  
where \(\alpha,\beta,\gamma\), and \(\delta\) are complex probability amplitudes corresponding to each of the four states. As per the normalization condition, the sum of the squares of the absolute values of these amplitudes must equal one:\[|\alpha|^{2}+|\beta|^{2}+|\gamma|^{2}+|\delta|^{2}=1. \tag{3}\]  
For instance, if the amplitudes are \(\alpha=\sqrt{0.1}\), \(\beta=\sqrt{0.2}\), \(\gamma=\sqrt{0.3}\), \(and\delta=\sqrt{0.4}\), the probabilities of measuring the system in the states \(|00\rangle\), \(|01\rangle\), \(|10\rangle\), and \(|11\rangle\) are \(10\%\), \(20\%\), \(30\%\), and \(40\%\), respectively. In both single and two-qubit systems, superposition allows quantum computers to process and encode information in ways that are fundamentally different from classical computers, enabling them to perform complex calculations more efficiently. In traditional computing, gates are fundamental building blocks that process binary information, operating on bits that exist in one of two states: 0 or 1. Common logic gates include AND, OR, NOT, and XOR, each performing a specific logical operation for computational tasks. Similarly, quantum computing has quantum gates, which manipulate qubits, such as the Hadamard, Pauli-X, Y, Z, and Controlled-NOT (CNOT) gates, operating on these qubits, enabling complex operations that can entangle qubits, and creating correlations between them that are essential for quantum computation's power. These gates are unitary, meaning they are reversible, a property that contrasts with some irreversible classical gates. Here, we introduce one of the fundamental gates in quantum computing, the Hadamard gate, often used to create a superposition of states. The Hadamard gate acts on a single qubit and transforms it into a superposition of its basis states. The Hadamard gate is represented by the following matrix:  
\[H=\frac{1}{\sqrt{2}} \begin{pmatrix}1&1\\ 1&-1\end{pmatrix} . \tag{4}\]  
This matrix operates on a qubit state vector, transforming it from a definite state (\(|0\rangle\) or \(|1\rangle\)) into a superposition. When the Hadamard gate acts on the state \(|0\rangle\) (represented by the vector \( \begin{pmatrix}1\\ 0\end{pmatrix} \)), the resulting state is:  
\[H|0\rangle=\frac{1}{\sqrt{2}} \begin{pmatrix}1&1\\ 1&-1\end{pmatrix}\begin{pmatrix}1\\ 0\end{pmatrix} =\frac{1}{\sqrt{2}} \begin{pmatrix}1\\ 1\end{pmatrix} =\frac{|0\rangle+|1\rangle}{\sqrt{2}}. \tag{5}\]  
Similarly, when it acts on the state \(|1\rangle\) (represented by the vector \( \begin{pmatrix}0\\ 1\end{pmatrix} \)), the output is:  
\[H|1\rangle=\frac{1}{\sqrt{2}}