Quantum Computing for Dealing with Inaccurate Knowledge using the Certainty Factors Model

In this paper we illustrate that inaccurate knowledge can be efficiently implemented 1 in a quantum environment. For this purpose, we use certainty factors, which apparently are 2 strongly correlated with quantum probability. We first explore the certainty factors approach 3 for inexact reasoning from a classical point of view. Next, we introduce some basic aspects of 4 quantum computing, and we pay special attention to quantum rule-based systems. In this context, 5 a specific use case has been built: an inferential network for testing the behaviour of the certainty 6 factors approach in a quantum environment. After the design and execution of the experiments, 7 the corresponding analysis of the obtained results is performed in three different scenarios: (1) 8 inaccuracy in declarative knowledge, or imprecision, (2) inaccuracy in procedural knowledge, 9 or uncertainty, and (3) inaccuracy in both declarative and procedural knowledge. This paper, as 10 stated in the conclusions, is intended to pave the way for future quantum implementations of 11 well-established methods for handling inaccurate knowledge. 12


Introduction
The field of Artificial Intelligence (AI) is usually divided into two opposing points of 16 view, on the one hand we have the Symbolic AI, that focuses on a symbolic representation 17 of the world and then using logic and search to solve problems, and on the other hand 18 we have the Sub-symbolic AI that do not use explicit high-level symbols and relies on 19 mathematical equations to solve problems. Inside the sub-symbolic approach, we can 20 find the connectionist models, that aim to build networks of simple interconnected units 21 that pursue to simulate the functioning of the human brain [1]. The sub-symbolic field 22 includes the Machine Learning (ML) disciplines, that focus on constructing computer 23 systems that automatically improve through experience. It also includes the study of 24 the fundamental statistical, computational, information and theoretic laws behind these 25 learning systems [2]. 26 The field of Quantum Computing has proven to be better than classical computers 27 at solving certain types of problems. For example: algebraic computational problems, 28 of symbolic AI [13]. Broadly speaking, we can consider that the origin of inaccurate 48 knowledge is related to one or more of the following causes [14]: (1) the available in-49 formation is incomplete, (2) the available information is incorrect, (3) the information 50 we use is inaccurate, (4) the real world is not deterministic, (5) the lack of agreement be-51 tween experts in the same field is frequent, (6) the knowledge-model contains inaccurate 52 information. 53 One of the first successful models to deal with uncertainty was the Certainty Factors 54 model proposed by Shortliffe and Buchanan (S.B.) [15] that shook the foundations of the, 55 at that moment, incipient world of artificial intelligence. The Shortliffe and Buchanan 56 model of certainty factors is ad hoc in nature, and therefore lacks a strong theoretical 57 basis. However, this model was immediately accepted due to its easy understanding 58 and the quality of the results obtained after its application. In any case it appears that, 59 despite its ad hoc nature, probabilities are in the core of this certainty factors [16]. 60 Later approaches to model inexact knowledge include fuzzy models [17] based on 61 fuzzy sets, the evidential theory of Dempster and Shafer [18] and the Bayesian networks 62 (or belief networks) [19] that combine graph theory and probability theory. 63 Although the certainty factors model is independent of the technology, the real fact 64 is that, at present, we can start thinking on taking advantage of quantum systems and 65 consider specific applications of quantum computing (Q.C.), since we currently are in 66 the noisy intermediate-scale quantum (NISQ) era [20]. In this context the question is 67 [21]: Could we use actual quantum computing (which is intrinsically probabilistic) to 68 investigate the probabilistic nature of certainty factors for reasoning with inaccurate 69 knowledge? 70 Although this paper is strongly based on what we have already published in [13], 71 the major novelty of this work is to show how a well-established method [15] for dealing 72 with inaccurate knowledge can be implemented and studied from a quantum viewpoint. 73 In this context, a specific use case has been built: an inferential network for testing inaccuracy in both declarative and procedural knowledge. 79 We hope this paper will pave the way for future quantum implementations of well    Now let p(h) be the a priori probability of h and let p(h/e) be the probability of h 92 after e. Note that p(h) is a probability and p(h/e) is a conditional probability. With these 93 assumptions we can identify the following cases: If p(h/e) > p(h), then there is an increase in the probability of the hypothesis h after e. In this case: MB(h, e) > 0, MD(h, e) = 0, and MB(h, e) is defined as follows: proposed this certainty factor to facilitate the comparison between evidential strengths 104 of alternative hypotheses related with the same evidence. According to their definitions, 105 the ranges of each measure are: Since all these indexes are based on probabilities, one could expect that they would 107 behave as probabilities, but this could be not necessarily true.

108
According to Shortliffe and Buchanan, one of the weakest points of probabilistic 109 models is the fact that the same evidence supports, simultaneously, a given hypothesis 110 and its negation. This is a consequence of the mathematical consistency of probabilistic 111 models, which forces that: Shortliffe and Buchanan propose the following approach for the combination of 135 two pieces of evidence that refer to the same hypothesis. The formulation in terms of 136 certainty factors is as follows:

