# Quantum Circuit-Width Reduction through Parameterisation and Specialisation
## 4 Discussion of Key Concepts
### Reducing Memory Requirement in Full-State Vector Simulation  
Section 3 highlighted the challenges in terms of memory requirements and strides when performing full-state simulations of quantum circuits. For quantum circuits where one or more qubits remain in a constant state throughout the quantum simulation, circuit transformations can be used to create a smaller computational problem. Here, this is illustrated for an example circuit applying the \(CNOT\) gate. For an example 3-qubit register \(|q2|q1|q0\rangle\), applying the \(CNOT\) gate to \(|q0\rangle\) (least-significant qubit used in indexing of amplitudes) as target and \(|q2\rangle\) as control, the amplitudes of the updated state vector \(\left|\Psi\right\rangle_{1}\) follow as,  
Figure 6: Illustration of reduction operation on divisor qubits in subtractor circuit. Example shows specialisation of three most-significant qubits \(|q4d^{\prime}|q3d^{\prime}|q2d^{\prime}\rangle\) to \(|101\rangle\). In reduced quantum circuit shown at bottom, the \(MA\)\(J\) and \(UMA\) sub-circuits have been expanded for clarity.  
\[\left(\begin{array}{c}C_{000}\\ C_{001}\\ C_{010}\\ C_{011}\\ C_{100}\\ C_{101}\\ C_{110}\\ C_{110}\\ C_{111}\end{array}\right)^{(1)}=\left(\begin{array}{cccccccc}1&0&0&0&0&0&0 &0\\ 0&1&0&0&0&0&0&0\\ 0&0&1&0&0&0&0&0\\ 0&0&0&1&0&0&0&0\\ 0&0&0&0&0&1&0&0\\ 0&0&0&0&1&0&0\\ 0&0&0&0&0&0&1\\ 0&0&0&0&0&1&0\end{array}\right)\left(\begin{array}{c}C_{000}\\ C_{001}\\ C_{010}\\ C_{011}\\ C_{100}\\ C_{101}\\ C_{101}\\ C_{110}\end{array}\right)^{(0)} \tag{6}\]  
where the previously used indices \(k\) are represented in binary format for convenience. The sparsity pattern in Equation (6) shows that in this case, the \(NOT\) operations only change the amplitudes in the 'lower' half of the amplitude vector corresponding to \(|q2\rangle=|1\rangle\). If \(|q2\rangle=|1\rangle\) is fixed for a circuit, then the circuit simulation can be performed while only considering half the original problem.  
Figure 7: Illustration of automated reduction of a quantum modulo adder in parameterised form. Example shows specialisation of three most-significant qubits \(|q4d^{\prime}|q3d^{\prime}|q2d^{\prime}\rangle\) to \(|101\rangle\).  
This principle can be extended to cases with the two most-significant qubits acting as control (now a Toffoli gate is considered) with \(|q0\rangle\) still acting as the target, and \(|q1\rangle\) acting as the additional control.  
\[\left(\begin{array}{c}C_{000}\\ C_{001}\\ C_{010}\\ C_{011}\\ C_{100}\\ C_{110}\\ C_{110}\\ C_{111}\end{array}\right)^{(1)}=\left(\begin{array}{cccccccc}1&0&0&0&0&0&0 &0\\ 0&1&0&0&0&0&0&0\\ 0&0&1&0&0&0&0&0\\ 0&0&0&1&0&0&0&0\\ 0&0&0&0&1&0&0&0\\ 0&0&0&0&1&0&0\\ 0&0&0&0&0&1&0&0\\ 0&0&0&0&0&0&1\\ 0&0&0&0&0&0&1&0\end{array}\right)\left(\begin{array}{c}C_{000}\\ C_{001}\\ C_{010}\\ C_{011}\\ C_{100}\\ C_{110}\\ C_{110}\end{array}\right)^{(0)} \tag{7}\]  
Similarly, this approach can be extended further to _NOT_ gates controlled by a larger number of control qubits, as well as circuits where a series of _NOT_ and controlled-_NOT_ operations are performed, provided the qubits acting as control remain in original state.  
It should be noted that the concept of removing constant-state qubits (e.g., acting only a control qubit in controlled-gate operations) to achieve memory saving in full-state vector simulations applies equally to algorithms employing amplitude based encoding and algorithms using computational-basis encoding. The focus of the current transformation on quantum arithmetic operations in quantum algorithms is motivated by the relative ease in identifying such constant-state qubits once parameterised circuits have been introduced.