Introduction

Probability theory has a lot of applications in many areas of science and engineering. In particular probabilistic modelling has strong impact in development of artificial intelligence, providing tools for knowledge representation, knowledge management and reasoning [1]. Many problems related to computer vision, speech recognition, extraction of information or diagnosis of diseases can be modelled by probabilistic graphical models which structures describe conditional dependencies between random variables [2]. This kind of models is indirectly related with Bayesian reasoning, which is a method of statistical inference based on Bayes’ theorem. Bayesian reasoning gives a possibility of decision making under uncertainty, which leads to updating of beliefs in light of new information. The Bayesian approach to reasoning can be used in the well-known Monty Hall problem, which can be considered as a counterintuitive two-step decision problem. The probabilistic analysis of this problem develops an intuition about updating a prior belief as new evidence becomes, which gives a deeper understanding of Bayesian methods used in the artificial intelligence. Consequently, we use the Monty Hall problem as an illustration of quantum Bayesian reasoning based on quantum information theory and quantum inferring acausal structures.

Cerf and Adami [3, 4] introduced a quantum conditional amplitude operator as an extension of conditional probability distribution. This approach allowed to complement of relationship between Shannon conditional entropy and von Neumann conditional entropy. In this context, quantum conditional operators are considered as a generalization of classical conditional probability distributions.

Definition of conditional states was extended in the context of quantum channel by Leifer [5]. He connected classical conditional probabilities and bipartite density operators with variant of well-known Jamiołkowski isomorphism. Subsequently, Leifer with Spekkens [6, 7] presented formalism of quantum inferring structures based on quantum conditional states. They described two cases of structures: causal (one system at two times) and acausal (two systems at a single time).

Quantum inferring structures based on quantum probability theory allow for a novel causal interpretation and generalization of the results of quantum mechanics. Recently, in many scientific disciplines, the inferring causal and acausal relations from observed correlations are relevant problems. The framework of quantum conditional operators was used by Brunker [8] to investigate quantum causality. The author assumed, that indefinite causal structures could provide methodological tools in quantum theories of gravity. In [9], the authors used the quantum conditional operators as causal maps to consideration of the problem of causal inference for quantum variables. They introduced the concept of causal tomography, which unifies conventional quantum tomography schemes and provides a complete solution of the causal inference problem using a quantum analogue of a randomized trial.

Quantum conditional operators

In [6, 7], Leifer and Spekkens introduced a definition of elementary region as a quantum system at fixed point in time. By them, the relations between regions were described in two contexts. In the first case, elementary regions AB are causally related. It means that there is casual inference from A to B, e.g. it can be a single system at two times. In the second case, the AB are acausally related, it means that elementary regions represent two distinct systems at a fixed time. In this paper, the emphasis is put on the elementary regions acausally related.

Let \(\mathcal {L}(\mathcal {H})\) be the set of linear operators on complex Hilbert space \(\mathcal {H}\). The classical probability distribution can be generalized by density operator \(\rho _A\in \mathcal {L}{(\mathcal {H}_A)}\) (\(\rho _A=\rho ^\dagger \), \(\rho _A\ge 0\), \(\mathrm {Tr}(\rho _A)=1\)). The analogue of joint probability distribution for quantum systems AB is a density operator \(\rho _{AB}\in \mathcal {L}(\mathcal {H}_{A}\otimes \mathcal {H}_{B})\). Moreover, the analogue of marginalization over a joint distribution is the partial trace of quantum state, i.e. \(\rho _A=\mathrm {Tr}_B(\rho _{AB})\). An acausal conditional state [10] for B given A is a positive operator \(\rho _{B|A}\in \mathcal {L}(\mathcal {H}_{AB})\) that satisfies

$$\begin{aligned} \mathrm {Tr}_B(\rho _{B|A})=\mathrm {I}_{A}, \end{aligned}$$
(1)

where \(\mathrm {I}_A\) is the identity operator from \(\mathcal {L}(\mathcal {H}_{A})\). Conditional operators can be defined by the usage of \(\star \) product [6], where \(\star : \mathcal {L}(\mathcal {H})\rightarrow \mathcal {L}(\mathcal {H})\) and

$$\begin{aligned} \sigma _A\star \sigma _B = \sigma _B^\frac{1}{2} \sigma _A \sigma _B^\frac{1}{2}, \end{aligned}$$
(2)