138
when there are more than just two pieces of evidence, the combination of the different 139 pieces of evidence can be considered in any order without affecting the final result.

140
Now suppose the following inferential circuit: This approach refers exclusively to the propagation of pure uncertainty, but it can 144 also happen that input data is imprecise. There is a subtle difference between imprecision Buchanan propose a formulation that treats imprecision as uncertainty. To do this, they 150 modify the previous inferential circuit (equ. 18) as follows: Now, in order to calculate CF(h, ε 1 ), the inaccurate knowledge-taking into account 152 that CF(e 1 , ε 1 ) is the imprecision associated to e 1 -is propagated as follows: A final aspect related to the propagation of inaccurate knowledge is related to the the maximum to evaluate the logical clause OR.

158
As an example, consider the following rule, with the AND operator represented by 159 the ∧ symbol and the OR operator represented by the ∨ symbol: The antecedent of this rule is E antecedent = e 1 ∧ (e 2 ∨ e 3 ). But, in a real problem, 161 we usually have imprecise evidences ε rather than categorical evidences e. Therefore, 162 the evidence we have is E actual = [ε 1 , ε 2 , ε 3 ], which is the evidence that modifies the 163 antecedent of the rule. In this case, our problem is to find CF(h, E actual ): This is the whole formulation of Shortliffe and Buchanan Certainty Factors Model, 165 which will serve as a basis for our work. 166 We have chosen this model to base this work for several reasons: (1) historically, was, there is still relevant work on certainty factors, such as [22][23][24][25].
|x⟩ IDEN T IT Y |x⟩

175
In Quantum Computing the information unit is the qubit. The qubit is a vector of a 176 Hilbert space represented, in the Dirac notation, by a column matrix (equ. 24) in such a 177 way that a bit 0 corresponds to a ket 0, and a bit 1 corresponds to a ket 1 [26].
However, quantum systems can be in coherent superposition, which means that 179 a quantum system can be simultaneously in the states ket 0 and ket 1. To describe this 180 peculiarity, we need a state function, ψ, that verifies the following restrictions [27]: Note that the 1-qubit |ψ⟩ is built from the parameters α and β, which are the 182 amplitudes of the state function. Also note that α and β are defined as complex numbers, 183 which means that they have phase information, which will allow to perform rotations.

184
This aspect will be treated later when we implement inaccurate knowledge.

185
A direct consequence of Heisenberg's indeterminacy principle [28], is that when 186 we observe (or measure) a given qubit in superposition, said qubit loses its quantum 187 properties and collapses, irreversibly, in classical bits with a given probability.  Quantum gates that operate on a single qubit or 1-qubit systems (one input qubit 205 and one output qubit) have associated 2 × 2 matrices. We will now see how we can 206 operate with some of these gates. We will start with the identity gate, I ( fig. 1), which, 207 although its behaviour does not modify the state of the input qubit, will serve to illustrate 208 the procedure for constructing the associated unitary matrix.
The behaviour of the unitary matrix of the I gate is as follows: Similar to the identity gate I, is the negation gate, N, usually described in quantum 212 computing as the X gate, which is as follows: Tensor products are used to build more complex systems of qubits. For example, we can build 2-qubit systems from the tensor product two 1-qubit systems. A 2-qubit system |x⟩|y⟩ = |x, y⟩ = |xy⟩ is constructed as |x⟩ ⊗ |y⟩. Therefore, if we consider the vectors of the basis for 1-qubit {|0⟩, |1⟩}, it follows that: Preprints (www.preprints.org) | NOT PEER-REVIEWED | Posted: 14 December 2021

221
In the context of 2-qubit systems, we will mention the CN gate (Controlled-Not), 222 that negates the second qubit if the first qubit is |1⟩.
Finally, in the context of 3-qubit systems, we will mention the CCN gate (Controlled-228 Controlled-NOT, or Toffoli gate), that negates the third qubit when the first qubit is |1⟩ 229 and second qubit is |1⟩.
An interesting question is that with the quantum gates N, CN and CCN we can 232 reproduce, in a probabilistic way, the behaviour of any conventional logical gate. If we 233 also want to explore all the possibilities, we will have to use H gates to set the state of After the measurement, we have close to 50% of bits 0 and close to 50% of bits 1,

