1 Introduction

Quantum game theory is a field developed at the interface between game theory and quantum computing. This interdisciplinary area of research assumes that games are played with the use of objects that behave according to the postulates of quantum mechanics. The theory has begun with using quantum computing formalism to a sequential game called PQ Penny Flip [1], where it was shown that the quantum player has a strategy that will always win against a player who only uses classical strategies. The first formal approach to playing a general \(2\times 2\) game was introduced by Eisert et al. [2]. They used their scheme for the Prisoner’s Dilemma game and showed that the players’ strategies extended to the two-parameter unitary operators can lead to the Pareto-optimal Nash equilibrium. Another quantum approach to \(2\times 2\) games was presented in [3] and further generalized to \(m\times n\) bimatrix games in [4]. Marinatto and Weber defined a scheme in which unitary operators are restricted to the identity and the Pauli operator X with which the players act on a two-qubit state. The quantum scheme that goes beyond bimatrix games is the one introduced by Li et al. in [5] and generalized in [6].

Application of quantum computing to game theory can go beyond standard games and explore single-player decision problems, in particular, as we show in this paper, decision problems with imperfect recall. This type of games has gained interest after appearance of the paper [7]. Piccone and Rubinstein introduced the problem of the absentminded driver which led to several comments and discussions. The problem concerns the driver who drives home on a highway. There are two highway exits, and the driver needs to choose the second one to get home. However, the essential assumption of the problem is that the driver suffers from imperfect recall what makes getting home difficult for him. In the version of the problem introduced in [7], the optimal strategy yielding the expected payoff equal to 4/3 is to drive straight with probability 2/3 (hereafter, we assume the model parameters as in [7]).

One of the main reasons for studying games in the quantum domain is a possibility of better correlation of players’ strategies and thus obtaining payoffs higher than in the classical case. The works [8,9,10] are some of the many examples of papers showing the advantage of using quantum computing in \(2\times 2\) games. There are also benefits from using the quantum approach for decision problems described by single-player games. In particular, a decision maker can increase his payoff in decision problems with imperfect recall. First attempts to use the notion of qubits in the problem of absentminded driver were presented in [11]. The authors applied the maximally entangled two-qubit state to prove that the decision maker can obtain the expected payoff equal to 2. Another paper [12] confirmed the previous payoff result. In this case, the Eisert–Wilkens–Lewenstein scheme [2] was applied.

Both models of quantum playing the absentminded driver problem implied the optimal payoff of 2. Therefore, the natural question arises whether that outcome is an upper bound for all quantum schemes.

In Sect. 2, we reformulate the Eisert–Wilkens–Lewenstein scheme to adapt it to the problem of absentminded driver. Section 3 is devoted to the introduction of the classical absentminded driver model along with the calculation of the optimal strategy for the problem of two and n intersections. In Sect. 4, in addition to [12], we study three initial states—entangled as well as separable ones—and analyze which one gives the highest payoff value. As we show, the model enables the decision maker to obtain the maximum payoff provided for the game equal to 4, by using separable initial states. In Sect. 5, we prove that the optimal strategy based on separable initial states can be generalized to the problem of n intersections, while preserving the same highest payoff. The decision problem of the absentminded driver in the quantum domain can be thus fully solved. We test the proposed model for \(n=4\), on IBM-Q. In Sect. 6, we also analyze the effect of initial state entanglement on the game result and show that in spite of its lack, the optimal strategy cannot be reproduced by classical probability.

2 The Eisert–Wilkens–Lewenstein scheme

In this section, we review a generalized form of the Eisert–Wilkens–Lewenstein scheme for \(2\times 2\) bimatrix games that we use in our work. The presented approach is similar to [13].

A \(2\times 2\) bimatrix game is a two-person game with two-element sets of strategies that can be described by two \(2\times 2\) matrices

$$\begin{aligned} (A,B) = \begin{pmatrix} (a_{00}, b_{00}) &{} (a_{01}, b_{01})\\ (a_{10}, b_{10}) &{} (a_{11}, b_{11}) \end{pmatrix}. \end{aligned}$$
(1)

Player 1’s strategies are identified with the rows, player 2’s strategies are identified with the columns. If player 1 chooses row k and player 2 chooses column l, their resulting payoffs are \(a_{kl}\) and \(b_{kl}\), respectively.

The quantum version of this game depends on the choice of the initial state