for \(\sigma _A,\sigma _B\in \mathcal {L}(\mathcal {H})\). Hence, the conditional operator is expressed as

$$\begin{aligned} \rho _{B|A}=\rho _{AB}\star (\rho _A^{-1}\otimes \mathrm {I}_B)=(\rho _A^{-\frac{1}{2}}\otimes \mathrm {I}_B) \rho _{AB}(\rho _A^{-\frac{1}{2}}\otimes \mathrm {I}_B), \end{aligned}$$
(3)

where \((\cdot )^{-1}\) denotes the Moore-Penrose pseudoinverse. Similarly as in classical probability theory, the following equation holds true

$$\begin{aligned} \rho _{AB}=\rho _{B|A}\star (\rho _A\otimes \mathrm {I}_B). \end{aligned}$$
(4)

The occurrence of the event \(| b \rangle \langle b |\) on the subsystem B causes the transformation of \(\rho _{AB}\) into

$$\begin{aligned} \rho _{A,B= b}&= \frac{(\mathrm {I}_A\otimes | b \rangle \langle b |)\rho _{AB}(\mathrm {I}_A\otimes | b \rangle \langle b |)}{\mathrm {Tr}((\mathrm {I}_A\otimes | b \rangle \langle b |)\rho _{AB})}. \end{aligned}$$
(5)

The comma in index of \(\rho _{A,B=b}\) is used only for readability. The marginal probability distribution acting on subsystem A after the transformation is given as

$$\begin{aligned} \rho _{A}^{B= b} = \mathrm {Tr}_B ( \rho _{A,B= b}). \end{aligned}$$
(6)

Summing up, given an initial \(\rho _A\) one can compute an updated \(\rho _{A}^{B=b}\) by first computing \(\rho _{AB}\) using \(\rho _{B|A}\) and Eq. (4) and the following Eqs. (5) and (6).

Inferring acausal structures

The graphical model is defined as a probabilistic model for which the conditional dependence between random variables are defined by a graph. It can be used for statistical inference under a set of random variables. Replacing classical random variables by their quantum counterparts gives a class of quantum structures, which can be used for inferring amongst a set of quantum states.

Let us consider operators \(\rho _{B|A}\in \mathcal {L}(\mathcal {H}_{AB})\) and \(\rho _A\in \mathcal {L}(\mathcal {H}_{A})\). The state \(\rho _{B|A}\) characterizes conditional relationship between systems A and B. In this case, the state of system B can be expressed as

$$\begin{aligned} \rho _B = \mathrm {Tr}_A(\rho _{B|A}\star (\rho _A\otimes \mathrm {I}_B)). \end{aligned}$$
(7)

In classical probability theory, this formula is called the law of total probability. Figure 1 illustrates graphical interpretation of reasoning over \(\rho _{B|A}\) and \(\rho _A\), what can be considered as simple Bayesian network.

Fig. 1
figure 1

Graphical interpretation of relationship between variables represented by quantum states. The state of quantum system B is expressed as \(\rho _B=\mathrm {Tr}_A(\rho _{B|A}\star (\rho _A\otimes \mathrm {I}_B))\)

The conditional relationship associated with graphical structure of the network allows to rewrite the joint state of A and B as follows

$$\begin{aligned} \rho _{AB}= \rho _{B|A}\star ( \rho _A \otimes \mathrm {I}_B). \end{aligned}$$
(8)

Consider the structure given in Fig. 2 described by state \(\rho _A\) and conditional states \(\rho _{B|A}\) and \(\rho _{C|A}\). To obtain joint state of A and B or A and C, we use formulas

$$\begin{aligned} \rho _{AB}= & {} \rho _{B|A}\star ( \rho _A \otimes \mathrm {I}_B), \nonumber \\ \rho _{AC}= & {} \rho _{C|A}\star ( \rho _A \otimes \mathrm {I}_C). \end{aligned}$$
(9)
Fig. 2
figure 2

Inferring structure with three random variables represented by \(\rho _A,\rho _{B|A}\) and \(\rho _{C|A}\)

The join state of A, B and C can be obtained by using the formula

