# Fault Diagnosis in Partially Observable Petri Nets with Quantum Bayesian Learning
## 3 A Quantum Bayesian Fault Diagnosis Method for Partially Observable Petri Nets  
### Quantum Bayesian Probability Estimation  
The Bayesian network \(B(G,P)\) consists of a directed acyclic graph \(G\) of \(n\) nodes and the conditional probability table \(Pr_{t}\) of each node [7,8]. Domain \(U=\{x_{1},x_{2},\cdots,x_{n}\}\) is the node variable of \(G\). \(p(x_{i}|parents(x_{i}))\) denotes the conditional probability of the variable set in the node \(x_{i}\) and the parent node \(parents(x_{i})\). The joint probability distribution of all variables in the Bayesian network is as follows:  
\[Pr(U)=p(x_{1},x_{2},\cdots,x_{n})=\prod_{i=1}^{n}Pr(x_{i}|parents(x_{i})) \tag{2}\]  
In Bayesian networks, let \(e\) be the observable variable and \(\gamma\) be the unobservable variable. Then, for the variable \(x_{i}\):  
\[Pr(x_{i}=x_{ij}|e)=\alpha Pr(x_{ij},e)=\alpha\left[\sum_{y\in\gamma}Pr(x_{ij}, e,y)\right] \tag{3}\]  
For the random variables \(x_{i}\), the number of basic events \(\{x_{i1},x_{i2},\cdots,x_{im}\}\) is \(m\), and normalization factor \(\alpha\ \ =\ \frac{1}{x_{ij}\in x_{i}}\frac{1}{p(x_{i}=x_{ij},e)}\).  
In quantum Bayesian networks, quantum probability amplitude is used to replace the real probability quantity:  
\[Pr(U)=Pr(x_{1},x_{2},\cdots,x_{n})=\left|\prod_{i=1}^{n}\varphi(x_{i}|parents( x_{i}))\right|^{2} \tag{4}\]  
Application of the Born rule to Equation (3):  
\[Pr(x_{i}\ =\ x_{ij}|e)=\alpha\left|\sum_{y}\prod_{i=1}^{n}\varphi(x_{ij}| parents(x_{ij}),e,y)\right|^{2} \tag{5}\]  
By expanding Equation (5), we obtain the quantum interference formula:  
\[Pr(x_{i}\ =\ x_{ij}|e)\ =\ \alpha\left(\begin{array}{c}\sum\limits_{k=1}^{| \gamma|}\left|\sum\limits_{i=1}^{|\gamma|}\varphi(x_{ij}\ \big{|}\ parents(x_{ij}),e,y\ =\ k)\right|^{2}\\ +\ 2\ \cdot\ Interference\end{array}\right) \tag{6}\]  
and where  
\[Interference=\sum\limits_{k=1}^{|\gamma|-1}\ \sum\limits_{m=k+1}^{|\gamma|} \left|\varphi(x_{ij}|parents(x_{ij}),e,y=k)\right|\]  
\[\cdot\left|\varphi(x_{ij}|parents(x_{ij})),e,y=m\right|\cos(\theta_{i}-\theta _{j})\]  
When \(\theta_{i}-\theta_{j}=\pi/2\) and \(\cos(\theta_{i}-\theta_{j})=0\), the quantum Bayesian network is transformed into the classical Bayesian network.  
Using the backward reasoning of Bayesian estimation, the posterior probabilities of \(x_{i}=x_{ij}\) can be calculated from the Equations (4) and (6):  
\[Pr(x_{i}=x_{ij}|x_{1},\cdots x_{i-1},x_{i+1},\cdots x_{n})=\] \[\frac{\Pr(x_{i}=x_{ij})\left|\prod\limits_{i\
eq i}^{n}\varphi(x_{ i}|parents(x_{i}))\right|^{2}}{\sum\limits_{k=1}^{n}\left(Pr(x_{i}=x_{kj}) \left|\prod\limits_{e\
eq i}^{n}\varphi(x_{i}|parents(x_{i}))\right|^{2} \right)} \tag{7}\]  
From the view of quantum mechanics, the quantum parameters generated by the interference effect are the displacement of the energy wave. From the perspective of quantum cognition, they can be interpreted as the association between events and the shared semantic relationship between them.  
**Definition 8**.: _The reliability of the fault set in the PN is called confidence [9] and it is denoted by \(F_{b}\). Given the probability sequence set corresponding to the fault transition \(T_{f}^{i}\) is \(Q(\sigma_{o})\), then_  
\[F_{b}=\frac{Q\Big{(}\sigma_{o},T_{f}^{i}\Big{)}}{Q(\sigma_{o})} \tag{8}\]  
**Definition 9**.: _Quantum Bayesian Petri nets (QBPN) are defined as a seven tuple: \(N_{QB}=(S,T_{QB_{s}},T_{QB_{s}},\text{Pre},\text{Post},\psi,M_{0})\). In QBPN, \(T_{QB_{s}}\subseteq T_{o}\) is the observable transition set, \(T_{QB_{u}}\subseteq T_{u}\) is the unobservable transition set. \(T_{QB}=T_{QB_{o}}\cup T_{QB_{u}}\), and \(\psi\) is quantum probability table of \(t_{i}\in T_{QB}\)._