$$\begin{aligned} |\Psi (\gamma )\rangle = (\cos {(\gamma /2)}|00\rangle + i\sin {(\gamma /2)}|11\rangle , \end{aligned}$$
(2)

where \(\gamma \in [0,\pi /2]\) is a real parameter which is a measure of the initial state entanglement. Let

$$\begin{aligned} C_{0} = \begin{pmatrix} 1 &{} 0 \\ 0 &{} 1 \end{pmatrix}, \quad C_{1} = \begin{pmatrix} 0 &{} i \\ i &{} 0 \end{pmatrix} \end{aligned}$$
(3)

represent the two possible actions of the driver: “exit” or “continue,” respectively. For \(k,l \in \{0,1\}\) define

$$\begin{aligned} |\Psi _{kl}(\gamma )\rangle = C_{k}\otimes C_{l} |\Psi (\gamma )\rangle . \end{aligned}$$
(4)

Then \(\{|\Psi _{kl}(\gamma )\rangle :k,l \in \{0,1\}\}\) is a basis of \(\mathbb {C}^2\otimes \mathbb {C}^2\) for any \(\gamma \in [0,\pi /2]\).

Definition 1

The Eisert–Wilkens–Lewenstein approach for the initial state (2) to the game (1) is defined by a triple

$$\begin{aligned} (N, (D_{i})_{i\in N}, (v_{i})_{i\in N}), \end{aligned}$$
(5)

where

  • \(N = \{1,2\}\) is the set of players,

  • \(D_{i}\) is a set of unitary operators from \(\mathsf {SU}(2)\) with typical elements

    $$\begin{aligned} U_{i}(\theta _{i}, \alpha _{i}, \beta _{i}) = \begin{pmatrix} e^{i\alpha _{i}}\cos \frac{\theta _{i}}{2} &{} ie^{i\beta _{i}}\sin \frac{\theta _{i}}{2} \\ ie^{-i\beta _{i}}\sin \frac{\theta _{i}}{2} &{} e^{-i\alpha _{i}}\cos \frac{\theta _{i}}{2} \end{pmatrix}, \quad \theta _{i} \in [0,\pi ] \text { and } \alpha _{i}, \beta _{i} \in [0,2\pi ),\nonumber \\ \end{aligned}$$
    (6)
  • \(v_{i}:D_{1}\times D_{2}\times [0,\pi /2] \rightarrow \mathbb {R}\) is the i’s player payoff function given by

    $$\begin{aligned}&v_{1}(U_{1},U_{2},\gamma ) = \sum ^1_{k,l=0}a_{kl}|\langle \Psi _{kl}(\gamma )|U_{1}\otimes U_{2}|\Psi (\gamma )\rangle |^2 \end{aligned}$$
    (7)
    $$\begin{aligned}&v_{2}(U_{1},U_{2},\gamma ) = \sum ^1_{k,l=0}b_{kl}|\langle \Psi _{kl}(\gamma )|U_{1}\otimes U_{2}|\Psi (\gamma )\rangle |^2, \end{aligned}$$
    (8)

    where \(a_{kl}\) and \(b_{kl}\) for \(k,l \in \{0,1\}\) are the payoffs of (1).

Fig. 1
figure 1

The absentminded driver problem with 2 intersections.

3 The absentminded driver

The problem of the absentminded driver (as given in Fig. 1) was introduced by Piccione and Rubinstein in [7] and was further investigated in [14,15,16]. It belongs to the class of games and decision problems with imperfect recall. The name of the problem is derived from a certain story that describes that decision problem. A decision maker is planning a trip home. The way home leads through the highway with two consecutive exits 1 and 2. The decision maker has to take the second exit to get home (payoff \(\lambda > 2\)). Taking the first exit leads to a catastrophic area (payoff 0). The decision maker can also continue beyond the second exit but then he cannot turn back home and he only has a possibility to find a motel to spend the night (payoff 1). What makes the problem interesting is the absentmindedness of the driver. When he arrives at an intersection, the driver cannot tell whether the intersection leads to the first or the second exit. This is depicted in Fig. 1 as a dashed rectangle that covers the nodes 1 and 2. It denotes an information set of the decision maker. Identifying information sets in an extensive game is a crucial point in determining a range of player’s moves in the game. According to the definition of pure strategy in an extensive game, it is a function that assigns an action to each information set (see [17] for a formal definition). Therefore, the absentminded driver has only two pure strategies: continue all the way or exit. The first strategy would lead him to a payoff of 1. The other strategy would provide him a payoff of 0. The move, for example, to continue when passing through the first intersection and exit at the second one is not allowed to him because of his absentmindedness.

The decision maker can also use so called behavioral strategies that specify probability distribution over actions available at his information sets. Since he cannot differentiate decision nodes, the driver specifies identical probability distributions at each of his two decision nodes. If p denotes the probability of continuing at an intersection (playing the action C), the decision maker faces the problem of maximizing the expected payoff

$$\begin{aligned} V(p)=\lambda p(1-p) +p^2. \end{aligned}$$
(9)

By using standard formula for parabolic function depending on \(\lambda \) parameter, we obtain:

$$\begin{aligned} {{\,\mathrm{arg\,max}\,}}_{p\in [0,1]}V(p) = {\left\{ \begin{array}{ll} \{1\} &{}\text {if}~\lambda \le 2, \\ \left\{ \frac{\lambda }{2(\lambda - 1)} \right\} &{}\text {if}~\lambda >2. \end{array}\right. } \end{aligned}$$
(10)

From (10), we conclude that the driver has no incentive to choose the exit action when \(\lambda \le 2\). Therefore, throughout the paper, we assume that \(\lambda > 2\). Then the optimal behavioral strategy is \(\lambda /(2(\lambda -1))\), which results in an expected payoff of

$$\begin{aligned} \max _{p\in [0,1]}V(p) = \frac{\lambda ^2}{4(\lambda -1)}. \end{aligned}$$
(11)

In particular, for the widely used in the literature [7, 14] value \(\lambda = 4\), the expected payoff (9) of the decision maker is maximized at \(p=2/3\) with the expected payoff 4/3.

Fig. 2
figure 2

The absentminded driver problem with n intersections.

3.1 The absentminded driver problem with n intersections.

The problem under consideration can easily be generalized to any finite number of intersections (Fig. 2). It may be assumed that choosing the exit at the first \(n-1\) intersections leads the driver to a catastrophic area (payoff 0), choosing the actions: continue and exit at the n-th intersection gives the driver the payoff of 1 and \(\lambda \), respectively. Then, the expected payoff resulting from playing a general behavioral strategy \((p, 1-p)\), where p is the probability of choosing the action continue is

$$\begin{aligned} V^{n}(p)=p^{n-1}(1-p)\lambda + p^n. \end{aligned}$$
(12)

From equation

$$\begin{aligned} \frac{d}{dp}V^{n}(p) = p^{n-2}\left( (n-1)\lambda - np(\lambda -1)\right) \end{aligned}$$
(13)

it follows that

$$\begin{aligned} {{\,\mathrm{arg\,max}\,}}_{p\in [0,1]}V^{n}(p) = {\left\{ \begin{array}{ll} \{1\} &{}\text {if}~\lambda \le n, \\ \left\{ \frac{(n-1)\lambda }{n(\lambda -1)} \right\} &{}\text {if}~\lambda > n, \end{array}\right. } \end{aligned}$$
(14)

i.e., if \(\lambda \le n\) then the function (12) has a maximum of \(\max _{p\in [0,1]}V^{n}(p)=1\) at \(p=1\) and only for \(\lambda > n\), the maximum is \(\max _{p\in [0,1]}V^{n}(p)>1\) at \(p < 1\). Closer examination of (12) shows that the optimal payoff of the n-intersection problem is far below the maximum payoff \(\lambda \). Assuming, for example, \(\lambda = 2n\), the resulting payoff forms a decreasing function such that

$$\begin{aligned} \frac{4}{3} \ge 2^n\left( \frac{n-1}{2n-1}\right) ^{n-1} \xrightarrow [n \rightarrow \infty ]{} \frac{2}{\sqrt{e}} \approx 1.213. \end{aligned}$$
(15)

In the following sections, we show that the decision maker is able to obtain a much better payoff when the problem is considered in the quantum domain.

4 Quantum approach to the absentminded driver and its dependence on initial states

In this section, we present the absentminded driver problem in the EWL quantization scheme. As we shall show below, the \(2\times 2\) games EWL scheme can be easily adapted to absentminded problem. In the original scheme, each of two players moves once. It can be identified with moving twice by the decision maker in our problem. Another change we need to make is to limit the choices made by the decision maker. He moves twice but with the same unitary operation. This meets a similar requirement as in the problem played classically in which the decision maker, due to his absentmindedness, specifies one probability distribution over both actions—the driver, when approaching the intersection does not know which intersection he is passing. Thus, regardless of the number of intersections, the driver follows the same strategy at each of them. It corresponds to the EWL quantum game (5) with one unitary strategy that is repeated at each intersection.

The form of the payoff function in our quantum model follows from the following reasoning. There is one qubit associated with each intersection and its state is \(|0\rangle \) for “exit” and \(|1\rangle \) for “continue” the highway. In case of two intersections, the four possible states are \(|kl\rangle \), where \(k,l \in \{0,1\}\) correspond to the first and second intersection, respectively. This means that according to the problem illustrated in Fig. 1, the outcome exit in the first intersection is associated with the basis states \(|00\rangle \) and \(|01\rangle \). In the case of the outcome continue at the first intersection, the outcomes exit and continue at the second intersection are identified with \(|10\rangle \) and \(|11\rangle \), respectively. As a result, the payoff function is defined as

$$\begin{aligned} v_{\Psi }(U,\gamma ) = \lambda \left| \langle \Psi _{10}(\gamma )|U^{\otimes 2}|\Psi (\gamma )\rangle \right| ^2 + \left| \langle \Psi _{11}(\gamma )|U^{\otimes 2}|\Psi (\gamma )\rangle \right| ^2. \end{aligned}$$
(16)

4.1 The quantum approach based on the initial state \(|\Psi (\gamma )\rangle = \cos {(\gamma /2)}|00\rangle + i\sin {(\gamma /2)}|11\rangle \).

Let us consider state (2). By determining the modules of elements that generate payoff functions (7) or (8), i.e.,

$$\begin{aligned} \left| \langle \Psi _{00}(\gamma )|U^{\otimes 2}|\Psi (\gamma )\rangle \right|&= \left| e^{2 i \alpha } \sin 2\beta \sin \gamma \sin ^2\frac{\theta }{2}+\frac{1}{2} \cos ^2\frac{\theta }{2} \left( e^{4 i \alpha } (\cos \gamma +1)-\cos \gamma +1\right) \right| , \end{aligned}$$
(17)
$$\begin{aligned} \left| \langle \Psi _{01}(\gamma )|U^{\otimes 2}|\Psi (\gamma )\rangle \right|&= \frac{1}{2} \left| \left( e^{2 i \alpha } \cos \frac{\gamma }{2}+i e^{2 i \beta } \sin \frac{\gamma }{2}\right) \sin \theta \right| , \end{aligned}$$
(18)
$$\begin{aligned} \left| \langle \Psi _{10}(\gamma )|U^{\otimes 2}|\Psi (\gamma )\rangle \right|&= \frac{1}{2} \left| \left( e^{2 i \alpha } \cos \frac{\gamma }{2}+ i e^{2 i \beta } \sin \frac{\gamma }{2}\right) \sin \theta \right| , \end{aligned}$$
(19)
$$\begin{aligned} \left| \langle \Psi _{11}(\gamma )|U^{\otimes 2}|\Psi (\gamma )\rangle \right|&= \left| e^{2 i \alpha } \sin ^2\frac{\theta }{2} \left( \cos ^2\frac{\gamma }{2}+e^{4 i \beta } \sin ^2\frac{\gamma }{2}\right) +\frac{i}{2} \left( e^{4 i \alpha }-1\right) e^{2 i \beta } \sin \gamma \cos ^2\frac{\theta }{2}\right| , \end{aligned}$$
(20)

we can rewrite (16) as follows

$$\begin{aligned} v_{\Psi }(U,\gamma )= & {} \frac{\lambda }{4} \left| \left( e^{2 i \alpha } \cos \frac{\gamma }{2}+ i e^{2 i \beta } \sin \frac{\gamma }{2}\right) \sin \theta \right| ^2 \nonumber \\&+ \left| e^{2 i \alpha } \sin ^2\frac{\theta }{2} \left( \cos ^2\frac{\gamma }{2}+e^{4 i \beta } \sin ^2\frac{\gamma }{2}\right) +\frac{i}{2} \left( e^{4 i \alpha }-1\right) e^{2 i \beta } \sin \gamma \cos ^2\frac{\theta }{2}\right| ^2.\nonumber \\ \end{aligned}$$
(21)

We claim that

$$\begin{aligned} \max _{U\in \mathsf {SU}(2), \gamma \in [0,\frac{\pi }{2}]}v_{\Psi }(U,\gamma ) = \frac{\lambda }{2}. \end{aligned}$$
(22)

Indeed, let us notice that for \(\gamma =\theta =\frac{\pi }{2}\) and \(\beta -\alpha =(k+\frac{3}{4})\pi \), for integer \(k\in \mathbb {Z}\), non-diagonal elements are \(\left| \langle \Psi _{10}(\gamma )|U^{\otimes 2}| \Psi (\gamma )\rangle \right| ^2 =\left| \langle \Psi _{01}(\gamma )|U^{\otimes 2}| \Psi (\gamma )\rangle \right| ^2 = \frac{1}{2}\). It follows that the remaining diagonal elements (17) and (20) have to vanish, what coupled with our assumption that \(\lambda >2\) proves (22). For smaller or no entanglement \(0\le \gamma <\pi /2\), one can show that the maximum payoff corresponds to \(\alpha =0\) and \(\beta =\frac{3}{4}\pi \) but different values of \(\theta \) and is given by

$$\begin{aligned} v_{\Psi }(\theta ,\gamma ) = \cos ^2 \gamma \sin ^4\frac{\theta }{2} + \frac{\lambda }{4}\left( \cos \frac{\gamma }{2} +\sin \frac{\gamma }{2}\right) ^2 \sin ^2 \theta . \end{aligned}$$
(23)

The maximum (22) at \(\gamma =\theta =\frac{\pi }{2}\) decreases from to the value \(\frac{\lambda }{2}\) to the classical value (11) equal to \(\frac{\lambda ^2}{4(\lambda -1)}\), for \(\gamma =0\) and \(\theta =\arccos {\frac{1}{1-2\lambda }}\). The maximum value of \(v_{\Psi }(U,\gamma )\) calculated numerically for \(0\le \gamma \le \pi /2\) is an increasing function of \(\gamma \) as shown in Fig. 3.

Fig. 3
figure 3

The dependence of the absentminded driver maximal payoffs on \(\gamma \) for three initial states \(|\Psi (\gamma )\rangle \) (red), \(|\Phi (\gamma )\rangle \) (black) and \(|\Xi (\gamma )\rangle \) (blue).

4.2 The quantum approach based on the initial state \(|\Phi (\gamma )\rangle = \cos {(\gamma /2)}|01\rangle + i\sin {(\gamma /2)}|10\rangle \).

The scheme given by Definition 1 does not exclude other initial states \(|\Psi \rangle \) as long as \(\{C_{k}\otimes C_{l}|\Psi \rangle :k,l \in \{0,1\}\}\) forms a basis for \(\mathbb {C}^2\otimes \mathbb {C}^2\). In particular, we can examine other entangled states to see if it affects the optimal payoff of the decision maker. If we consider the initial state \(|\Phi (\gamma )\rangle \), then the components \(\left| \langle \Phi _{kl}(\gamma )|U^{\otimes 2}|\Phi (\gamma )\rangle \right| \) of (7) or (8) are as follows:

$$\begin{aligned} \left| \langle \Phi _{00}(\gamma )|U^{\otimes 2}|\Phi (\gamma )\rangle \right|&= \cos ^2\frac{\theta }{2}, \end{aligned}$$
(24)
$$\begin{aligned} \left| \langle \Phi _{01}(\gamma )|U^{\otimes 2}|\Phi (\gamma )\rangle \right|&= \frac{1}{2} \left| \left( e^{2 i (\alpha +\beta )} \cos \frac{\gamma }{2}-i \sin \frac{\gamma }{2}\right) \sin \theta \right| , \end{aligned}$$
(25)
$$\begin{aligned} \left| \langle \Phi _{10}(\gamma )|U^{\otimes 2}|\Phi (\gamma )\rangle \right|&= \frac{1}{2} \left| \left( \cos \frac{\gamma }{2}-i e^{2 i (\alpha +\beta )} \sin \frac{\gamma }{2}\right) \sin \theta \right| , \end{aligned}$$
(26)
$$\begin{aligned} \left| \langle \Phi _{11}(\gamma )|U^{\otimes 2}|\Phi (\gamma )\rangle \right|&= \sin ^2\frac{\theta }{2}. \end{aligned}$$
(27)

In the same manner as in the case of the initial state \(|\Psi (\gamma )\rangle \), we define the decision maker’s payoff function

$$\begin{aligned} v_{\Phi }(U,\gamma )&= \lambda \left| \langle \Phi _{10}(\gamma )|U^{\otimes 2}|\Phi (\gamma )\rangle \right| ^2 + \left| \langle \Phi _{11}(\gamma )|U^{\otimes 2}|\Phi (\gamma )\rangle \right| ^2 \nonumber \\&=\frac{\lambda }{4}\left| \left( \cos \frac{\gamma }{2}-i e^{2 i (\alpha +\beta )} \sin \frac{\gamma }{2}\right) \sin \theta \right| ^2 + \sin ^4\frac{\theta }{2}. \end{aligned}$$
(28)

In this case, the element (26) has its maximal value for \(\alpha +\beta = \pi /4\). Indeed, in this case \(-i e^{2 i (\alpha +\beta )}=1\) and (26) is an increasing function of \(0\le \gamma \le \pi /2\). Because (27) does not depend on \(\alpha \) and \(\beta \), we can simplify the problem of maximization of \(v_{\Phi }(U,\gamma )\) in the following way:

$$\begin{aligned} \max _{U\in \mathsf {SU}(2), \gamma \in [0,\frac{\pi }{2}]}v_{\Phi }(U,\gamma ) = \max _{\theta \in [0,\pi ]}v_{\Phi }\left( U\left( \theta , \alpha , \frac{\pi }{4}-\alpha \right) ,\frac{\pi }{2}\right) = \max _{\theta \in [0,\pi ]}\left( \frac{\lambda }{2}\sin ^2 \theta + \sin ^4\frac{\theta }{2}\right) .\nonumber \\ \end{aligned}$$
(29)

From

$$\begin{aligned} \left. \frac{\partial }{\partial \theta }v_{\Phi }\left( U(\theta , \alpha , \beta ),\frac{\pi }{2}\right) \right| _{\alpha + \beta = \pi /4}=0 \end{aligned}$$
(30)

we obtain the unique nontrival solution \(\theta =\arccos {\frac{1}{1-2\lambda }}\), which substituted to \(v_{\Phi }(U(\theta , \alpha , \pi /4-\alpha ),\frac{\pi }{2})\) gives

$$\begin{aligned} v_{\Phi }\left( U\left( \arccos {\frac{1}{1-2\lambda }}, \alpha , \frac{\pi }{4}-\alpha \right) ,\frac{\pi }{2}\right) = \frac{\lambda ^2}{2\lambda -1}. \end{aligned}$$
(31)

Comparison of (22) and (31) shows that the driver benefits from switching to the entangled state \(|\Phi (\pi /2)\rangle \) for any value of \(\lambda \). In particular, for \(\lambda = 4\), the maximal value of \(v_{\Phi }(U,\frac{\pi }{2})\) is \(\frac{16}{7}=2.(285714) > 2 = \max _{U\in \mathsf {SU}(2)}{v_{\Psi }(U,\frac{\pi }{2})}\). Note that compared with the previous case, the maximal payoff can be higher provided \(\left| \langle \Phi _{10}(\gamma )|U^{\otimes 2}| \Phi (\gamma )\rangle \right| >\left| \langle \Phi _{01}(\gamma )|U^{\otimes 2}| \Phi (\gamma )\rangle \right| \), what is the case with (25) and (26).

For smaller or no entanglement \(0\le \gamma <\pi /2\), the maximum payoff corresponds to \(\alpha +\beta =\frac{\pi }{4}\) but depends on \(\theta \) and is given by

$$\begin{aligned} v_{\Phi }(\theta ,\gamma ) = \frac{\lambda }{4} (1 + \sin \gamma ) \sin ^2\theta +\sin ^4\frac{\theta }{2}. \end{aligned}$$
(32)

The payoff decreases from to the value (31) for \(\gamma =\frac{\pi }{2}\) and \(\theta =\arccos {\frac{1}{1-2\lambda }}\) to the classical value (11) equal to \(\frac{\lambda ^2}{4\lambda -4}\), for \(\gamma =0\) and \(\theta =\arccos {\frac{1}{1-\lambda }}\). The numerically calculated maximum value of \(v_{\Phi }(U,\gamma )\) for \(0\le \gamma <\pi /2\) is shown in Fig. 3.

4.3 The quantum approach based on the initial state \(|\Xi (\gamma )\rangle = \cos {(\gamma /2)}|00\rangle + i\sin {(\gamma /2)}|10\rangle \).

Although, it may seem that entanglement plays a crucial role in the EWL scheme, it is a quantum coherence that may increase a player’s payoff in the absentminded problem even in the absence of entanglement. Our last case is the separable initial state

$$\begin{aligned} |\Xi (\gamma )\rangle = \cos {(\gamma /2)}|00\rangle + i\sin {(\gamma /2)}|10\rangle , \end{aligned}$$
(33)

the components defining the payoff function are:

$$\begin{aligned} \left| \langle \Xi _{00}(\gamma )|U^{\otimes 2}|\Xi (\gamma )\rangle \right|&= \left| \cos \frac{\theta }{2} \left( \cos \frac{\theta }{2} (\cos \alpha +i \sin \alpha \cos \gamma )-i \sin \beta \sin \gamma \sin \frac{\theta }{2}\right) \right| , \end{aligned}$$
(34)
$$\begin{aligned} \left| \langle \Xi _{01}(\gamma )|U^{\otimes 2}|\Xi (\gamma )\rangle \right|&= \frac{1}{2} \left| \left( 2 \sin \beta \sin \gamma \sin ^2 \frac{\theta }{2} + i (\cos \alpha +i \cos \gamma \sin \alpha ) \sin \theta \right) \right| , \end{aligned}$$
(35)
$$\begin{aligned} \left| \langle \Xi _{10}(\gamma )|U^{\otimes 2}|\Xi (\gamma )\rangle \right|&= \frac{1}{2} \left| 2 \sin \alpha \sin \gamma \cos ^2 \frac{\theta }{2} +(i \cos \beta +\cos \gamma \sin \beta ) \sin \theta \right| , \end{aligned}$$
(36)
$$\begin{aligned} \left| \langle \Xi _{11}(\gamma )|U^{\otimes 2}|\Xi (\gamma )\rangle \right|&= \left| \sin \frac{\theta }{2} \left( \sin \alpha \sin \gamma \cos \frac{\theta }{2} + \sin \frac{\theta }{2} (\sin \beta \cos \gamma +i \cos \beta )\right) \right| . \end{aligned}$$
(37)

In this case, the highest maximal payoff is reached provided \(\left| \langle \Xi _{10}(\gamma )|U^{\otimes 2}|\Xi (\gamma )\rangle \right| =1\). Although \(\gamma \) is no more an entanglement factor, the maximal value of the payoff still corresponds to \(\gamma =\frac{\pi }{2}\), \(\theta = 0\) and \(\alpha =\frac{\pi }{2}\). The payoff is then \(v_{\Xi }(U,\gamma ) = \lambda \), i.e., the highest possible for this game. The maximal payoff equal to \(\lambda \) is also attainable for the initial state \(|\Xi '(\gamma )\rangle \) with exchanged qubits \(|0\rangle \) and \(|1\rangle \). A significant feature of this solution is that the driver, despite his absentmindedness, will certainly choose the right exit. Such a situation is not possible in the classical game, in which the driver has only a mixed or behavioral strategy based on one-dimensional probability. In a quantum game based on the separable initial state, using the appropriate \(\mathsf {SU}(2)\) strategy will lead the driver to the proper exit. For smaller values of parameter \(0\le \gamma <\pi /2\), the maximum is still at \(\alpha =\frac{\pi }{2}\) and \(\beta =0\) and depends also on \(0\le \theta \le \pi \) by

$$\begin{aligned} v_{\Xi }(\theta ,\gamma ) = \frac{1}{8} \left( 2 \cos ^2\gamma \cos \theta +\cos 2 \gamma -3\right) ((1-\lambda ) \cos \theta +\lambda +1). \end{aligned}$$
(38)

Here again the payoff decreases from \(\lambda \) for \(\gamma =\frac{\pi }{2}\) and \(\theta =0\) to the classical value (11) for \(\gamma =0\) and \(\theta =\arccos {\frac{1}{1-\lambda }}\). The numerically calculated maximum value of \(v_{\Xi }(U,\gamma )\) for \(0\le \gamma \le \pi /2\) is shown in Fig. 3.

It is also worth noting that the EWL absentminded driver problem based on the initial state \(|\Xi (\gamma )\rangle \) would not be a valid pattern for an expansion to a two-player game. In this case, the player number 2, whose qubit is always \(|0\rangle \), has only one-dimensional strategy set while his opponent has a full \(\mathsf {SU}(2)\) strategy set.

5 The quantum absentminded driver’s problem with n intersections

As we showed in the previous section, the decision maker is able to obtain the maximum payoff \(\lambda \) in the case of \(|\Xi (\pi /2)\rangle = (|00\rangle + i|10\rangle )/\sqrt{2}\). The question arises as to whether the payoff \(\lambda \) can be obtained when the driver faces more than two intersections. In Sect. 3, we generalized the absentminded problem to n intersections. Now we rewrite the problem in terms of the EWL scheme.

Let us first generalize the EWL scheme to n qubits. In order to extend our finding for \(|\Xi (\pi /2)\rangle \), we shall consider the initial separable state

$$\begin{aligned} |\Xi \rangle =\bigotimes ^n_{k=1} |\Xi _k\rangle ,\quad \text {where}~|\Xi _k\rangle = {\left\{ \begin{array}{ll} \frac{|0\rangle + i|1\rangle }{\sqrt{2}} &{}\text {if}~k <n, \\ |0\rangle &{}\text {if}~k=n. \end{array}\right. } \end{aligned}$$
(39)

Similarly to (4), we define \(2^n\) states of n qubits with the use of (3) as follows:

$$\begin{aligned} |\Xi _{i_{1},i_{2}, \dots , i_{n}}\rangle = \bigotimes ^n_{k=1}C_{i_{k}}|\Xi \rangle , \quad i_{k}\in \{0,1\}. \end{aligned}$$
(40)

We claim that states (40) form a orthonormal basis for \(\left( \mathbb {C}^2\right) ^{\otimes n}\).

Lemma 1

A set

$$\begin{aligned} \mathcal {B} = \left\{ \bigotimes ^n_{k=1}C_{i_{k}}|\Xi \rangle , i_{k} \in \{0,1\}\right\} \end{aligned}$$
(41)

is orthonormal.

Proof

We check at once that each element of (41) is a unit vector. We will show that (41) is also orthogonal. Let \(|\xi _{1}\rangle , |\xi _{2}\rangle \in \mathcal {B}\), then

$$\begin{aligned} \langle \xi _{1}|\xi _{2}\rangle&= \langle \Xi | \bigotimes ^n_{k=1}C^{\dag }_{i_{k}}\bigotimes ^n_{k=1}C_{j_{k}}|\Xi \rangle = \langle \Xi |\bigotimes ^n_{k=1}C^{\dag }_{i_{k}}C_{j_{k}}|\Xi \rangle = \prod ^n_{k=1}\langle \Xi _k|C^{\dag }_{i_{k}}C_{j_{k}}|\Xi _k\rangle , \end{aligned}$$
(42)

but note that if \(|\xi _{i}\rangle \ne |\xi _{j}\rangle \), then \(i_{k} \ne j_{k}\) for at least one \(k \in \{1,2, \dots , n\}\) and \(C^{\dag }_{i_k}C_{j_k} = \pm C_{1}\), then

$$\begin{aligned} \langle \Xi _k| C_{1} |\Xi _k\rangle = 0, \quad k = 1,2, \dots , n \end{aligned}$$
(43)

and it follows that \(\langle \xi _{1}|\xi _{2}\rangle = 0 \). \(\square \)

Based on the decision problem depicted in Fig. 2 and the identification \(|0\rangle \) for exit and \(|1\rangle \) for continue, the payoff function takes the following form:

$$\begin{aligned} \lambda |\langle \Xi _{1,1,\dots , 1,0}|U^{\otimes n}|\Xi \rangle |^2 + |\langle \Xi _{1,1,\dots , 1}|U^{\otimes n}|\Xi \rangle |^2. \end{aligned}$$
(44)

Proposition 1

Expression (44) coincides with the classical payoff function of the n-intersection absentminded driver problem for \(U = U(\theta ,0,0)\).

Proof

First note that \(|\Xi _{11\dots 10}\rangle = (C_{1})^{\otimes n-1}\otimes C_{0}|\Xi \rangle \) and \(|\Xi \rangle = U(\pi /2,0,0)^{\otimes n-1}\otimes C_{0} |0\rangle ^{\otimes n}\). Moreover,

$$\begin{aligned} U(\pi /2,0,0)^{\dag }C^{\dag }_{1}U(\theta , 0,0)U(\pi /2,0,0) = U(\theta - \pi , 0,0). \end{aligned}$$
(45)

We thus get

$$\begin{aligned}&\langle \Xi _{1,1,\dots , 1,0}|U(\theta ,0,0)^{\otimes n}|\Xi \rangle \end{aligned}$$
(46)
$$\begin{aligned}&\quad = \langle 0|^{\otimes n}\left( U\left( \frac{\pi }{2}, 0,0\right) ^{\otimes n-1}\otimes C_{0}\right) ^{\dag }\left( C_{1}^{\otimes n-1} \otimes C_{0}\right) ^{\dag } U(\theta ,0,0)^{\otimes n}U\left( \frac{\pi }{2},0,0\right) ^{\otimes n-1}\otimes C_{0}|0\rangle ^{\otimes n} \end{aligned}$$
(47)
$$\begin{aligned}&\quad = \langle 0|^{\otimes n}\left( U(\theta - \pi , 0,0)^{\otimes n-1} \otimes U(\theta ,0,0)\right) |0\rangle ^{\otimes n} \end{aligned}$$
(48)
$$\begin{aligned}&\quad = \cos \frac{\theta }{2}\left( \sin \frac{\theta }{2}\right) ^{n-1}. \end{aligned}$$
(49)

By a similar argument, we obtain

$$\begin{aligned} \langle \Xi _{1,1,\dots , 1}|U(\theta ,0,0)^{\otimes n}|\Xi \rangle = \left( \sin \frac{\theta }{2}\right) ^{n}. \end{aligned}$$
(50)

Now, writing \(\sin ^2(\theta /2) = p\) yields

$$\begin{aligned} \lambda |\langle \Xi _{1,1,\dots , 1,0}|U(\theta ,0,0)^{\otimes n}|\Xi \rangle |^2 {+} |\langle \Xi _{1,1,\dots , 1}|U(\theta ,0,0)^{\otimes n}|\Xi \rangle |^2 {=} \lambda p^{n-1}(1-p) {+} p^n \end{aligned}$$
(51)

that coincides with the classical payoff function. \(\square \)

Proposition 2

Optimal strategy in the n-intersection absentminded driver problem given by (44) is \(U(0,\pi /2,0)^{\otimes n}\) and it implies the payoff of \(\lambda \).

Proof

Let us consider the final state \(U(0,\pi /2,0)^{\otimes n}|\Xi \rangle \). First note that \(|\Xi \rangle \) can be written as

$$\begin{aligned} |\Xi \rangle = U\left( \frac{\pi }{2},0,0\right) ^{\otimes n-1}\otimes \mathbbm {1}|0\rangle ^{\otimes n}, \end{aligned}$$
(52)

and

$$\begin{aligned} |\Xi _{11\dots 10}\rangle&= U(\pi , 0,0)^{\otimes n-1} \otimes \mathbbm {1}|\Xi \rangle \nonumber \\&=\left( U(\pi , 0,0)^{\otimes n-1} \otimes \mathbbm {1}\right) \left( U\left( \frac{\pi }{2},0,0\right) ^{\otimes n-1}\otimes \mathbbm {1} \right) |0\rangle ^{\otimes n} \nonumber \\&=U\left( \frac{3}{2}\pi ,0,0\right) ^{\otimes n-1}\otimes \mathbbm {1}|0\rangle ^{\otimes n}. \end{aligned}$$
(53)

Then

$$\begin{aligned}&\langle \Xi _{11\dots 10}|U(0,\pi /2,0)^{\otimes n}|\Xi \rangle \end{aligned}$$
(54)
$$\begin{aligned}&\quad = \langle 0|^{\otimes n}\left( U\left( \frac{3}{2}\pi ,0,0\right) ^{\otimes n-1}\otimes \mathbbm {1}\right) ^{\dag }U\left( 0,\frac{\pi }{2},0\right) ^{\otimes n}\left( U\left( \frac{\pi }{2}, 0,0\right) ^{\otimes n-1} \otimes \mathbbm {1}\right) |0\rangle ^{\otimes n} \nonumber \\&\quad =\langle 0|^{\otimes n}U\left( 0,\frac{3}{2}\pi , 0\right) ^{\otimes n-1}\otimes U\left( 0,\frac{\pi }{2}, 0\right) |0\rangle ^{\otimes n} = (-i)^{n-1} i. \end{aligned}$$
(55)

As a result,

$$\begin{aligned} \lambda |\langle \Xi _{1,1,\dots , 1,0}|U(0,\pi /2,0)^{\otimes n}|\Xi \rangle |^2 + |\langle \Xi _{1,1,\dots , 1}|U(0,\pi /2,0)^{\otimes n}|\Xi \rangle |^2 = \lambda . \end{aligned}$$
(56)

\(\square \)

In the appendix, we present sample realization of the absentminded driver problem with four intersections for initial state (39) using IBM-Q. The actual quantum circuit for that problem is visualized in Fig. 4. We run the circuit using IBM-Q real device (ibmq_lima) and compared the results with that obtained by Qiskit statevector simulator. As can be seen in Fig. 5, the result from the real device includes also some random noise caused by the decoherence. Next, we have used measurement error mitigation method [18] to reduce that noise. The final result is shown in Fig. 6.

6 Classical solution of the absentminded driver problem in terms of quantum computing formalism

The maximal payoff value of \(\lambda \) obtained by using the separable state \(|\Xi \rangle \) may suggest that the solution can be obtained classically without using quantum resources. In this section, we will show that this is not the case. Recall from Proposition 1 that unitary strategies of the form of \(U(\theta , 0,0)\) in the quantum absentminded driver problem can be identified with probability distributions over the actions exit and continue. In particular, the unitary operators \(C_{0}\) and \(C_{1}\) given by (3) can be identified with the action exit and continue, respectively. Given the fact that the player specifies only one probability distribution \((p,1-p)\), where p is the probability of choosing the action continue the final state corresponding to the classical strategies can be written as a density matrix

$$\begin{aligned} \rho _{fin }= & {} (1-p)^2C_{0}\otimes C_{0} \rho _{in }(C_{0}\otimes C_{0})^{\dag } + (1-p)pC_{0}\otimes C_{1} \rho _{in }(C_{0}\otimes C_{1})^{\dag }\nonumber \\&+ p(1-p)C_{1}\otimes C_{0} \rho _{in }(C_{1}\otimes C_{0})^{\dag } + p^2C_{1}\otimes C_{1} \rho _{in }(C_{1}\otimes C_{1})^{\dag }, \end{aligned}$$
(57)

where \(\rho _{in }\) is a density matrix for an initial state. Let us now consider the initial state \(|\Xi (\pi /2)\rangle \) given by (33). Let us construct the measurement operator according to the payoff function (44) for a 2-qubit setting,

$$\begin{aligned} M = \lambda |\Xi _{10}(\pi /2)\rangle \langle \Xi _{10}(\pi /2)| + |\Xi _{11}(\pi /2)\rangle \langle \Xi _{11}(\pi /2)|, \end{aligned}$$
(58)

where

$$\begin{aligned} \begin{aligned} |\Xi _{10}(\pi /2)\rangle = C_{1}\otimes C_{0} |\Xi (\pi /2)\rangle = \frac{1}{\sqrt{2}}(-|00\rangle + i|10\rangle ),\\ |\Xi _{11}(\pi /2)\rangle = C_{1}\otimes C_{1} |\Xi (\pi /2)\rangle = \frac{1}{\sqrt{2}}(-i|01\rangle - |11\rangle ). \end{aligned} \end{aligned}$$
(59)

Then for \(\rho _{in } = |\Xi (\pi /2)\rangle \langle \Xi (\pi /2)|\)

$$\begin{aligned} \rho _{fin } = \begin{pmatrix} \frac{1-p}{2} &{} 0 &{} \frac{-i}{2}(1-3p + 2p^2) &{} 0 \\ 0 &{} \frac{p}{2} &{} 0 &{} \frac{i}{2}p(-1 + 2p) \\ \frac{i}{2}(1-3p + 2p^2) &{} 0 &{} \frac{1-p}{2} &{} 0 \\ 0 &{} \frac{i}{2}p(1-2p) &{} 0 &{} \frac{p}{2}. \end{pmatrix} \end{aligned}$$
(60)

Thus, the expected payoff resulting from playing a probability distribution \((p,1-p)\) over \(\{C_{0}, C_{1}\}\) is

$$\begin{aligned} {\text {tr}}(\rho _{fin }M) = {\text {tr}}\begin{pmatrix} \frac{1}{2}\lambda (1-p)p &{} 0 &{} \frac{i}{2}\lambda (1-p)p &{} 0\\ 0 &{} \frac{p^2}{2} &{} 0 &{} \frac{ip^2}{2} \\ \frac{i}{2}\lambda (1-p)p &{} 0 &{} \frac{1}{2}\lambda (1-p)p &{} 0\\ 0 &{} \frac{-ip^2}{2} &{} 0 &{} \frac{p^2}{2} \end{pmatrix} = \lambda (1-p)p + p^2, \end{aligned}$$
(61)

which coincides with the classical result (9). Now, let us consider the purely quantum strategy \(U(0,\pi /2,0)\). Then

$$\begin{aligned} \rho ^{Q}_{fin } = U(0,\pi /2, 0)^{\otimes 2} \rho _{in }\left( U(0,\pi /2, 0)^{\otimes 2}\right) ^{\dag } = \begin{pmatrix} \frac{1}{2} &{} 0 &{} \frac{i}{2} &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 \\ -\frac{i}{2} &{} 0 &{} \frac{1}{2} &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 \end{pmatrix}. \end{aligned}$$
(62)

The expected payoff associated with the final state \(\rho ^{Q}_{fin }\) is then

$$\begin{aligned} {\text {tr}}(\rho ^{Q}_{fin }M) = {\text {tr}}\begin{pmatrix} \frac{\lambda }{2} &{} 0 &{} \frac{i\lambda }{2} &{} 0 \\ 0 &{} 0 &{} 0 &{} 0 \\ -\frac{i\lambda }{2} &{} 0 &{} \frac{\lambda }{2} &{} 0\\ 0 &{} 0 &{} 0 &{} 0 \end{pmatrix} = \lambda . \end{aligned}$$
(63)

This shows that the unitary operator \(U(0,\pi /2,0)\) has no counterpart in the classical strategies. The advantage of the quantum game is the three-parameter space of possible strategies, which in the case of the classical game are reduced to a single-parameter probability distribution.

7 Conclusions

In the classical absentminded driver problem, there is a sequence of exits that the driver passes one after the other. However, his absentmindedness causes that he does not realize which exit he is passing. This situation is modeled in a quantum game by a system of n qubits, each associated with one exit. The state of each qubit determines the driver’s behavior at a given intersection—the first \(|0\rangle \) state determines his exit. The initial state of qubits is a superposition of various combinations of individual states that differ, e.g., in the degree of entanglement. The quantum game strategy transforms unitarily, i.e., in a manner specific for quantum evolution, the initial state into the final state that determines the driver’s behavior. The most favorable driver’s payoff, equal to \(\lambda \), corresponds to the use of the last highway exit. This is equivalent to transforming the initial state into an n-qubit vector \(|1\rangle ^{\otimes n-1}|0\rangle \).

In case of a highway with two intersections, we have considered three possible initial states \(|\Psi (\gamma )\rangle = \cos {\frac{\gamma }{2}}|00\rangle + i\sin {\frac{\gamma }{2}}|11\rangle \), \(|\Phi (\gamma )\rangle = \cos {\frac{\gamma }{2}}|01\rangle + i\sin {\frac{\gamma }{2}}|10\rangle \) and \(|\Xi (\gamma )\rangle = \cos {\frac{\gamma }{2}}|00\rangle + i\sin {\frac{\gamma }{2}}|10\rangle \). All these initial states for \(\gamma =0\) lead to the classical driver’s payoff value (11), which for \(\lambda =4\), is equal to \(\frac{4}{3}\). In case of \(\gamma = \frac{\pi }{2}\) their value increases to 2 in case of \(\Psi (\frac{\pi }{2})\) and to \(\frac{16}{7}\) for \(\Phi (\frac{\pi }{2})\)—both of these initial states are fully entangled. Unexpectedly the highest possible value 4 of the absentminded driver is reachable for \(\Xi (\frac{\pi }{2})\), i.e., for the separable initial state. The dependence of the maximum payoff on the \(\gamma \) coefficient for \(\lambda = 4\) and all considered initial states is shown in Fig. 3.

In two-player games, the entanglement of an initial state vector is necessary to maintain the equal position of both players. Each of them, realizing his strategy through the use of an appropriate unitary transformation, can affect the other player’s qubit through entanglement. In case of a separable initial state, like \(\Xi (\frac{\pi }{2})\), the status of the qubits and therefore of players is not equivalent. One of the qubits (the second one) has a fixed value \(|0\rangle \) and its owner has less power to affect, the other player qubit by transforming his own. This is why the separable initial states are not acceptable initial states for two-payer games.

Although the entanglement of the initial wave function is needed for quantization of two-player games, it is not necessary in case of one-player games such as the absentminded driver problem. Using the strategy in the form of a three-parameter unitary transformation, the separable initial state of the game can be prepared in such a way as to transform it into the final state optimally suited to the driver’s problem. This is particularly possible, because quantum approach allows for manipulation of amplitude phases of the player state. On the other hand, in the classical absentminded driver’s problem, only a single-parameter strategy (exit probability) is possible. The use of this single-parameter at each intersection gives a classical maximum much lower than the optimal value. The coherent behavior of the qubit under the action of transforming gates is crucial for the physical implementation of the quantum game. Making the right decision to exit the highway is thus programmed into a quantum device which, if only coherent, will give the driver the correct indication of which exit to use.

For the classical absentminded driver problem with increasing number of intersections n, the maximal payoff significantly decreases, in the limit of \(n \rightarrow \infty \) and increasing \(\lambda =2n\) it is equal to \(2/\sqrt{e}\). In the quantum case, we have followed the most favorable solution of 2 intersections and assumed the separable initial state, which is the tensor product of \(n-1\) identical equatorial qubits \((|0\rangle + i|1\rangle )/\sqrt{2}\) and the last one in the \(|0\rangle \) basis state. It is shown that in that case the maximal payoff remains the highest possible equal to \(\lambda \), i.e., the driver following the strategy found in Proposition 2, is sure to choose the right exit.

In general, whether the entanglement is really indispensable for quantum computing is a crucial question still open. For example [19] shows that even fully separable, highly mixed states can contain quantum correlations useful for quantum information technologies, whereas [20] describes examples of algorithms in which quantum computing without entanglement has advantage over classical one. It should also be mentioned that the well-known quantum protocols like Deutsch-Jozsa algorithm [21], Simon’s problem [22] and Grover’s search algorithm [23] are all based on manipulating complex amplitudes rather than taking advantages of correlations induced by entanglement. The EWL quantum game scheme exhibits quantum advantage either with the use of entangled or separable initial states depending on the game-theoretical problem. In case of a two-player game, the players independently choose their strategies, which are therefore not correlated—then the entangled state enables coordination of their strategies. On the other hand, when a decision problem (a one-player game) is considered, the decision maker with more than one action at his disposal can coordinate the actions even in the classical game. In this case, coherent transformations on the amplitudes of the initial state may be sufficient to achieve an advantage over playing the game classically.

To sum up, our work has shown that the use of quantum computing in decision problems may imply higher reasonable payoff results as it occurs in two-player games. We believe that our work will initiate further efforts to apply the quantum formalism to game theory problems that go beyond bimatrix games.