$$\begin{aligned} \rho _{ABC}= (\rho _{C|A}\otimes \mathrm {I}_B) \star (\rho _{B|A}\otimes \mathrm {I}_C) \star (\rho _{A}\otimes \mathrm {I}_B\otimes \mathrm {I}_C). \end{aligned}$$
(10)

Acausal relations between quantum states can be described by quantum Bayesian networks [10] defined as a pair \((\mathbb {G}, \mathbb {D})\) where

  • \(\mathbb {G}=(\mathbf{X}, \mathbf{E})\) is a directed acyclic graph, where each vertex \(X_i\in \mathbf{X}\) is associated to a quantum system with space \(\mathcal {L}(\mathcal {H}_{i})\).

  • \(\mathbb {D}=\{\rho _{{X_i}|\Pi _{X_i}}:1\le i \le N\}\) is the set of the conditional operators between node \(X_i\) and its parents \(\Pi _{X_i}\).

The quantum Bayesian network can be interpreted as a quantum system associated with space \(\mathcal {L}(\mathcal {H}_{1}\otimes \cdots \otimes \mathcal {H}_{N})\). The conditional independence relationship associated with a graphical structure of Bayesian network allows to rewrite the generalized joint distribution of \(\mathbf{X}\) as follows

$$\begin{aligned} \rho _{X_1X_2\dots X_N}=\big (\bigstar \big )_{i=1}^N \rho _{{X_i}|\Pi _{X_i}} \end{aligned}$$
(11)

where \(\big (\bigstar \big )_{i=1}^N \rho _{{X_i}|\Pi _{X_i}}=\rho _{{X_1}|\Pi _{X_1}} \star \cdots \star \rho _{{X_N}|\Pi _{\mathcal {X}_N}}\). In Eq. (11), each factor \(\rho _{{X_i}|\Pi _{X_i}}\) should be expressed as \(\mathrm {I}\otimes \rho _{{X_i}|\Pi _{X_i}}\otimes \mathrm {I}\), but we drop identity operators and Kronecker products for simplicity.

Leifer and Poulin [10] emphasize the fact, that quantum graphical models have significant applications in quantum error corrections and the simulation of many-body quantum systems.

Acausal structure in Monty Hall game

In this section, we present the usage of the quantum inferring structures in modelling a quantum system inspired by a well-known Monty Hall problem based on the popular game show Let’s Make a Deal. The problem was first described by Selvin in [11, 12]. Subsequently, the Monty Hall problem has been considered as a subject of many investigations, i.e. this issue is modelled through a formal application of Bayes’ rule [13, 14]. In [15], the Monty Hall game was generalized to the quantum domain. The paper shows that fair zero-sum game can be realized if the quantum measurement strategy is permitted. A more detailed discussion about quantum Monty Hall can be found at [16, 17], where authors consider many scenarios. In [18, 19], the effect of decoherence on results of the game was analysed.

Classical scenario of the Monty Hall game is as follows. There are two participants of the game: host and player. Assume that three doors labelled 0, 1 and 2 are closed. A car is behind one of the doors, while the goats are behind the other two. The host knows which of the three doors hides the car, but the player does not know where the main prize is hidden. The player picks a door and subsequently, the host opens one of the remaining doors, revealing a goat. Finally, the player selects one of the remaining doors. The question is: should the player stick to his/her original choice or pick the other door?

Classical case

The Monty Hall game can be modelled as a simple Bayesian network with three random variables \(X_A,X_B,X_C\), whose graph is presented in Fig. 3. The variable \(X_A\) represents the player’s information about which door contains the prize. Initially, the player do not have any knowledge about this, and thus we assume that probability distribution P(X) is uniform and is given by (1 / 3, 1 / 3, 1 / 3). The \(X_B\) describes the first choice of the player and we also assume that the probability distribution of \(X_B\) is (1 / 3, 1 / 3, 1 / 3). The random variable \(X_C\) depends on the \(X_A,X_B\) and describes selected door by the host. The probability distribution \(P(X_C|X_A,X_B)\) is given in Table 1.

Fig. 3
figure 3

Bayesian network describing Monty Hall game

Table 1 Probability of choosing door by host

Now, given the computational basis \(\{| ijk \rangle \}\) for \(0\le i,j,k\le 2\), we create an analogous quantum Bayesian network, where the random distributions \(P(X_A)\), \(P(X_B)\), \(P(X_C|X_A,X_B)\) are replaced by

