# Metric for Estimating Congruity between Quantum Images +
## 3 A Measure for Fidelity between Quantum Images
### The Enhanced QIFM Metric  
An image quality metric is essential in evaluating the result of image processing algorithms [25]. The need for such a metric for the quantum computing paradigm was first mooted in [13; 20]. In [1], this suggestion was given impetus by exploring the rudimentary requirements to realise such a metric. However, that effort was limited to uncomprehensive assessments in terms of its mathematical formulation and lack of extensive experimental analysis to establish its performance and utility.  
In this study, mindful of the requirements imposed by the quantum mechanical nature of our information carrier, we catenate this previous effort with a more rigorous mathematical understanding to realise a framework that would facilitate assessment of congruity (or likeness) between two or more quantum images. Following this, in the next section, we will present an extensive experimental analysis to validate the utility of our enhanced QIFM fidelity metric.  
Among other requirements, a good objective image quality metric should: (1) reflect the contortion in the image very well; (2) exhibit high subjective fidelity (by utilising some HVS attributes); (3) manifest low complexity (in terms of time and computing resources); (4) have widespread applicability (irrespective of image size and quality), etc. [25].  
In addition to these requirements, because of the established contrariety pervading the manner in which how information is processed on digital and quantum computing devices, we impose an additional requirement that any quantum image fidelity metric should satisfy. This requirement specifies that the least number of unitary transformations (or simply, basic quantum gates), which implies lower computational costs, should be utilised in the computation. The generalised circuit to execute the proposed QIFM operation on a register comprising of \(2^{m}\) quantum images is presented in Figure 4.  
As seen in this figure, the proposed QIFM consists of two blocks: the upper block (shown inside the red short-dashed rectangular box) is the strip encoding our register of \(2^{m}\) FRQI quantum images; and the lower block (shown inside the blue short-dashed rectangular box), which presents the ancillary information that is crucial for the preservation of the coherence needed for quantum computation. The brown layer (with icons that resemble an hour-glass) that separates the two blocks depicts the interaction that is envisaged between the quantum register and the ancillary information, which is mostly retrieved from the classical versions of the images. Descriptions of how this interaction is facilitated were highlighted in Section 2, but detailed discussions can be found in [14; 24] and the other literature therein. We should further add that this interaction provides the required coupling  
Figure 4: Layout of proposed QIFM framework to assess fidelity between two (or more) quantum images.  
needed for the ancilla-driven (non-destructive) measurement operations as highlighted in Figure 3B and explained in detail in [24].  
The half-moon control-condition (\(\blacklozenge\)) shown in Figure 4 is used to depict that a control-condition could be either a 1-control (\(\blacklozenge\)) or 0-control (\(\Circle\)). First used in [1], the half-moon notation is used, simply for brevity, in order to avoid duplicating the separate use of the \(\blacklozenge\) and \(\Circle\) control-conditions.  
Meanwhile, the flowchart depicting the algorithmic structure of our proposed QIFM metric is presented in Figure 5 and a detailed explanation of its two main units, i.e., the binary check operation (\(BCO\)) and bit error rate operation (\(BO\)), is presented in the remaining subsections of this section. Its implementation, in latter parts of this study, will, however, be limited to estimating congruity between only two images--a reference image and a test image--as a pair.