# Quantum Circuit-Width Reduction through Parameterisation and Specialisation
## 1 Introduction
### Exemplar Circuit: Integer Divider  
Figure 3 shows a top-level representation of a quantum integer divider as an illustrative example and as the target application in this work. The design shown performs a 4-step long division to create a 4-qubit quotient \(|out3|out2|out1|out0\rangle\) from a dividend defined by a 7-qubit register and a divisor defined by a 4-qubit register \(|q3d|q2d|q1d|q0d\rangle\). The 7-qubit dividend register comprises the original 4-qubit representation of the dividend \(|q3|q2|qi1|q0i\rangle\) extended by three qubits in state \(|0\rangle\), i.e., \(|qin2|qin1|qin0\rangle\). This integer divider can for example be used in fixed-point arithmetic, or as part of a floating-point divider. The key building blocks of this quantum circuit are the **Comparator** (indicated by \(C\) in Figure 3) and its uncomputation (termed \(U(C)\) in Figure 3), as well as the controlled  
Figure 2: Quantum circuit design for evaluation of \(u^{2}+v^{2}\) based on 4-qubit fixed-point representation of velocities \(u\) (defined by \(|qu3|qu2|qu1|qu0\rangle\)) and \(v\) (defined by \(|qv3|qv2|qv1|qv0\rangle\)). Upon completion on right-hand side of circuit, the kinetic energy is represented by 9 qubits \(|ek8|e8|e8|e8|e8|e8|e8|e8|e8|e8|e8|e8|e8|e88|e8|e88|e88|e88|e88|e88|e88|e88|e88|e88|e888|e888|e888|e888|e888|e8888|e888  
**Subtractor** operations. As can be seen, once the 4-qubit register \(|out3|out2|out1|out0\rangle\) is defined, the controlled subtractions are uncomputed using controlled add (_Add_ in Figure 3) circuits to restore all qubits to their original state, except the four qubits defining desired output. Possible quantum circuit implementations of these operations are detailed in Figure 4, where the comparator is based on the subtractor circuits proposed by [PERSON] et al. [33]. Figure 4: Quantum integer divider: quantum circuit implementation of comparator \(C\) and subtractor _Sub_. Example shown for 4-qubit representation of dividend, divisor, and output. Sub-circuits on left- and right-hand side perform transforms to/from 2’s complement for divisor qubits. Figure 3: Quantum integer divider: top-level overview of quantum circuit implementation of quantum integer division. Example shown for 4-qubit representation of dividend, divisor, and output. The design and quantum circuit implementation of quantum comparators has been investigated in detail in the past decade [33; 34; 35; 36]. Often, this work was conducted in the context of quantum image processing, where the comparator circuits were employed in image binarisation. The circuits take as input two multi-qubit registers defining integers \(a\) and \(b\) in binary representation. For use in quantum long-division only \(a<b\) or \(a\geq b\) need to be identified, while some of the comparator designs also separate \(a=b\) and \(a>b\). The work of [PERSON] et al. al. [33] includes a brief review of past work on quantum comparators. The type of quantum comparator circuits introduced by [PERSON] et al. [33] is well-suited to the requirements of the present work since it involves a minimum number of auxiliary qubits. It was also recently used in the work of [PERSON] et al. [37], where the design of a fault-tolerant implementation of quantum divider was considered. It should be noted that the quantum circuit transformation steps demonstrated here using the quantum integer divider target a wider range of quantum arithmetic operations and should, therefore, benefit a significant research community working on quantum arithmetic circuits and their application within more complex algorithms. From the quantum computing literature, it is clear that work on quantum arithmetic circuits remains an active area of research, even after two decades of work. Relating to the example shown in Figure 2 for a quantum circuit used for evaluation of kinetic energy in fixed-point representation in a two-dimensional lattice-based model, work on the development of efficient quantum multipliers constitutes significant ongoing activity [38; 39; 40].