$$\begin{aligned} \rho _A= & {} {\text {diag}}\left( {\frac{1}{3}},{\frac{1}{3}}, {\frac{1}{3}}\right) , \nonumber \\ \rho _B= & {} {\text {diag}}\left( {\frac{1}{3}},{\frac{1}{3}}, {\frac{1}{3}}\right) , \nonumber \\ \rho _{C|AB}= & {} {\text {diag}}\left( 0,{\frac{1}{2}}, {\frac{1}{2}},0,0,1,0,1,0, \right. \nonumber \\&\phantom {\,={\text {diag}}(}\left. 0,0,1,{\frac{1}{2}},0, {\frac{1}{2}},1,0,0, \right. \nonumber \\&\phantom {\,={\text {diag}}(} \left. 0,1,0,1,0,0,{\frac{1}{2}}, {\frac{1}{2}},0 \right) . \end{aligned}$$
(12)

Next, we determine

$$\begin{aligned} \rho _{ABC} = \rho _{C|AB} \star ( \rho _{A}\otimes \mathrm {I}_B\otimes \mathrm {I}_C) \star ( \mathrm {I}_A\otimes \rho _B\otimes \mathrm {I}_C), \end{aligned}$$
(13)

which describes the state of composite quantum system ABC identified with graph in Fig. 3. Note that \(\star \) product is non-associative in general but when the factors in the product commute it is associative. Thus, taking into account given diagonal matrices \(\rho _A\), \(\rho _B\) and \(\rho _{C|AB}\), obtained state (13) can be expressed in form \({\rho _{ABC} =\frac{1}{9}\rho _{C|AB}}\).

Let us assume that the player chooses b-th door, where doors are labelled by 0, 1 and 2. Hence, we assume that measurement labelled by b is performed on subsystem B and the state \(\rho _{AB}\) is transformed into

$$\begin{aligned} \rho _{A,B= b,C} = \frac{(\mathrm {I}_A\otimes | b \rangle \langle b |\otimes \mathrm {I}_C) \rho _{ABC}(\mathrm {I}_A\otimes | b \rangle \langle b |\otimes \mathrm {I}_C)}{\mathrm {Tr}((\mathrm {I}_A\otimes | b \rangle \langle b |\otimes \mathrm {I}_C) \rho _{ABC})}. \end{aligned}$$
(14)

Afterwards, the host opens the c-th door. Similarly, the measurement labelled by c is performed on subsystem C and we get

$$\begin{aligned} \rho _{A,B= b,C= c} = \frac{(\mathrm {I}_A\otimes \mathrm {I}_B \otimes | c \rangle \langle c |) \rho _{A,B= b,C}(\mathrm {I}_A\otimes \mathrm {I}_B \otimes | c \rangle \langle c |)}{\mathrm {Tr}((\mathrm {I}_A\otimes \mathrm {I}_B \otimes | c \rangle \langle c |) \rho _{A,B= b,C})}. \end{aligned}$$
(15)

After performed measurements, state of subsystem A is given by

$$\begin{aligned} \rho _A^{B= b,C= c} = \mathrm {Tr}_{BC}( \rho _{A,B= b,C= c}). \end{aligned}$$
(16)

State \(\rho _A\) has encoded a priori information about position of prize, which is updated under observed evidences. Thus, state \(\rho _A^{B= b,C= c}\) represents updated player’s knowledge about doors which can contain the prize, with assumption that firstly the player chose door b and the host opened door c.

Since, the host knows where the car is hidden, we assume that \(b \not = c\). Suppose, that player chooses 0-th door and the host opens 1-st door. Hence, using Eqs. (13)-(16) we get

$$\begin{aligned} \rho _A^{B= 0,C= 1}=\begin{bmatrix} \frac{1}{3}&0&0 \\ 0&0&0 \\ 0&0&\frac{2}{3} \end{bmatrix}.\end{aligned}$$
(17)

The solution obtained above corresponds to optimal player’s strategy in classical Monty Hall game. According to the probability distribution (17), the player should change his/her first decision. In general, for any \(a,b,c\in \{0,1,2\}\) such that \(a \not = b\), \(b \not = c\) and \(a \not = c\) equality \(\langle a | \rho _A^{B= b,C= c} | a \rangle =\frac{2}{3}\) holds. It means that, if the player changes his/her first choice, then the probability of winning the car is \(\frac{2}{3}\) .

Non-classical case

In the non-classical case, we assume, that systems A describing the prize position and B describing the first choice of the player are entangled. The state \(\rho _{AB}\) must satisfy following conditions:

  1. 1.

    \(\langle k |\mathrm {Tr}_A (\rho _{AB})| k \rangle = \langle k |\mathrm {Tr}_B (\rho _{AB}) | k \rangle = \frac{1}{3}\) for \(k\in \{0,1,2\}\),

  2. 2.

    \(\langle c |\rho _{A}^{B=b,C=c} | c \rangle =0\) for all \(b,c\in \{0,1,2\}\) such that \(b\ne c\).

The second condition implies, that the host cannot open the door with the prize behind it. In our considerations, the behaviour of player and host is similar like in classical case. It means that the player do not have access to quantum strategies. However, we assume that quantum effects occur between position of prize and player’s first decision but participants of the game don’t know about it.

Suppose that system is in state

$$\begin{aligned} \tilde{\rho }_{AB} = \frac{1}{3} ( | 00 \rangle + | 11 \rangle + | 22 \rangle )( \langle 00 | + \langle 11 | + \langle 22 |). \end{aligned}$$
(18)

After tracing-out this state we get

$$\begin{aligned} \tilde{\rho }_A= & {} \mathrm {Tr}_B (\tilde{\rho }_{AB} ) = {\text {diag}}\left( {\frac{1}{3}},{\frac{1}{3}},{\frac{1}{3}}\right) , \nonumber \\ \tilde{\rho }_B= & {} \mathrm {Tr}_A (\tilde{\rho }_{AB} ) = {\text {diag}}\left( {\frac{1}{3}},{\frac{1}{3}},{\frac{1}{3}} \right) . \end{aligned}$$
(19)

Thus \(\tilde{\rho }_A\) and \(\tilde{\rho }_B\) are maximally mixed and given reduced states correspond to the states from the previous section. Since states of systems A and B are entangled, we describe a inferring structure of this scenario according to Fig. 4.

Fig. 4
figure 4

Zigzag line means quantum dependence between states of systems A and B (entanglement) and arrows mean classical dependencies

Let us notice, that \(\tilde{\rho }_{AB}\) is a pure state, hence the equations \(\tilde{\rho }_{AB}^{\frac{1}{2}}=\tilde{\rho }_{AB}\) and \(\tilde{\rho }_{ABC}=\rho _{C|AB}\star (\tilde{\rho }_{AB}\otimes \mathrm {I}_C)= (\tilde{\rho }_{AB}\otimes \mathrm {I}_C)\rho _{C|AB}(\tilde{\rho }_{AB}\otimes \mathrm {I}_C)\) hold true. Using the same state \(\rho _{C|AB}\) as in (12) and proceeding similarly like in (13)–(17) we get for \(b=0\) and \(c=1\) following results

$$\begin{aligned} \tilde{\rho }_A^{B= 0,C= 1} = \begin{bmatrix} 1&0&0\\ 0&0&0\\ 0&0&0 \end{bmatrix}, \end{aligned}$$
(20)

Note that \(\langle 0 |\tilde{\rho }_A^{B= 0,C= 1}| 0 \rangle =1\). In general, the equality \(\langle b | \tilde{\rho }_A^{B= b,C= c} | b \rangle =1\) holds for any \(b,c\in \{0,1,2\}\) such that \(b\ne c\). It means, that if player don’t change his/her first choice, then he/she always win a prize.

Similar case in quantum Monty Hall game was considered by Flitney and Abbott in [17], where the authors assumed that the players are permitted to select quantum strategies. As a result, if both players have access to quantum strategies, then there is a Nash equilibrium amongst mixed quantum strategies. We will show that there exist initial quantum state \(\rho _{AB}\) for which the game is fair without permission to quantum strategies of the players.

Now consider another quantum state

$$\begin{aligned} \hat{\rho }_{AB}&= \frac{1}{6} (| 01 \rangle +| 10 \rangle )(\langle 01 |+\langle 10 |) \nonumber \\&\quad +\frac{1}{6} (| 02 \rangle +| 20 \rangle )(\langle 02 |+\langle 20 |) \\&\quad +\frac{1}{6} (| 12 \rangle +| 21 \rangle )(\langle 12 |+\langle 21 |). \nonumber \end{aligned}$$
(21)

Here we achieved opposite results. For any \(a,b,c\in \{0,1,2\}\) such that \( a\ne b\), \(b\ne c\) and \(a\ne c\) we have \(\langle a | \hat{\rho }_A^{B= b,C= c} | a \rangle =1\). Hence, in this case, if the player behaves like in classical scenario, then his/her probability of winning is equal to 1.

Subsequently, let us consider convex combination of \(\tilde{\rho }_{AB}\) and \(\hat{\rho }_{AB}\)

$$\begin{aligned} \bar{\rho }_{AB} = \lambda \tilde{\rho }_{AB} + (1-\lambda )\hat{\rho }_{AB}. \end{aligned}$$
(22)

For all \(\lambda \in [0,1]\) the state \(\rho _{AB}\) satisfies conditions specified at the beginning of this section. The probability of winning the prize by the player, under assumption that the player’s first decision remains unchanged, is shown in Fig. 5. Moreover, for \(\lambda =0.6\) and \(a,b,c\in \{0,1,2\}\), where \( a\ne b\) and \(b\ne c\) we get \(\langle a |\bar{\rho }_A^{B= b,C= c} | a \rangle =\frac{1}{2}\). Thus, the player and the host win with equal probability and the game is fair.

Fig. 5
figure 5

Probability of winning the prize, when player does not change the door for the initial state given by \(\bar{\rho }_{AB} = \lambda \tilde{\rho }_{AB} + (1-\lambda )\hat{\rho }_{AB}\)

Last example is very unintuitive. Consider following state

$$\begin{aligned} \breve{\rho }_{AB}&= \frac{1}{6} (| 00 \rangle +| 01 \rangle )(\langle 00 |+\langle 01 |) \nonumber \\{}&\quad +\frac{1}{6} (| 11 \rangle +| 12 \rangle )(\langle 11 |+\langle 12 |) \nonumber \\&\quad +\frac{1}{6} (| 22 \rangle +| 20 \rangle )(\langle 22 |+\langle 20 |) . \end{aligned}$$
(23)

As a result we have

$$\begin{aligned} \breve{\rho }_{A}^{B=0,C=1}&= \begin{bmatrix} \frac{1}{4}&0&0 \\ 0&0&0 \\ 0&0&\frac{3}{4} \end{bmatrix},&\breve{\rho }_{A}^{B=1,C=2}&= \begin{bmatrix} \frac{3}{4}&0&0 \\ 0&\frac{1}{4}&0 \\ 0&0&0 \end{bmatrix},&\breve{\rho }_{A}^{B=2,C=0}&= \begin{bmatrix} 0&0&0 \\ 0&\frac{3}{4}&0 \\ 0&0&\frac{1}{4} \end{bmatrix}, \end{aligned}$$
(24)
$$\begin{aligned} \breve{\rho }_{A}^{B=0,C=2}&= \begin{bmatrix} 1&0&0 \\ 0&0&0 \\ 0&0&0 \end{bmatrix},&\breve{\rho }_{A}^{B=1,C=0}&= \begin{bmatrix} 0&0&0 \\ 0&1&0 \\ 0&0&0 \end{bmatrix},&\breve{\rho }_{A}^{B=2,C=1}&= \begin{bmatrix} 0&0&0 \\ 0&0&0 \\ 0&0&1 \end{bmatrix}. \end{aligned}$$
(25)

Above results show that the player shouldn’t change his first decision b only if the \(c=(b+2)(\!\!\mod 3)\)-th door has been opened. However, the host can minimize the player’s chance to \(\frac{3}{4}\) by opening the \(c=(b+1)(\!\!\mod 3)\)-th door.

Conclusions

In this paper, we showed the approach based on quantum inferring acausal structures to reasoning in quantum information theory. Considered structures can be identified with a generalization of Bayesian networks, which concept is based on investigations of Leifer and Poulin [10]. Proposed methodology was used to construct quantum model inspired by scenario of Monty Hall game.

The model was investigated both in classical and quantum case, whereby we showed that the entanglement of quantum states has influence on results of reasoning. We show that there exist quantum state for which Monty Hall game is fair under assumption that the player and the host do not have access to quantum strategies.