# Generative Music with Partitioned Quantum Cellular Automata
## 2 Background
### Quantum Computing
 \tag{4}\]  
The application of the \(\mathbf{H}\) gate to a qubit pointing to \(\left|0\right\rangle\) puts it in superposition, right at the equator of the Bloch sphere. That is, it puts the qubit into a balanced superposition state consisting of an equal-weighted combination of two opposing states, where \(\left|\alpha\right|^{2}=0.5\) and \(\left|\beta\right|^{2}=0.5\). This is depicted in Equation (5):  
\[\mathbf{H}(\left|0\right\rangle)=\frac{1}{\sqrt{2}}(\left|0\right\rangle+ \left|1\right\rangle) \tag{5}\]  
Gates can also operate on multiple qubits. For instance, the controlled \(\mathbf{X}\) gate (also known as \(\mathbf{CX}\) or \(\mathbf{CNOT}\) gate) puts two qubits in _entanglement_. The \(\mathbf{CX}\) gate applies an  
Figure 3: A Bloch sphere representing a single qubit. Source: [PERSON], [[https://commons.wikimedia.org/w/index.php?curid=5829358](https://commons.wikimedia.org/w/index.php?curid=5829358)]([https://commons.wikimedia.org/w/index.php?curid=5829358](https://commons.wikimedia.org/w/index.php?curid=5829358)) (accessed on 2 January 2023). \(\mathbf{X}\) gate on a qubit only if the state of another qubit is \(\left|1\right\rangle\). Thus, this gate establishes a dependency (or a correlation) of the state of one qubit with the value of another (Figure 4). In practice, any quantum gate can be made conditional, and entanglement can take place between more than two qubits. Quantum processing with multiple qubits is represented using tensored vectors. A tensored vector is the result of the tensor product (represented by the symbol \(\otimes\)) of two or more vectors. A system of two qubits looks like \(\left|0\right\rangle\otimes\left|0\right\rangle\), but it is normally abbreviated to \(\left|00\right\rangle\). It is useful to study the expanded form of the tensor product to follow how it works. For instance, see Equation (6). \[\left|01\right\rangle=\left|0\right\rangle\otimes\left|1\right\rangle=\left[ \begin{matrix}1\\ 0\end{matrix} \right]\otimes\left[ \begin{matrix}0\\ 1\end{matrix} \right]=\left[ \begin{matrix}1&\times&0\\ 1&\times&1\\ 0&\times&0\\ 0&\times&1\end{matrix} \right]=\left[ \begin{matrix}0\\ 1\\ 0\\ 0\end{matrix} \right] \tag{6}\]  
Furthermore, let us consider two qubits \(\left|q_{1}\right\rangle\) and \(\left|q_{0}\right\rangle\) with state vectors \(\left|\Psi\right\rangle\) and \(\left|\Phi\right\rangle\), respectively. These are shown in Equation (7). Moreover, Equation (8) describes a system with two qubits \(\left|q_{1}\right\rangle\) and \(\left|q_{0}\right\rangle\), combining the state vectors \(\left|\Psi\right\rangle\) and \(\left|\Phi\right\rangle\). \[\left|\Psi\right\rangle=\alpha\left|0\right\rangle+\beta\left|1\right\rangle \text{ for }q_{0} \tag{7}\] \[\left|\Phi\right\rangle=\gamma\left|0\right\rangle+\delta\left|1\right\rangle \text{ for }q_{1}\]  
\[\left|\Psi\right\rangle\otimes\left|\Phi\right\rangle=\alpha\gamma\left|00 \right\rangle+\alpha\delta\left|01\right\rangle+\beta\gamma\left|10\right\rangle +\beta\delta\left|11\right\rangle \tag{8}\]  
In fact, Equation (8) represents a new quantum state with four amplitude coefficients (Equation (9)). Thus, Equation (10) expresses that each of the four quantum states has an equal probability of 25% each of being returned. \[\left|\Omega\right\rangle=\omega_{0}\left|00\right\rangle+\omega_{1}\left|01 \right\rangle+\omega_{2}\left|10\right\rangle+\omega_{3}\left|11\right\rangle \tag{9}\]  
\[\left|\Omega\right\rangle=\frac{1}{4}\left|00\right\rangle+\frac{1}{4}\left|0 1\right\rangle+\frac{1}{4}\left|10\right\rangle+\frac{1}{4}\left|11\right\rangle \tag{10}\]  
Now, it should be straightforward to work out how to describe quantum systems with more qubits.