246
which is what we expected. Figure 3 shows the outputs obtained after running the 247 program 1000 times in the IBM quantum simulator [31].   After the measurement, we have close to 25% for each of the possible outcomes, 256 which is what we expected. Figure 5 shows the outputs obtained after running the 257 program 1000 times in the IBM quantum simulator [31]. After the measurement, we have close to 25% for each of the possible outcomes, 266 which is what we expected. Figure 7 shows the outputs obtained after running the 267 program 1000 times in the IBM quantum simulator [31].
Note that in this case there is neither uncertainty (since rules are categorically true, 298 or categorically false) nor imprecision (since facts are categorically true, or categorically 299 false). However, inaccuracy appears spontaneously when propagating actual knowledge 300 through the inferential network, and this inaccuracy is the a priori probability that we 301 can expect given all possible cases that can be defined if H is our target.
Given that X, Y, and H are obtained through propagation, and in order to obtain 307 the a priori probability of H, we only need to set the values −1 or 1 for the facts A, B, C, 308 D and E, which implies to investigate 2 5 possibilities. The same applies for the rules R1, 309 R2 and R3, which implies to investigate 2 3 possibilities. This results in a total of 2 8 cases 310 to study. When doing this, the following results are obtained: As previously mentioned, we can design a quantum circuit to resolve the same 312 problem as above. Figure 9 illustrates the quantum inferential circuit equivalent to the 313 classical inferential circuit shown in figure 8.
c : / 1 0  information. Our proposal starts with the Bloch sphere ( fig. 10), which, in quantum 333 mechanics, is a geometric representation of the pure state space of a two-level quantum 334 system [32]. Note that when θ = 0 or θ = π, there is not inaccuracy, since we have pure qubital 347 states. In any other case, there is inaccuracy in the state function. According to this:

361
With the above ideas in mind, let us go back to the quantum inferential circuit of computing approach), which will be discussed in depth in the next section.

367
These experiments have been carried out using the myQLM [33] quantum frame-368 work of Atos, a partner of the NEASQC project [34]. 369 We have structured each of them according to the following scheme: The circuit is designed according to the case we are testing.

371
• The data that is employed in the test is defined. If we want to test our model for dealing with imprecision, figure 9 has to be modified 379 as shown in figure 11.
c : / 1 0 Figure 11. The quantum inferential circuit modified for the imprecision experiment.
The Hadamard gates of quantum lines q 0 , q 1 , q 5 , q 9 and q 10 have been replaced by 381 M(δ) gates, so as to configure inaccurate inputs. The Hadamard gates of quantum lines 382 q 3 , q 7 and q 13 have been substituted by X gates, in order to set the causal relationships 383 of the rules totally true (no uncertainty). Table 7 illustrates the input data that allows us to compare the classical approach 385 and the quantum approach for dealing with imprecision and the results obtained after 386 running both the classical and quantum inferential circuits.

384
387 Figure 12 illustrates the results obtained for the imprecision experiment, and shows 388 a high level of correlation between classical and quantum approaches, that follows a 389 polynomial distribution. 390 Table 7. Inputs and outputs for the imprecision experiment.

CF(A) CF(B) CF(C) CF(D) CF(E) S.B.
Q.C.  If we want to test our model for dealing with uncertainty, figure 9 has to be modified 392 as shown in figure 13.
• q 12 :  Table 8 illustrates the input data that allows us to compare the classical approach If we want to test our model for dealing with imprecision and uncertainty simulta-406 neously, figure 9 has to be modified as shown in figure 15. The Hadamard gates of quantum lines q 0 , q 1 , q 5 , q 9 and q 10 have been replaced by 408 M(δ) gates, so as to configure inaccurate inputs. The Hadamard gates of quantum lines 409 q 3 , q 7 and q 13 have been substituted by M(δ) gates so as to configure inaccurate rules.
410 Table 9 illustrates the input data that allows us to compare the classical approach 411 and the quantum approach for dealing with imprecision and uncertainty simultaneously 412 and the results obtained after running both the classical and quantum inferential circuits.
413 Figure 16 illustrates the results obtained for the imprecision and uncertainty experi-414 ment, and shows a high level of correlation between classical and quantum approaches, 415 following a polynomial distribution.
416 Table 9. Inputs and outputs for the imprecision and uncertainty experiment.

417
The main objective of this work has been to check whether classical inaccurate or neural networks [35]. So, while it may be controversial, we think that this new 444 quantum approach could be useful for the sake of knowledge transmission through 445 inferential circuits, although we need to work further in the subject in order to make a 446 clear statement about this hypothesis.

447
Analysing each of the scenarios, we verify that when we only use imprecision, 448 the correlation coefficient between both models is 0.9578, which allows us to suspect 449 that indeed classical imprecision and quantum imprecision can become extrapolated.

450
If we analyse the second of the scenarios, in which we only consider uncertainty, we 451 find a polynomial correlation coefficient of 0.9985, which represents a qualitative and 452 quantitative leap that almost allows us to affirm that said correlation is more than a 453 suspicion. Analysing the two scenarios separately, the largest deviations are obtained 454 with imprecision rather than uncertainty. When we analyse the third scenario, that is, 455 considering both imprecision and uncertainty, the polynomial correlation coefficient is 456 0.9922, which, being high, is located between the two previous extreme cases. This is 457 undoubtedly due to the fact that imprecision penalizes uncertainty, so we can deduce 458 that the hybrid model behaves as expected.

459
In the context of this work, it could be interesting to develop a quantum imple-460 mentation other models of inexact knowledge treatment, such as fuzzy models [17], the 461 evidential theory of Dempster and Shafer [18], or the Bayesian networks [19]. Some 462 work has already been done in this area and the results seem promising. For example,

463
Nabadan [36] suggested the algebraic connections between classical logic and its general-464 izations, such as fuzzy logic and quantum logic, Vourdas [37] proposed an interpretation