Using Quantum Switches to Mitigate Noise in Grover's Search Algorithm

Suryansh Srivastava

Centre for Quantum Science and Technology, International Institute of Information Technology Hyderabad, Gachibowli, Hyderabad-500032, Telangana, India.

Center for Computational Natural Sciences and Bioinformatics, International Institute of Information Technology, Gachibowli, Hyderabad-500032, Telangana, India.

Arun K Pati

<EMAIL_ADDRESS><EMAIL_ADDRESS>
Quantum Information and Computation Group, Harish-Chandra Research Institute, Chhatnag Road, Jhunsi, Allahabad-211019, India

Center for Security, Theory and Algorithmic Research, International Institute of Information Technology Hyderabad, Gachibowli, Hyderabad-500032, Telangana, India.

Samyadeb Bhattacharya

Centre for Quantum Science and Technology, International Institute of Information Technology Hyderabad, Gachibowli, Hyderabad-500032, Telangana, India.

Center for Security, Theory and Algorithmic Research, International Institute of Information Technology Hyderabad, Gachibowli, Hyderabad-500032, Telangana, India.

Indranil Chakrabarty

Centre for Quantum Science and Technology, International Institute of Information Technology Hyderabad, Gachibowli, Hyderabad-500032, Telangana, India.

Center for Security, Theory and Algorithmic Research, International Institute of Information Technology Hyderabad, Gachibowli, Hyderabad-500032, Telangana, India.

Grover's search algorithm is one of the early algorithms that demonstrates the power of quantum superposition in the search space of an unsorted database of $N$ items by enabling us to speed up the search in order of $O(\sqrt{N})$ queries compared to the classical scenario where we can do the same search in $O(N)$ queries. But this advantage is gradually reduced with noise acting on the search space. In this article, we demonstrate that a quantum switch can act as a resource operation in mitigating the effect of the noise in the search space. In this scenario, fault-tolerant model quantum computing is costly. In addition to the noise modeled by a total depolarizing channel (which coherently acts on the entire quantum register), such an error correction method can not be implemented. In that context, we show that the quantum switch itself adds value in reducing this error significantly.  In particular, we create two frameworks for the application of switches.  In the first framework, we apply the superposition of channels' orders in the form of a switch and do a post-selection at every iteration of the applications of the Grover operator. In the second framework, we delay the post-selection until the very end. In other words, if we want to look at the switch's action at the $k$ th step, for the first framework, we already have $k-1$ post-selection measurements in place, whereas in the second case, we have only one measurement. The number of post selections is minimal in the second scenario, so its effect is more credited to the switch. It also gives a significant advantage in terms of the success probability of Grover's algorithm. We take the success probability as the sole quantifier of the switch's action in diminishing the effect of noise in search space.

§ INTRODUCTION

In the current landscape of quantum computing, where innovative algorithms are being introduced more regularly, there's a shift in focus from the anticipation of a fault-tolerant quantum computer towards the reality of Noisy Intermediate-Scale Quantum (NISQ) devices <cit.>. Nevertheless, fundamental and pioneering algorithms like Shor's algorithm <cit.>, Deutsch's algorithm <cit.>, and Grover's search algorithm <cit.> introduced in the late part of the previous century are becoming more and more relevant.  Grover’s search algorithm dates back to the early discoveries of quantum algorithms, which leverages the phenomenon of quantum superposition to obtain a quadratic speedup in searching a desired element in an unstructured database <cit.>. This gives us a significant advantage over the classical unstructured search, which is essentially linear and can best be optimized to $O(N/2)$ steps for a database of $N$ states. The Grover Search algorithm was designed to search through the same space in $O(\sqrt{N})$ steps. It gives a quadratic speed up. Interestingly, it was proved that this search is optimal <cit.>. The algorithm aims to enhance the search process's computational power by using the superposition of quantum states. An equi-probable superposition state is made from the search database as an initial step. The idea is that in each iteration of the algorithm's execution, the probability amplitudes of selected states, based on a selection function (oracle), are enhanced. In that process, the probability amplitude of unselected states is decreased gradually. This is done by inversion of the mean. This method brings a quadratic speed up in the search process, and we reach the selected states in $O(\sqrt{N})$ steps with a high probability of success. The unstructured search approach can compute any NP problem faster than any other algorithm <cit.>.  Many variations of the Grover search algorithm were introduced. This includes features like a dynamic selection function in contrast to the static selection function by enabling a recommendation algorithm. <cit.>. Grover search algorithm has several applications. It can extract statistics such as the minimum element from an unordered data set more quickly than is possible on a classical computer <cit.>. It also helps us to compute quantities representing averages like mean<cit.> and median <cit.>. It also helps to speed up algorithms for NP problems <cit.>. It can also be used as a quantum attack on block ciphers, leading to the implementation of the Grover oracle for key search in AES <cit.>. It also speeds up various kinds of brute-force attacks.  One such example is collision attacks <cit.>. In general, the concept of Grover coin/ Grover walk was introduced and used in the context of random walk to show advantages <cit.>.

Studying the role of the environment on the evolution of a quantum state is essential as it helps us to understand the effect of noise on these resourceful states. These environmental interactions can be modeled as quantum channels, a trace preserving completely positive linear map given by $\Lambda: \rho \rightarrow \sum_i K_i \rho K_i^\dagger$. Here, $K_i$'s are the Kraus operator associated with the evolution of the state $\rho$. Investigations were made in the context of the effect of noise on various quantum properties, starting from entanglement <cit.><cit.> to the broader aspect of correlation <cit.>. These effects were studied not only from the perspective of a closed but also from an open system viewpoint<cit.>.  In particular, in the context of our article, studies were reported on the effects of the total depolarizing channel as a manifestation of noise on the Grover Search algorithm <cit.>.

In contemporary quantum information theory research, indefinite causal order has been identified as a key factor in enhancing efficiency regarding the use of resources. This innovative concept was first brought to light in seminal works <cit.> and was later more comprehensively developed within the framework of resource theory <cit.>. The theory introduces the notion of a quantum switch, which utilizes an auxiliary state to influence the order of events. This quantum switch operates with two distinct channels, denoted as $\mathcal{N}_1$ and $\mathcal{N}_2$, in conjunction with a control qubit. The order of channel operation is contingent on the state of the control qubit: when in the $|0\rangle$ state, $\mathcal{N}_1$ is applied before $\mathcal{N}_2$, and conversely, in the $|1\rangle$ state, $\mathcal{N}_2$ precedes $\mathcal{N}_1$. Remarkably, if the control qubit is placed in a superposition state, $\frac{(|0\rangle+|1\rangle)}{\sqrt{2}}$, it results in the simultaneous occurrence of both operational sequences . The concept of indefinite causal order has profoundly impacted the field, with significant benefits observed in various applications. This ranges from the ability to enhance performance in non-local games<cit.>  to probing channel characteristics <cit.>. Quantum switch, in particular, helps in improving quantum algorithm efficacy <cit.>. Its most recent application has been in the transformation of absolutely separable states into separable states <cit.>.

In this work, we explore the application of a quantum switch to reduce the effect of noise modeled by a total depolarizing channel in the success probability of the Grover search algorithm, which had been accumulated on the search space. We explore the success probability to understand how a switch plays a significant role in diminishing the effect of noise as a whole. In other words, it enables us to tolerate more error in the circuit before losing its advantage over its classical analog. Here, we consider two particular frameworks where, in one framework, we do measurements at the end of each application switch and compare Grover's success probability with a noisy scenario to show the advantage. In the other framework, we consider a register of switches and allow the input state to undergo the iterations of switches till the end instead of measuring in the middle. The second approach improves the advantage significantly from the first model.

The rest of the paper is organized as follows. In section <ref>, we describe relevant concepts like the Grover search algorithm, modeling the Depolarizing channel as noise, and Quantum switch. In section <ref>, we describe the role of noise in reducing the success probability of Grover's search algorithm. In section <ref>, we consider the effect of the switch in enhancing the success probability on the platform of two different frameworks.

§ FEW RELATED CONCEPTS

This section discusses a few related concepts associated with our manuscript's main findings. In the first subsection, we discuss Grover's search algorithm in general. Then, we discuss the depolarizing channels and how they can be used to model and discuss noise induced by environmental factors in Grover's search algorithm. Finally, we discuss the quantum switch's functionality in the last subsection of this section.

§.§ Grover's Search Algorithm

linecolor=black,linewidth=0.5pt, frametitlerule=true,
apptotikzsetting=mdfframetitlebackground/.append style=
shade,left color=white, right color=gray!20,
frametitlerulewidth=0.5pt, innertopmargin=,
frametitle=Grover Search Algorithm,

Grover’s algorithm, with k Grover iterates

Grover's search algorithm, a quantum algorithm discovered in the early stages of quantum computing, revolutionized the search process of an unsorted database. Nevertheless, it was shown to be optimal, in some sense, to solve the problem of finding a marked element in an unsorted database of $N$ elements using $k_{Gr}=\left\lfloor\frac{\pi}{4} \sqrt{N} \mid\right.$ oracle queries <cit.>. Such a problem may be shortly stated as follows: suppose we have a database of $N=2^{n}$ of quantum states, being $n$ the number of qubits that span the Hilbert space $\left(\mathcal{H}=\mathbb{C}^{2^{n}}\right.$ ), and an unknown marked state among them. Given an oracle (or black box) to identify whether an element is being searched, the goal is to find such a marked state with high probability and in as few steps as possible.

The Algorithm :  Let us begin with an unstructured database consisting of $N$ elements. We wish to search for a given element in this space. To simplify things, we assign indices to each of these elements in the database. These elements are numbers in the $[0, N-1]$ range. Here, we make two assumptions: $N = 2^n (n \in \mathbb{Z}_{+})$, and there are exactly M solutions ($1 \leq M \leq N$) to this search problem without losing any generality. In the algorithm, a selection function $f$ was introduced which takes
a state $|x\rangle$ as an input. Here, the index $x$ lies in the range $0$ to $N - 1$. The function $f$  assigns a value $1$ when the state is a solution and  $0$ otherwise,

\begin{eqnarray}
f &&= 0 \quad \textrm{if x is not chosen}{}\nonumber\\&&
= 1 \quad \textrm{if x is chosen.}
\end{eqnarray}

This algorithm uses quantum oracle-black box functions as a unitary operator $O$. The action of the operator on the computational basis is given by,

\begin{eqnarray}
|x\rangle|q\rangle \longrightarrow |x\rangle |q \oplus 2f(x)\rangle
\end{eqnarray}

Here, $|x\rangle$ is the index register, and $\oplus$ denotes addition modulo $2$. The oracle qubit $|q\rangle$ gets flipped if we have $f(x) = 1$; otherwise, it remains the same. So checking whether $|x\rangle$ is a solution to the search problem is equivalent to checking whether this oracle qubit has been flipped.

At the first step, we create a superposition of $N$ quantum states. The application of a Hadamard transformation does this,

\begin{eqnarray}
|\psi\rangle\frac{1}{\sqrt{N}} \sum_{x=0}^{N-1}|x\rangle.
\end{eqnarray}

Once we establish the initial superposition, the algorithm
demands the repeated application of a quantum subroutine
referred to as the Grover iteration or as the Grover operator $G$.

The Grover iteration consists of following

* Apply the Oracle $O$

* Apply the Hadamard Transformation $H^{\otimes n}$

* Do the inversion about the mean $m$ (Apply $O_m=
2 |\psi\rangle \langle \psi |-1$ )

* Apply the Hadamard Transformation $H^{\otimes n}$

* Perform measurements in the canonical basis in each qubit. The target state will emerge with a high probability as $N \gg 1 $

It is straightforward that after applying the oracle operator and diffusion operator $k$ times, the result is

\begin{equation}
\rho(k)=G^{k} \rho(0)\left(G^{\dagger}\right)^{k},\label{ideal_grover_state_k}
\end{equation}

where $G=D O$  is also known as the Grover operator. It can be shown that the density operator obtained afterward is

\begin{equation}
\rho(k)=\left|s_{k}\right\rangle\left\langle s_{k}\right|,
\end{equation}

\begin{eqnarray}
&&\left|s_{k}\right\rangle =\sin ((2 k+1) \theta)|t\rangle+\cos ((2 k+1) \theta)|\bar{t}\rangle {}\nonumber\\&&
|\vec{t}\rangle =\frac{1}{\sqrt{N-1}} \sum_{\substack{i=0 \\
i \neq t}}^{N-1}|i\rangle \text { and } \theta=\arcsin \left(\frac{1}{\sqrt{N}}\right).
\end{eqnarray}

Hence, the probability of success (measuring the marked element) after $k$ steps is

\begin{equation} \label{ideal_grover_success_probability}
P(k)=\sin ^{2}((2 k+1) \theta).
\end{equation}

§.§ Noise modeled as Quantum Depolarizing Channel

A quantum channel characteristically represents a completely positive trace-preserving (CPTP) map and a convex linear transformation, facilitating the transition of quantum states within a quantum system <cit.>.
A quantum depolarizing channel serves as a model for quantum noise in quantum systems. In this model, the $d$-dimensional depolarizing channel is conceptualized as a CPTP map, \(\Lambda_{q}\), which is characterized by a single parameter, $q$ <cit.>. This map transforms a $d$-dimensional quantum state $rho$ into a mixture of the original state and the maximally mixed state in $d$-dimensions, $\frac{\mathbb{I}_d}{d}$, mathematically represented as:

\begin{equation}\label{def:general_depolarising}
\Lambda_{q}(\rho) = q\rho + \frac{(1-q)}{d}\mathbb{I}_d.
\end{equation}

For \(\Lambda_{q}\) to maintain complete positivity, the parameter \(q\) must adhere to the following constraint <cit.>:

\begin{equation}
\frac{-1}{d^2-1} \leq q \leq 1.
\end{equation}

A subset of the generalized qudit depolarizing channel as defined in (<ref>), denoted as $\mathcal{D}_t$, is a specific type of quantum channel applicable to a $d$-dimensional quantum state $\rho$. For a parameter $0 < t < 1$, modifies $\rho$ into the channel output.

\begin{equation}
\mathcal{D}_t(\rho) = (1 - t)\frac{\mathbb{I}_d}{d} + t\rho
\end{equation}

The parameter $1 - t$ represents the channel depolarising probability, whereas $t$ signifies the likelihood of retaining the state $\rho$. This model of the depolarizing channel is frequently employed to represent quantum noise <cit.>.

\begin{eqnarray}
% &&\mathcal{N}_{t}^{D}(\rho) {}\nonumber\\&&= t\rho+(1-t)  \operatorname{Tr}[\rho] \frac{\mathbb{I}_d}{d} {}\nonumber\\&&
\mathcal{D}_t(\rho) = t\rho+\frac{1-t}{d^{2}} \sum_{i=1}^{d^{2}} U_{i} \rho U_{i}^{\dagger},
\end{eqnarray}

Where $\left\{U_{i}\right\}_{i=1}^{d^{2}}$ are unitary operators and form an orthonormal basis of the space of $d \times d$ matrices. This is the notation we will use throughout the rest of the paper.
Quantum channels have operator-sum representations in terms of Kraus operators. As per the operator-sum representation <cit.>, the depolarizing channel in a $d$-dimensional space can be articulated as:

\begin{equation} \label{eqn:kraus_operator_D_t}
\mathcal{D}_t (\rho) = \sum_{i=0}^{d^2} D_i \rho  D_i^\dagger
\end{equation}

where the Kraus operators $D_i$ are defined as $D_0 = \sqrt{t} \mathbb{I}_d$ and $D_i = \frac{1}{\sqrt{d(1 - t)}} U_i$ for $i = 1, \ldots, d^2$. Here, $U_i$ represents orthogonal unitary operators.

We note for later use in <ref> that, because the $d^{2}$ unitary operators $\mathbf{U}_{i}$ are orthogonal, they form an orthonormal basis concerning the Hilbert-Schmidt inner product, and for any given $d$-dimensional linear operator $\mathbf{V}$

\begin{equation}\label{prop:TrUVU=V}
\frac{1}{d} \sum_{i=1}^{d^2} \mathrm{Tr}[U_i^\dagger V] U_i = V
\end{equation}

\begin{equation}\label{prop:UVU=TrV}
\frac{1}{d^2} \sum_{i=1}^{d^2} U_i V U_i^\dagger = \mathrm{Tr}[V] \frac{\mathbb{I}_d}{d}.
\end{equation}

One notable property of this channel is its commutative nature under sequential applications. Utilizing two such channels, $\mathcal{D}_{t_1}$ and $\mathcal{D}_{t_2}$ with preservation probabilities $t_1$ and $t_2$, respectively, regardless of the order of application, results in another depolarizing channel with a combined state preservation probability of $t_1t_2$:

\begin{equation}
\mathcal{D}_{t_2}(\mathcal{D}_{t_1}(\rho)) = \mathcal{D}_{t_1}(\mathcal{D}_{t_2}(\rho)) = (1 - t_1t_2)\frac{\mathbb{I}_d}{d} + t_1t_2\rho.
\end{equation}

In many cases, this channel model might be overly pessimistic. Often, insights into the physical characteristics of the channel can be gleaned through various estimation procedures. The deployment of the depolarizing channel as a noise model should be considered mainly when there is a lack of detailed information about the nature of the actual physical channel and can be represented as follows:

\begin{equation}\label{eqn:noisy_grover_with_TPDCh}
\mathcal{D}_t(\rho) := (1-t)\rho_d + t\frac{\mathbb{I}_d}{d}Tr(\rho_d)
\end{equation}

Acting on states $\rho$ on a d-dimensional Hilbert space.

In some situations, it is convenient to think about quantum channels as defined in the space of all linear operators on a given Hilbert space, not just density matrices. In this case, the $\mathrm{Tr}(\rho)$ factor is necessary to ensure that $\mathcal{D}_t$ is linear. If the input is known to have a unit trace, then the $\mathrm{Tr}(\rho)$ factor is not necessary.

The depolarizing channel's significance is evident from its historical role in the study of channel identification <cit.>, its application in enhancing channel capacity through Indefinite Causal Order (ICO) <cit.>, and its use in analytical comparisons of various channel probing methodologies <cit.>. Consequently, the qudit depolarizing channel becomes pivotal in examining ICO in channel probing.

§.§ Quantum Switch

linecolor=black,linewidth=0.5pt, frametitlerule=true,
apptotikzsetting=mdfframetitlebackground/.append style=
shade,left color=white, right color=gray!20,
frametitlerulewidth=0.5pt, innertopmargin=,
frametitle=Quantum Switch,

Fixed order vs superposition of orders. 1(a) A quantum particle, prepared in the state $\rho$, goes first through channel $\mathcal{N}_1$ and then through channel $\mathcal{N}_2$. This configuration is associated with the state $\rho_c = \ket{1}\bra{1}$ of a control qubit, in which the choice of order is encoded. 1(b) The quantum particle goes first through $\mathcal{N}_2$ and then through $\mathcal{N}_1$. This alternative configuration is associated with the qubit state $\rho_c = \ket{0}\bra{0}$. 1(c) The quantum switch creates a superposition of the two configurations 1(a) and 1(b). It takes a control qubit in a superposition state, such as $\rho_c = \ket{+}\bra{+}$, and correlates the order of the two channels with the state of the qubit.

In this subsection, we discuss the implementation of quantum switches in general. As mentioned before <ref>, the action of a quantum channel \(\mathcal{N}\) on an input state \(\rho\) can be expressed using the Kraus representation, or operator-sum representation, formulated as \(\mathcal{N}(\rho) = \sum_i K_i \rho K_i^\dagger\), where \(\{K_i\}\) denotes the set of Kraus operators for \(\mathcal{N}\). Consider two quantum channels, \(\mathcal{N}_1\) and \(\mathcal{N}_2\); they can operate either concurrently or sequentially. The concurrent operation is represented as \(\mathcal{N}_1 \otimes \mathcal{N}_2\), while sequential operations can be arranged in two ways: \(\mathcal{N}_1\) followed by \(\mathcal{N}_2\) (notated as \(\mathcal{N}_2 \circ \mathcal{N}_1\)) or \(\mathcal{N}_2\) followed by \(\mathcal{N}_1\) (notated as \(\mathcal{N}_1 \circ \mathcal{N}_2\)). If the sequence of these channels is fixed, only one of the sequences, either \(\mathcal{N}_2 \circ \mathcal{N}_1\) or \(\mathcal{N}_1 \circ \mathcal{N}_2\), is permissible. However, as previously outlined <ref>, the sequence in which two channels operate can be rendered indefinite using an ancillary system, namely the control qubit (\(\rho_c\)) <cit.>.

\begin{equation}
\rho_c = \ket{c}=\sqrt{\theta}\ket{0}+\sqrt{\overline{\theta}}\ket{1},
\end{equation}

With \(\rho_c\) set to the \(|0\rangle \langle 0|\) state, the \(\mathcal{N}_2 \circ \mathcal{N}_1\) arrangement affects the state \(\rho\), while \(\mathcal{N}_1 \circ \mathcal{N}_2\) comes into play when \(\rho_c\) is in the \(|1\rangle \langle 1|\) state. If \(\{K^{(1)}_i\}\) represent the Kraus operators for \(\mathcal{N}_1\) and \(\{K^{(2)}_j\}\) for \(\mathcal{N}_2\), the generalized Kraus operator can be expressed as

\begin{equation}\label{def:switch_kraus_0}
\mathcal{W}_{ij} = K^{(2)}_j \circ K^{(1)}_i \otimes |0\rangle\langle 0| + K^{(1)}_i \circ K^{(2)}_j \otimes |1\rangle\langle 1|.
\end{equation}

where ${K}^{(1)}_i$ is the $i^{th}$ Kraus operator of channel $\mathcal{N}_1$ and ${K}^{(2)}_j$ is the $i^{th}$ Kraus operator of channel $\mathcal{N}_2$; and $|0\rangle\langle0|_{c}, 1\rangle\langle1|_{c}$ are the projectors associated with the native basis of $|c\rangle$.
The cumulative evolution of the combined system is thus described by

\begin{equation}
S(\mathcal{N}_1, \mathcal{N}_2) (\rho \otimes \rho_c) = \sum_{i, j} \mathcal{W}_{ij}(\rho \otimes \rho_c)\mathcal{W}_{ij}^\dagger.
\end{equation}

This arrangement, in which the order of application of the two channels is coherently controlled, captures the operation of the quantum switch. It can be thought of as a higher order map that takes two channels $\mathcal{N}_{1}, \mathcal{N}_{2}$ as inputs and gives the superposition of their orders as outputs depending upon the choice of the control qubit $\ket{c}$.
Upon completion, the control qubit is measured in the coherent basis \(\{|+\rangle \langle +|, |-\rangle \langle -|\}\). For each measurement outcome, the corresponding reduced state of the target qubit is obtained as

\begin{equation}
c\langle \pm|S(N_1, N_2)(\rho \otimes \omega_c)|\pm\rangle_c. \tag{3}
\end{equation}

This encapsulates the functioning of the Quantum switch, as depicted schematically in <ref>.

§ NOISE IN GROVER'S SEARCH ALGORITHM

Quantum systems inevitably interact with their environment, introducing errors and noise when these systems are externally controlled, such as during gate applications or state preparation. This influence on quantum algorithms has been the subject of a recent investigation by multiple researchers <cit.>. Quantum search algorithm constitutes an oracle-based method designed to search an unordered database efficiently. This algorithm showcases a quadratic speedup compared to the classical brute-force search <cit.>. Nonetheless, this advantage significantly diminishes when the oracle encounters faults <cit.> or when the algorithm operates in an environment of noise <cit.>.

linecolor=black,linewidth=0.5pt, frametitlerule=true,
apptotikzsetting=mdfframetitlebackground/.append style=
shade,left color=white, right color=gray!20,
frametitlerulewidth=0.5pt, innertopmargin=,
frametitle=Noisy Grover's Search Algorithm,

In this figure, we depict the action of noise on the Grover operator $\mathcal{G}$. They are represented by the shaded bar. Here, we are measuring at the end to see the effect of noise on the Grover operator's success probability.

In this section, we briefly discuss the impact of a known noise rate on Grover’s search algorithm. Prior research conducted in <cit.>. <cit.> also studied the Local Depolarizing Channel error model apart from the Total Depolarising Channel error model. Local error models hold significance as they reflect the impact of gate errors on any practical implementation of a quantum circuit.

We know a one-to-one mapping exists between the $n$-qubit and $2^{n}$ level qudit systems. Every state in the set of $n$ qubit systems has a corresponding $d=2^n$ dimensional qudit system.

Thus, we can intuitively see that the partially depolarizing noise discards the whole quantum register consisting of $n$-qubits with probability $t$ between any two successive oracle invocations (but we can still obtain the quantum state of the input quantum register with a probability more than $t$).

Partial depolarizing is very drastic and, in some implementations, quite a pessimistic noise model, as it acts strongly correlated across the whole quantum register (somewhat similar to a noisy oracle). The depolarizing channel is a “worst-case scenario” channel. It assumes that we lose the input qubit (not the input state) with some probability $t$, i.e., it replaces the lost qubit with the maximally mixed state.

The noise models mentioned above are conceptualized in a discrete-time framework. However, our approach to implementing the noise model \(D_t\) between successive oracle calls aims to emulate the continuous nature of noise as encountered in practical scenarios. It's important to note that quantum error correction techniques <cit.> are not effective against partial depolarizing or dephasing noises, as these types of disturbances collectively impact the quantum computer. Such collective effects could be likened to a quantum system experiencing a sudden 'flash' of noise, possibly from fluctuating lasers or external magnetic field interference, which are plausible scenarios for quantum computers of moderate size.

In this context, "noise" refers to the implementation of a specific quantum channel on the states of quantum registers at discrete intervals. This concept is designed to simulate continuous noise exposure in a quantum computer, particularly within the framework of discrete-time oracle algorithms. Specifically, it is required that the noise channel is applied at least once in the duration between two consecutive oracle calls. A classic example of such noise is represented by the set of partial depolarizing channels <cit.>

§.§ State evolution with error

At every step of the process, there is sequential employment of the Grover operator and the subsequent application of the TDCh error. The TDCh error commutative property with any unitary operation influences the system's state. Thus, After '$k$' iterations, the state is represented as:

\begin{equation}
\rho(k, t) = t^k \rho(k) + \left(1 - t^k\right) \frac{I}{d},
\end{equation}

where \(\rho(k)\) is as defined in <ref>.

§.§ Success probability

In the context of Grover's algorithm subjected to noise, we introduce a modified channel denoted as \( \mathcal{G}_x(\rho) \), defined by the expression \( \mathcal{G}_x(\rho) = ((\mathbb{I}_d - 2|\psi\rangle\langle\psi|)O_x) \rho ((\mathbb{I}_d - 2|\psi\rangle\langle\psi|)O_x)^\dagger \). Considering this, the resultant quantum state after the application of noise can be expressed as \( (\mathcal{D}_t\mathcal{G}_x)^k(|\psi\rangle\langle\psi|) \). Consequently, the probability of successfully measuring the correct index of the Oracle, designated as \( x \), is given by the formula:

\begin{equation}\label{probability(k, (1-t), d)_noisy}
p(k, (1-t), d) = \frac{1}{d} \sum_{x=1}^{d} \langle x | (\mathcal{D}_t\mathcal{G}_x)^k(|\psi\rangle\langle\psi|) |x\rangle.
\end{equation}

The above expression denotes the success probability of Grover's search algorithm running on an input space $\rho$ of dimension $d=2^n$ after $k$ iterations, where \( d \) represents the total number of possible oracles. Here, we use $(1-t)$ to describe the depolarising noise strength for the duration of the algorithm where

$t$ is the channel parameter of the Total partial Depolarising Channel used to describe error at each step, as given in <ref>). Using $(1-t)$ as a parameter in $p(k,(1-t),d)$ will make the subsequent analysis of the effect of noise on probability more intuitive because we will be able to analyze and plot functions of $1-t)$ (error probability/ noise rate) instead of functions of $t$. This can be seen in the plots for framework 1 <ref> and framework 2 <ref>

This formulation <ref> averages the success probability over all \( d \) oracles, assuming that each oracle is equally likely a priori. This approach, focusing on the average success probability across all oracles, contrasts with alternative methodologies considering the minimal success probability, which seeks to minimize all oracles. The selection of the average success metric aligns with the perspective adopted in references such as <cit.>, differing from the minimal success probability approach seen in  <cit.>.

\begin{eqnarray}
= \frac{1}{d}\sum_{x=1}^d \langle x|(\mathcal{D}_t \mathcal{G}_x) (\rho)|x\rangle{}\nonumber\\&&
= \frac{1}{d}\sum_{x=1}^d \langle x|\left(t\rho + (1-t)\frac{\mathbb{I}_d}{d}\right)|x\rangle{}\nonumber\\&&
= \frac{1}{d}\sum_{x=1}^d \langle x|t\rho|x\rangle + \frac{1}{d}\sum_{x=1}^d \langle x|(1-t)\frac{\mathbb{I}_d}{d}|x\rangle{}\nonumber\\&&
= t\left(\frac{1}{d}\sum_{x=1}^d \langle x|\rho|x\rangle\right) + (1-t)\frac{1}{d}\sum_{x=1}^d \langle x|\frac{\mathbb{I}_d}{d}|x\rangle\nonumber\\&&
= t\cdot p(1,0,d) + (1-t)\frac{1}{d}
% \frac{\cancel{d}}{\cancel{d}}
\qquad \text{[}\because\;p(k,0,d)\text{ is same as \ref{ideal_grover_success_probability}]}\nonumber\\&&
= t\cdot \sin\left((2(1)+1)\arcsin\left(\frac{1}{\sqrt{d}}\right)\right) + (1-t)\frac{1}{d}.
\end{eqnarray}

For the noise above model, when considering the evolution process \( (DpGx)^k \) <ref>, it can be expanded into a summation encompassing $2^k$ distinct histories. Given that every individual term in this summation contributes positively, a lower bound can be ascertained by retaining the term consisting of noise-free components \(t \rho\) in each product segment. This leads us to the inequality for the success probability \( p(k, (1-t), d) \) as follows:

\begin{equation}
p(k, (1-t), d) \geq t^k \sin^2 \left( (2k + 1) \arcsin \frac{1}{\sqrt{d}} \right).
\end{equation}

When examining partial depolarizing noise, the probability of success can be precisely calculated <cit.>. We consider the $2^k - 1$ terms not included, expressed as \( \frac{1}{d} \sum_{x=1}^{d} (1-t)^m (t)^{k-m} \langle x | \mathbb{I}_d^{d} | x \rangle \), which simplifies to \( \frac{1}{d} (1-t)^m(t)^{k-m} \). Here, m denotes the instances of noise interference out of k iterations for a particular term. These specific terms are indicative of scenarios where noise introduces the maximally mixed state at certain junctures, and this holds given that both $\mathcal{D}_t$ and $\mathcal{G}_x$ <cit.> are unital. Considering the aggregate of the coefficients of these terms, which amounts to \( 1 - t^k \), we can deduce the precise probability of success for this noise model as,

\begin{equation}
p(k, (1-t), d) = (1 - t^k) \frac{1}{d} + t^k \sin^2 \left( (2k + 1) \arcsin \frac{1}{\sqrt{d}} \right)
\end{equation}

§ APPLICATION OF QUANTUM SWITCH TO GROVER SEARCH ALGORITHM

In this section, we develop two frameworks to demonstrate the potential of quantum switches to mitigate noise accumulating in iterations of the Grover search algorithm. As a starting point, we must assume that we are running Grover's algorithm in a controlled setting. We have access to the noise at every iteration to apply the quantum switch to it like it was used to a generalized depolarizing channel. Here, the noise is modeled as a total depolarizing quantum channel and will act as a black box to us regarding intensity. The error parameter, $t$, will capture this probabilistic noise picture associated with the quantum switch.

§.§ Framework 1: Measurement after every iteration

Before discussing the specifics of this framework, which will become relevant only at the end of the first Grover iteration, we will discuss certain assumptions and variables common to both frameworks. In the following schematic diagram, we show the action of the Grover operator, switch with Total depolarising channels in the first framework.

linecolor=black,linewidth=0.5pt, frametitlerule=true,
apptotikzsetting=mdfframetitlebackground/.append style=
shade,left color=white, right color=gray!20,
frametitlerulewidth=0.5pt, innertopmargin=,

The figure depicts the application of switch to Grover's search algorithm (modeled by the Grover operator $\mathcal{G}$) to mitigate the noise that arises because of the total depolarizing channel. The channel is the ash-colored bar, while the yellow region represents the switch. The dotted line indicates that the post-selection happens at every step, which is specific to this framework.

First Iteration: (k=1): Let us look at the first iteration of Grover's search algorithm running on an unstructured database. The input system will be an $n$-qubit system, represented by a $d$ dimensional qudit system where $d = 2^n$ since there is a one-to-one mapping between the $n$-qubit system and $d=2^n$ level qudit system. We model the noise in the iteration as a composition of two total depolarizing channel (TDCh) errors $(1-\sqrt{t})$.

Thus, if we consider $t$ to be the channel parameter for the depolarizing channel, we can model noise in the first iteration as a channel,

\begin{equation}\
\mathcal{D}_{t}(\rho) = t \rho + (1 - t) \mathrm{Tr}(\rho) \dfrac{\mathbb{I}_d}{d} = \mathcal{D}_{\sqrt{t}}(\mathcal{D}_{\sqrt{t}}(\rho)) \label{TDCh_noise}.
\end{equation}

This noise is nothing but a combination of two noises of depolarizing channels, each with error parameter $1-\sqrt{t}$. These noises can be expressed as the channel,

\begin{equation}\
\mathcal{D}_{\sqrt{t}}(\rho) = \sqrt{t} \rho + (1 - \sqrt{t}) \mathrm{Tr}(\rho) \dfrac{\mathbb{I}_d}{d} = \sum\limits_{i = 0}^{d^2} K_i \rho K_i^\dagger \label{eqn:decomposed_error}
\end{equation}

Here the set of Kraus operators, $\{K_i\}$, for the above channel will be, $K_0 = t^{\frac{1}{4}}\mathbb{I}_d$ and $K_i = \sqrt{\dfrac{(1-\sqrt{t})}{d^2}}U_i$   where {$i = 1,2,\ldots d^2$}. Thus, we can express the Kraus operators of the switch $\mathcal{S}$ as,

\begin{eqnarray}
\mathcal{W}_{ij}
&&= K_i K_j \otimes \ket{0}\bra{0} + K_j K_i \otimes \ket{1}\bra{1}{}\nonumber\\
&&= \dfrac{(1-\sqrt{t})}{d^2}\Bigg (U_i U_j \otimes \ket{0}\bra{0} + U_j U_i \otimes \ket{1}\bra{1}\Bigg )
\end{eqnarray}

for  $i,j =  0,1,2\ldots d^2$. Here, $\{K_i\}$ and $\{K_j\}$ are Kraus operators for the two identical channels given in <ref>. Suppose that the control system is fixed to the state,

\begin{eqnarray}
\rho_c &&= \ket{\psi_c}\bra{\psi_c}\ \qquad
\end{eqnarray}

Here, $\ket{\psi_c}=\sqrt{\theta}\ket{0} + \sqrt{\overline{\theta}}\ket{1}$. We prepare the $n$-qubit system, which is input to Grover's search, in the state $\rho_{(0)}$, which can be considered a $d$ dimensional qudit system. Now, in an ideal case scenario without noise, it is straightforward that after applying the oracle operator and diffusion operator $k$ times, the result is $\rho(k) = G^k\rho(0)(G^\dagger)^k$, where $G = DO$ is also known as the Grover operator. Thus, after the first Grover iteration, the system's state is supposed to be denoted by: $G\rho(0)G^\dagger = \rho(1)$. If we consider the noise as TDCh Error (<ref>), the resultant state can be denoted by,

\begin{equation}\label{eqn:noise_decomposition}
D_{t}(\rho(1)) = t \rho(1) + (1 - t) \mathrm{Tr}(\rho(1)) \dfrac{\mathbb{I}_d}{d} = \mathcal{D}_{\sqrt{t}}(\mathcal{D}_{\sqrt{t}}(\rho(1))).
\end{equation}

Now, If we consider a quantum switch applied on these two decomposed channels, the resultant state  $\mathcal{S} (\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho(1) \otimes \rho_{c})$ is given by,

\begin{eqnarray*}
\mathcal{S} (\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho(1) \otimes \rho_{c})
&= \mathlarger{\mathlarger{\sum\limits}}_{i, \,j = 0}^{d^2} \mathcal{W}_{ij}(\rho(1) \otimes \rho_{c}) \mathcal{W}_{ij}^{\dagger}\\
&= \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2} \Bigl\{ \bigl(K_i K_j\otimes \ket{0} \bra{0} + K_j K_i \otimes \ket{1} \bra{1}\bigl)\bigl(\rho(1) \otimes \rho_{c}\bigl)\bigl(K_i K_j\otimes \ket{0} \bra{0} + K_j K_i \otimes \ket{1} \bra{1}\bigl)^{\dagger}\Bigl\}\\
&= \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2}\biggl \{ \left(K_i K_j  \rho(1)  K_j^{\dagger} K_i^{\dagger} \otimes \theta \ket{0}\bra{0}\right)  +  \left(K_i K_j  \rho(1)  K_i^{\dagger} K_j^{\dagger} \otimes \sqrt{\theta\overline{\theta}} \ket{0}\bra{1}\right) \\
&\qquad+\left(K_j K_i\rho(1)  K_j^{\dagger} K_i^{\dagger} \otimes \sqrt{\theta\overline{\theta}} \ket{1}\bra{0}\right) + \left(K_i K_j  \rho(1)  K_j^{\dagger} K_i^{\dagger} \otimes \overline{\theta} \ket{1}\bra{1}\right) \biggl \}\\
\end{eqnarray*}

Detailed calculations are in <ref>

\begin{eqnarray}\label{init_switched_1}
\mathcal{S}(\mathcal{D}_{\sqrt{t}},\mathcal{D}_{\sqrt{t}})(\rho(1) \otimes \rho_{c}) = (1-\sqrt{t})^2\left(\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\otimes\left(\theta\ket{0}\bra{0}+\overline{\theta}\ket{1}\bra{1}\right)+\frac{\rho(1)}{d^2}\otimes\left(\sqrt{\theta\overline{\theta}}\ket{0}\bra{1}+\sqrt{\theta\overline{\theta}}\ket{1}\bra{0}\right)\right)\\
\end{eqnarray}

The quantum switch orchestrates the transfer of information not solely within the input system $\rho$ or the control system $\rho_c$ alone but fundamentally within the correlations established between the output system and the control. It's pivotal to highlight that the crux of the information transfer lies in these quantum correlations.  In the event of the control qubit undergoing decoherence within the computational basis $\{\ket{0}, \ket{1}\}$, the information becomes entirely inaccessible. But for our study, we assume the control system to be noiseless for the time scale we're considering.  At the end, we do measurements on the control qubit in the basis $\{\ket{+}, \ket{-}\}$, and these measurements yield conditional states.

§.§.§ State Evolution with Error

In this framework, we measure the basis $\{\ket{+}, \ket{-}\}$ at the end of every iteration. The state of the system at the end of the first iteration is given by,

\begin{eqnarray}\label{eqn:switched1_noisy_grover_evolve_M}
% \rho_{\xi}(1)^\pm=\frac{\Bigl(\mathbb{I}_d\otimes\ket{\pm}\bra{\pm}\Bigl)\mathcal{S}_1^{\sqrt{t}}\Bigl(\mathbb{I}_d^\dagger\otimes\ket{\pm}\bra{\pm}^\dagger\Bigl)}{\mathrm{Tr}\left[\Bigl(\mathbb{I}_d\otimes\ket{\pm}\bra{\pm}\Bigl)\Bigl(\mathbb{I}_d^\dagger\otimes\ket{\pm}\bra{\pm}^\dagger\Bigl)\mathcal{S}_1^{\sqrt{t}}\right]}\\
% \mathcal{S}_1^{\sqrt{t}} = \mathcal{S}(D_{\sqrt{t}}, D_{\sqrt{t}})(\rho(1)\otimes\rho_{c})\nonumber
\rho_{\xi}(1)^\pm=\frac{\bra{\pm}\mathcal{S}_1^{\sqrt{t}}\ket{\pm}}{\mathrm{Tr}\left[\bra{\pm}\mathcal{S}_1^{\sqrt{t}}\ket{\pm}\right]}\\
\mathcal{S}_1^{\sqrt{t}} = \mathcal{S}(D_{\sqrt{t}}, D_{\sqrt{t}})(\rho(1)\otimes\rho_{c})\nonumber
\end{eqnarray}

Here, $\xi$ in the subscript denotes the stepwise switched channel framework.

If we substitute $t$ as $0$, in (<ref>), it yields the same results as <cit.>, which uses completely depolarizing channels for demonstrating enhancement in communication.

But in the case of Grover’s search algorithm, we will consider t as the variable parameter for our analysis later. The density matrix after measurement in the basis $\{\ket{+}, \ket{-}\}$ is given by <ref>,

\begin{equation}
\rho_\xi(1)^{(\pm)}
% =\bra{\pm}\rho(1)\ket{\pm}
= N/M
\end{equation}

\begin{eqnarray}\label{fourier_measured_0}\label{fourier_measured_1}
&&N=\frac{1}{2}\Biggl\{\left(t \pm2\sqrt{\theta\overline{\theta}}\left(\left(\frac{1-\sqrt{t}}{d}\right)^2+t\right)\right)\rho(1)\nonumber\\
&&\quad+\left((1-t) \pm2\sqrt{\theta\overline{\theta}} 2\sqrt{t}(1-\sqrt{t})\right)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\Biggl\}
% &&N=\frac{1}{2} \{ ( t +  2\sqrt{\theta\overline{\theta}}(\frac{(1-\sqrt{t})^{2}}{d^{2}}{}\nonumber\\
% && + t\rho(1)+ ((1-t)\pm2\sqrt{\theta\overline{\theta}}(2\sqrt{t}(1-\sqrt{t}))))\frac{I}{d}\}
\end{eqnarray}

\begin{eqnarray}
&&M=\frac{1}{2}\Biggl\{\left(t \pm2\sqrt{\theta\overline{\theta}}\left(\left(\frac{1-\sqrt{t}}{d}\right)^2+t\right)\right)\nonumber\\
&&\qquad+\left((1-t) \pm2\sqrt{\theta\overline{\theta}} 2\sqrt{t}(1-\sqrt{t})\right)\Biggl\}
% &&M=\frac{1}{2} \{ \left(\pm2\sqrt{\theta\overline{\theta}}(\frac{(1-t)^{2}}{d^{2}} + t^2) + t^2\right){}\nonumber\\
% &&+ \left((1-t^2)\pm2\sqrt{\theta\overline{\theta}}(2t(1-t))\right)\}.
\end{eqnarray}

The result above demonstrates a dependence on the parameter $\theta$ of the control qubit \(\lvert c \rangle\), solely through the coherent indefiniteness <cit.> denoted as \(\sqrt{\theta \overline{\theta}}\) in (<ref>). It is apparent that the optimal choice for the maximum switch setting, i,e 2\(\sqrt{\theta \overline{\theta}} = 1\), proves to be advantageous across all values of $t$ and dimensions $d$.
If we substitute $\theta$ in the above result to be $\frac{1}{2}$
The term \( \bigl(1-t\bigl)\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}+t\rho(1) \) in <ref> represents the output after first iteration corresponding to the parameter \(\theta\) under the scenario where the channel order remains entirely definite (\(\theta\) = 0 or 1). Meanwhile, the second term in (<ref>) signifies the additional information gained due to any degree of ICO ($0 < \theta < 1$). These observations emphasize that within the context of Grover's search algorithm, the quantum switch functions as a mitigator of noise by facilitating more information transfer.

Notably, any positive degree of indefiniteness (\(\theta > 0\)) proves advantageous, signifying that increased indefiniteness yields enhanced benefits. Moreover, it becomes evident that maximum indefiniteness (\(\theta = \frac{1}{2}\), 2\(\sqrt{\theta \overline{\theta}} = 1\)) provides the most favorable conditions for this purpose. Taking the $|+\rangle$ component of the measurement. Post-selecting and correcting based on the $+$ or $-$ part of the measurement.

\begin{equation}
\rho_\xi(1)^{+}= f_\xi(t)\rho(1)+ (1-f_\xi(t))\frac{I}{d}
\end{equation}

\begin{equation}
f_\xi(t)= \frac{\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t}{\left(\frac{1+(t-2\sqrt{t})(1-d^2)}{d^2}+1\right)}
\end{equation}

§.§.§ Success Probability

For this switched channel framework,

we have the success probability $P_s$ for Grover's search algorithm assisted by this switched channel framework (S1) as,

\begin{eqnarray}
% p_s(1,f_s(t),d)
P_\xi(1,(1-t),d)=&& \frac{\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t}{\left(\frac{1+(t-2\sqrt{t})(1-d^2)}{d^2}+1\right)}P(1,1,d)\nonumber\\&&
+ \frac{\left(1-\frac{\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t}{\left(\frac{1+(t-2\sqrt{t})(1-d^2)}{d^2}+1\right)}\right)}{d}.
\end{eqnarray}

Here, "1"- refers to the first iteration, "t" represents error, and "d" is the dimension of the qubit.

Generalisation to $k$ iterations:  Previously, we have shown how the framework behaves when there is only 1 iteration. We extend this to $k$ iterations. In other words, if we do post-selection measurement at the $k^{th}$ step, then the final.

Here, in this framework, we take a measurement

and then do a post-selection, which is a resource-heavy operation. This, in turn, also destroys the correlation between the switch and the state at every step,
and we can keep resetting the same quantum state as a switch repeatedly until the end of the algorithm. So, we will be proposing a better framework in the next subsection.

\begin{eqnarray}
% && p(k,f_s(t)^k,d)
P_\xi(k,(1-t),d) = \nonumber\\&& \left(\frac{\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t}{\left(\frac{1+(t-2\sqrt{t})(1-d^2)}{d^2}+1\right)}\right)^k P(k,0,d)\nonumber\\&&+\frac{1-\left(\frac{\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t}{\left(\frac{1+(t-2\sqrt{t})(1-d^2)}{d^2}+1\right)}\right)^k}{d} \quad
\end{eqnarray}

linecolor=black,linewidth=0.5pt, frametitlerule=true,
apptotikzsetting=mdfframetitlebackground/.append style=
shade,left color=white, right color=gray!20,
frametitlerulewidth=0.5pt, innertopmargin=,
frametitle=Framework-1: Comparison of Success probability between the switch and non-switch scenario,

These plots show the effect of noise strength $(1-t)$ on the success probability of finding the marked element in the search space in Noisy Grover's search algorithm. We are taking the search space to be $d = 2^4$, and thus the algorithm should stop at $k_Gr = \frac{\pi}{4}\sqrt{16} = \pi \approx 3$ iterations. The Plots from left to right show these variations for different iterations: k = 1 (top-left), k = 2 (top-right), and 3 (bottom-left). Here, the green curve represents the Success probability without using any switches, and the magenta curve represents the success probability on applying switches as described in Framework 1<ref>

Here, we plot the figure <ref> comparing the success probability of the switched model of framework 1 and the success probability of the noisy Grover iteration when there is no switch (we take $d=2^4$ as an example ). The switch gives some advantages in restoring the success probability for the first iteration. However, the noise gradually reduces the advantage as the algorithm undergoes further iterations.

§.§ Framework 2: Measurement at the end

linecolor=black,linewidth=0.5pt, frametitlerule=true,
apptotikzsetting=mdfframetitlebackground/.append style=
shade,left color=white, right color=gray!20,
frametitlerulewidth=0.5pt, innertopmargin=,

The figure depicts the application of the switch to Grover's search algorithm (modeled by the Grover operator $\mathcal{G}$). The channel is the ash-colored bar, while the yellow region represents the switch. The dotted line at the end indicates that the post-selection happens at the very end, which is specific to this particular framework. Here, we take a register of $k$ switches, thus allowing us to preserve the system and switch correlation until the end.

In the previous framework, we are measuring every step. So, the gain in the success probability may be attributed to the post-selection of the state. To circumvent this, we propose this new framework in this section to see the cumulative effect of $k$ switches after $k$ iterations by measuring them on the Hadamard basis at the very end. We are only able to run this model till $k=3$ numerically. Here, we use a register containing $k$ switches. It should be noted that this framework is identical to the previous framework for the first iteration because we're measuring the control state after the first iteration in the previous framework. The stark departure from the previous framework can be noticed if we look at further iterations where we will consider the quantum state consisting of the output after the first iteration ($\rho_1(1)$) and the control state ($\rho_{c_1}$) as the input to the next noisy Grover iteration. This contrasts with the previous framework, where we measure the control state and perform post-selection, thus destroying the correlation between the input state and the quantum switch.

Before we go into the details of this framework, we start with analyzing the output obtained after the first iteration, which will be common in both. This output $\mathcal{S}(\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho(1) \otimes \rho_c)$ <ref> can be rearranged as:

\begin{eqnarray}\label{rearranged_init_switched_1}
&&\mathcal{S}(\mathcal{D}_{\sqrt{t}},\mathcal{D}_{\sqrt{t}})(\rho(1) \otimes \rho_{c})\nonumber\\
&&= \left\{t\rho(1) + (1-t)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\right\}\nonumber\\ &&\otimes\left(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\right)\nonumber\\
&&+\left\{\left(\left(\frac{1-\sqrt{t}}{d}\right)^2+t\right)\rho(1) + 2\sqrt{t}(1-\sqrt{t})\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\right\}\nonumber\\ &&\otimes\sqrt{\theta\overline{\theta}}\left(\ket{0}\bra{1}+\ket{1}\bra{0} \right)
\end{eqnarray}

The term \( \bigl(1-t\bigl)\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}+t\rho(1) \) in <ref> represents the output after first iteration corresponding to the parameter \(\theta\) under the scenario where the channel order remains entirely definite (\(\theta\) = 0 or 1). Meanwhile, the second term in (<ref>) signifies the additional information gained due to any degree of ICO ($\theta  > 0$ or $< 1$). These observations emphasize that within the context of Grover's search algorithm, the quantum switch functions as a mitigator of noise by facilitating more information transfer.

In the first framework, we analyzed the system after each iteration of Grover's search, with measurements and post-selections performed at every step. As we transition to the second framework, our approach differs significantly. Instead of measuring and post-selecting the control qubit after each iteration, we employ multiple quantum switches and defer these actions until the end of all iterations. This approach allows the system to evolve through a series of Grover search iterations without intermediate collapse, potentially capturing different dynamics compared to the first framework.

We introduce some notation here to make the representation of states concise and highlight the recursive acting nature of this switched channel framework:

* $
f_{\rho} = t, \quad f_{\mathbb{I}_d} = (1-t),$

* $
r_{\rho} = \left(\dfrac{1-\sqrt{t}}{d}\right)^2 + t, \quad r_{\mathbb{I}_d} = 2\sqrt{t}(1-\sqrt{t})$

\begin{eqnarray}
\mathcal{F}(\rho) = \Biggl(\biggl(1-t\biggl)\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}+t\rho\Biggl)\\
= f_{\rho}\rho + f_{\mathbb{I}_d} \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}
\end{eqnarray}

\begin{eqnarray}
\mathcal{R}(\rho) = \Biggl\{\Biggl(\left(\dfrac{1-\sqrt{t}}{d}\right)^2+t\Biggl)\rho+2\sqrt{t}\biggl(1-\sqrt{t}\biggl)\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\Biggl\}\\
= r_{\rho}\rho + r_{\mathbb{I}_d} \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}
\end{eqnarray}

* $\mathcal{S}(\mathcal{D}_{\sqrt{t}},\mathcal{D}_{\sqrt{t}})(\rho(1) \otimes \rho_{c})\\= \begin{bmatrix}
\theta \mathcal{F}(\rho(1))
& \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho(1))\\
\sqrt{\theta\overline{\theta}}\mathcal{R}(\rho(1))
& \overline{\theta}\mathcal{F}(\rho(1))
\end{bmatrix}\\\scriptsize{
= \begin{bmatrix}
\theta\Biggl(f_{\rho}\rho(1) + f_{\mathbb{I}_d} \mathrm{Tr}(\rho(1))\dfrac{\mathbb{I}_d}{d}\Biggl)
& \sqrt{\theta\overline{\theta}}\Biggl(r_{\rho} \rho(1) + r_{\mathbb{I}_d} \mathrm{Tr}(\rho(1))\dfrac{\mathbb{I}_d}{d}\Biggl)\\
\sqrt{\theta\overline{\theta}}\Biggl(r_{\rho}\rho(1) + r_{\mathbb{I}_d} \mathrm{Tr}(\rho(1))\dfrac{\mathbb{I}_d}{d}\Biggl)
& \overline{\theta}\Biggl(f_{\rho}\rho(1) + f_{\mathbb{I}_d} \mathrm{Tr}(\rho(1))\dfrac{\mathbb{I}_d}{d}\Biggl)
\end{bmatrix}}$

* $\rho_{\omega 1}(1) = \mathcal{S}(\mathcal{D}_{\sqrt{t}},\mathcal{D}_{\sqrt{t}})(\rho(1) \otimes \rho_{c})$. Here, the $\omega$ in subscript highlights this second framework where we make measurements at the end. The integer after that (1 in this case) denotes the number of switches correlated to the input state. The integer in the bracket denotes the number of Grover iterations applied on the search space, the input state.

$\rho_{\omega 1}(1) = \begin{bmatrix}
\theta \mathcal{F}(\rho(1))
& \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho(1))\\
\sqrt{\theta\overline{\theta}}\mathcal{R}(\rho(1))
& \overline{\theta}\mathcal{F}(\rho(1))
\end{bmatrix}$

* Let \( A \) be a block matrix composed of \( 2^k \times 2^k \) blocks, where each block \( A_{ij} \) is a \( d \times d \) matrix. The element-wise trace operation for \(A \), denoted by \( \mathrm{Tr}_{d \times d}(A) \), is defined as the operation that produces a new \( 2^k \times 2^k \) matrix \( T \), where each element \( T_{ij} \) of \( T \) is the trace of the corresponding \( d \times d \) block \( A_{ij} \) of \( A \). We will represent this operation as:

\[ \mathrm{Tr}_d(A) = T \quad \text{where} \quad T_{ij} = \mathrm{Tr}(A_{ij}) \]

for all \( i \) in \( 1, 2, \ldots, M \) and \( j \) in \( 1, 2, \ldots, N \). Here, \( \mathrm{Tr}(A_{ij}) \) denotes the standard trace of the \( d \times d \) matrix \( A_{ij} \).

It is also evident in the block matrix representation that the output is a valid density matrix, albeit in a Hilbert space with dimension $2d$ after the first iteration.

Second Iteration ($k = 2$): We know the action of the switched noisy channels from the first iteration. This output, where the state representing the search space is now correlated with the first switch $\rho_{c_1}$, will be the input to the next iteration. Thus, unlike the first framework where in the next iteration, $\mathcal{G}$ is applied again on the search space $\rho_xi(1)$, after the switch is traced out, in this framework, the next Grover iteration will act as   $\Bigl(\mathcal{G}\otimes\mathbb{I}_d\Bigl)$ on $\rho_{\omega1}(1)$ to make sure only the search space goes through the Grover iteration ($\mathcal{G} = DO$) discussed in <ref>. Following the notation defined in <ref>, We denote this output as $\rho_{\omega1}(2)$. After this, the noise acting on this iteration will be a combination of ($\mathcal{D}_{\sqrt{t}}\otimes\mathbb{I}_d$), as discussed earlier <ref>.

Here, We assume the quantum switches are noiseless for the time scale we're considering. Now, we use another switch $\rho_{c_2}$ to put these noisy channels in superposition as: We apply the noise, $\bigl(D_{\sqrt{t}} \otimes \mathbb{I}_d\bigl)$ because the switch is noiseless. We can express the Kraus operators of the switch with $\bigl(D_{\sqrt{t}} \otimes \mathbb{I}_d\bigl)$.

\begin{eqnarray}
&&\mathcal{W}_{ij}^{(2)} = {}\nonumber\\&& \Bigl(K_i \otimes \mathbb{I}_d\Bigl)\Bigl(K_j \otimes \mathbb{I}_d\Bigl) \otimes \ket{0}\bra{0} + \Bigl(K_i \otimes \mathbb{I}_d\Bigl)\Bigl(K_j \otimes \mathbb{I}_d\Bigl) \otimes \ket{1}\bra{1}={}\nonumber\\&&
\Bigl(K_iK_j\otimes\mathbb{I}_d\Bigl)\otimes\ket{0}\bra{0}+\Bigl(K_jK_i\otimes\mathbb{I}_d\Bigl)\otimes\ket{1}\bra{1}\\
=\mathcal{S}\left((\mathcal{D}_{\sqrt{t}}\otimes\mathbb{I}_d), (\mathcal{D}_{\sqrt{t}}\otimes\mathbb{I}_d)\right)(\rho_{\omega1}(2) \otimes \rho_{c_2}){}\nonumber\\&&
% \begin{eqnarray}
% \rho_{\omega2}(2) = \mathcal{S}(D_{\sqrt{t}} \otimes \mathbb{I}_d, D_{\sqrt{t}} \otimes \mathbb{I}_d)(\rho_{\omega1}(2) \otimes \rho_{c_2})
= \mathlarger{\mathlarger{\sum\limits}}_{i, j =0}^{d^2}W_{i j}^{(2)}\Bigl(\rho_{\omega1}(2) \otimes \rho_{c}\Bigl)W_{i j}^{\dagger}{}\nonumber\\&&
= \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2}\Biggl\{ \Bigl(K_i K_j \otimes \mathbb{I}_d\Bigl) \otimes \ket{0}\bra{0} + \Bigl(K_j K_i \otimes \mathbb{I}_d\Bigl) \otimes \ket{1}\bra{1} \Biggl\}{}\nonumber\\&&
\Bigl(\rho_{\omega1}(2) \otimes \rho_{c_2} \Bigl)
% \end{eqnarray}
\end{eqnarray}

Detailed calculations can be found in the appendix <ref>.
We know the action of the switched noisy channels from the k = 1 iteration if we apply the same action recursively; for k = 2, we get this.

\begin{eqnarray}
\rho_{\omega2}(2) &= \begin{aligned}
\left\{\underbrace{f_{\rho} \begin{bmatrix} \theta \mathcal{F}(\rho(2)) & \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho(2))\\ \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho(2)) & \overline{\theta}\mathcal{F}(\rho(2))\end{bmatrix}}
_{f_{\rho}(.) + }
+ \underbrace{f_{\mathbb{I}_d} \frac{\mathbb{I}_d}{d}\otimes\begin{bmatrix}\theta \mathrm{Tr}(\mathcal{F}(\rho(2))) & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho(2)))\\\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho(2))) & \overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho(2)))\end{bmatrix}}
_{f_{\mathbb{I}_d} \frac{\mathbb{I}_d}{d} \otimes \mathrm{Tr}_{d\times d}(.)} \right\}
\otimes \left(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\right)\\
+\left\{\underbrace{r_{\rho} \begin{bmatrix}\theta \mathcal{F}(\rho(2)) & \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho(2))\\ \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho(2)) & \overline{\theta}\mathcal{F}(\rho(2)) \end{bmatrix}}
_{r_{\rho}(.) + }
+ \underbrace{r_{\mathbb{I}_d} \frac{\mathbb{I}_d}{d}\otimes\begin{bmatrix}\theta \mathrm{Tr}(\mathcal{F}(\rho(2))) & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho(2)))\\ \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho(2))) & \overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho(2))) \end{bmatrix}}
_{r_{\mathbb{I}_d} \frac{\mathbb{I}_d}{d} \otimes \mathrm{Tr}_{d\times d}(.)}\right\}
\otimes\sqrt{\theta\overline{\theta}}\left(\ket{0}\bra{1} + \ket{1}\bra{0}\right)
\end{aligned}\\
& = \begin{bmatrix} \label{k=2_result}
\theta \begin{bmatrix}
\theta \mathcal{F}(\mathcal{F}(\rho(2))) & \sqrt{\theta\overline{\theta}} \mathcal{F}(\mathcal{R}(\rho(2))) \\ \sqrt{\theta\overline{\theta}} \mathcal{F}(\mathcal{R}(\rho(2))) & \overline{\theta} \mathcal{F}(\mathcal{F}(\rho(2)))
\end{bmatrix} &
\sqrt{\theta\overline{\theta}} \begin{bmatrix}
\theta \mathcal{R}(\mathcal{F}(\rho(2))) & \sqrt{\theta\overline{\theta}} \mathcal{R}(\mathcal{R}(\rho(2))) \\ \sqrt{\theta\overline{\theta}} \mathcal{R}(\mathcal{R}(\rho(2))) & \overline{\theta} \mathcal{R}(\mathcal{F}(\rho(2)))
\end{bmatrix} \\
\sqrt{\theta\overline{\theta}} \begin{bmatrix}
\theta \mathcal{R}(\mathcal{F}(\rho(2))) & \sqrt{\theta\overline{\theta}} \mathcal{R}(\mathcal{R}(\rho(2))) \\ \sqrt{\theta\overline{\theta}} \mathcal{R}(\mathcal{R}(\rho(2))) & \overline{\theta} \mathcal{R}(\mathcal{F}(\rho(2)))
\end{bmatrix} &
\overline{\theta} \begin{bmatrix}
\theta \mathcal{F}(\mathcal{F}(\rho(2))) & \sqrt{\theta\overline{\theta}} \mathcal{F}(\mathcal{R}(\rho(2))) \\ \sqrt{\theta\overline{\theta}} \mathcal{F}(\mathcal{R}(\rho(2))) & \overline{\theta} \mathcal{F}(\mathcal{F}(\rho(2)))
\end{bmatrix}
\end{bmatrix}
\end{eqnarray}

See Appendix <ref>, for detailed calculation. <ref> is a 4d dimensional block matrix which is again analogous to <ref>. Now, if we want to stop the algorithm at this stage and analyze the state for success probability, we will need to make the measurement as follows:

\begin{eqnarray}
{(f_{\rho}+2\sqrt{\theta\overline{\theta}}r_{\rho})^2+(f_\mathbb{I} + 2\sqrt{\theta\overline{\theta}}r_\mathbb{I})(1+2\sqrt{\theta\overline{\theta}}r_{\rho}+ r_I) + f_{\rho} + 2\sqrt{\theta\overline{\theta}}r_{\rho})}\rho(2)\nonumber\\
&+ \frac{(f_\mathbb{I}+2\sqrt{\theta\overline{\theta}}r_I)(1+2\sqrt{\theta\overline{\theta}}r_{\rho}+ r_\mathbb{I}) + f_{\rho} + 2\sqrt{\theta\overline{\theta}}r_{\rho})}{(f_{\rho} + 2\sqrt{\theta\overline{\theta}}r_{\rho})^2 + (f_I + 2 \sqrt{\theta\overline{\theta}}r_I) (1 + 2 \sqrt{\theta\overline{\theta}}r_{\rho} + r_I) + f_{\rho} + 2 \sqrt{\theta\overline{\theta}}r_{\rho})}
\end{eqnarray}

Extending the output state to $k$-th iteration:  The quantum operation applied to the output of $(k-1)^{th}$ (input to the $k^{th}$) iteration will be $\left(\mathbb{I}_d\otimes G D_t\right)\rho_{k-1}(k)\left(D_t^{\dagger}G^{\dagger}\otimes\mathbb{I}_d^{\dagger}\right)$.

If we apply that action recursively, (as the input of the $k^{th}$ iteration is the same as the output of the $(k-1)^{th}$ iteration)

we can use <ref> and expand the previous notation of $\mathcal{F}$ and $\mathcal{R}$ to write the above result as:

\[
\rho_{\omega2}(2) = \begin{bmatrix}
\theta \mathcal{F}_{(2)}(\rho_{\omega1}(2)) & \sqrt{\theta\overline{\theta}} \mathcal{R}_{(2)}(\rho_{\omega1}(2)) \\ \sqrt{\theta\overline{\theta}} \mathcal{R}_{(2)}(\rho_{\omega1}(2)) & \theta \mathcal{F}_{(2)}(\rho_{\omega1}(2))
\end{bmatrix}
\]

At the $k^{th}$ iteration, the state/system will be a $2^k*2^n = 2^{k+n}$ dimensional matrix. In terms of the number of terms, there will be $2^k*2^k = 2^{k+k} = 4^k$ terms. To study the accumulated error at the $k^{th}$ iteration, we will need to consider taking the state obtained after measurement and post-selection of all the $k$ control states correlated with the output state after $k$ iterations:

Now we can start unpacking the block matrices $F_k$ and $R_k$:

\begin{equation} \label{F_k-sub}
\mathcal{F}_k(\rho_{k-1}(k)) = f_{\rho}\underbrace{(\rho_{k-1}(k))}_{2^{k-1}d  -dimensional} + f_{\mathbb{I}_d} \underbrace{\frac{\mathbb{I}_d}{d}}_{d -dimensional} \otimes \underbrace{\mathrm{Tr}_{d \times d}(\rho_{k-1}(k))}_{2^{k-1} -dimensional}
\end{equation}

\begin{equation}\label{R_k-sub}
\mathcal{R}_k(\rho_{k-1}(k)) = r_{\rho}\underbrace{(\rho_{k-1}(k))}_{2^{k-1}d  -dimensional} + r_{\mathbb{I}_d} \underbrace{\frac{\mathbb{I}_d}{d}}_{d -dimensional} \otimes \underbrace{\mathrm{Tr}_{d \times d}(\rho_{k-1}(k))}_{2^{k-1} -dimensional}
\end{equation}

We get a recursive relation using the above substitutions in <ref> and <ref>. Again, for concise representation, we introduce a notation called block trace, which applies trace on all the $2 \times 2$ block matrices in the matrix. It leads to a matrix that is half the size of the input matrix, again keeping in line with the exponential nature of the calculations. To trace out the switches one by one, we will reduce the matrix's dimension with each step by half.

\begin{eqnarray}
&&(\bra{+}^{\otimes k}) \rho_k(k) (\ket{+}^{\otimes k}) = (\bra{+}^{\otimes k}) \begin{bmatrix}
\theta \mathcal{F}_k(\rho_{k-1}(k)) & \sqrt{\theta\overline{\theta}} \mathcal{R}_k(\rho_{k-1}(k)) \\ \sqrt{\theta\overline{\theta}} \mathcal{R}_k(\rho_{k-1}(k)) & \overline{\theta} \mathcal{F}_k(\rho_{k-1}(k))
\end{bmatrix} (\ket{+}^{\otimes k}){}\nonumber\\&&
= (\bra{+}^{\otimes k-1})(\mathcal{F}_k(\rho_{k-1}(k)))(\ket{+}^{\otimes k-1})
+ 2\sqrt{\theta\overline{\theta}} (\bra{+}^{\otimes k-1}) (\mathcal{R}_k(\rho_{k-1}(k))) (\ket{+}^{\otimes k-1})
\end{eqnarray}

We can write this as $M_{k}(\rho_{k}(k))$ where $M_{k}$ denotes the measurement operation $(\ket{+}^{\otimes k})$

\begin{equation}
\begin{aligned}
M_{k}(\rho_{\omega k}(k)) &= (\bra{+}^{\otimes k}) \rho_k(k) (\ket{+}^{\otimes k})\\
M_{k}(\rho_{\omega k}(k))
&= \frac{1}{2}\left\{
(f_{\rho} + 2\sqrt{\theta\overline{\theta}}r_{\rho})M_{k-1}(\rho_{\omega (k-1)}(k)) \right.\\
&+\left.  (f_{\mathbb{I}_d}+ 2\sqrt{\theta\overline{\theta}}r_{\mathbb{I}_d})(\mathbb{I}_d \otimes \right.\\
&\left.\bra{+}^{\otimes k-1}\otimes\mathrm{Tr}_{d \times d}(\rho_{\omega k-1}(k))\otimes \ket{+}^{\otimes k-1}\right\}
\end{aligned}
\end{equation}

Using this generalization, we can recursively obtain the third iterations as follows:

\begin{eqnarray}
&&M_3(\rho_{\omega 3}(3)) = \frac{1}{2}(f_\rho + 2\sqrt{\theta\overline{\theta}})M_2(\rho_2(3)){}\nonumber\\&&
+ \frac{1}{2}(f_\mathbb{I} + 2\sqrt{\theta\overline{\theta}})\frac{\mathbb{I}_d}{d}(\bra{+}^{\otimes 2} \mathrm{Tr}_{d \times d}(\rho_{\omega 2}(3))\ket{+}^{\otimes 2}){}\nonumber\\&&
M_2(\rho_2(3)) = \frac{1}{2}(f_\rho + 2\sqrt{\theta\overline{\theta}})M_1(\rho_1(3)){}\nonumber\\&&
+ \frac{1}{2}(f_\mathbb{I} + 2\sqrt{\theta\overline{\theta}})\frac{\mathbb{I}_d}{d}(\bra{+} Block-Tr_1(\rho_2(3))\ket{+}){}\nonumber\\&&
M_1(\rho_1(3)) = \frac{1}{2}(f_\rho + 2\sqrt{\theta\overline{\theta}})M_0(\rho_0(3)){}\nonumber\\&&
+ \frac{1}{2}(f_\mathbb{I} + 2\sqrt{\theta\overline{\theta}})\frac{\mathbb{I}_d}{d} Tr_{d \times d}(\rho_0(3))
\end{eqnarray}

Here, $M_0(\rho_0(2)) = \rho_3 \qquad and \quad \mathrm{Tr}_{d \times d}(\rho_3) = Tr(\rho_3)) = 1$.

§.§.§ Success Probability

We can then use the output state after measurement and post-selection to calculate the success probability in a similar way to the first framework, where success probability can be written as:

\begin{equation}
\text{(coefficient of }\rho\text{)}P(k,0,d) + \frac{\text{(coefficient of }\frac{\mathbb{I}_d}{d}\text{)}}{d}
\end{equation}

Thus, we can write the success probability for the first three iterations in terms of the parameter $t$  as,

\begin{gather}
\begin{aligned}
% p_s(1,f_s(t),d)
P_\xi(1,(1-t),d)=&& \frac{\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t}{\left(\frac{1+(t-2\sqrt{t})(1-d^2)}{d^2}+1\right)}P(1,0,d)
+ \frac{\left(1-\frac{\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t}{\left(\frac{1+(t-2\sqrt{t})(1-d^2)}{d^2}+1\right)}\right)}{d}.
\end{aligned}\\
\begin{aligned}
P_\xi(2,(1-t),d)=&& \frac{\left(\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t\right)^2
}{\left( \left(\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t\right)^2 + \left(1 + 2(1 - \sqrt{t})\sqrt{t} - t\right)\left(1 + \frac{1}{d^2}(1 - \sqrt{t})^2 + 2(1 - \sqrt{t})\sqrt{t} + 3t\right)\right)}P(2,0,d)\nonumber\\&&
+ \frac{\left(1 + 2(1 - \sqrt{t})\sqrt{t} - t\right)\left(1 + \frac{1}{d^2}(1 - \sqrt{t})^2 + 2(1 - \sqrt{t})\sqrt{t} + 3t\right)}{\left( \left(\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t\right)^2 + \left(1 + 2(1 - \sqrt{t})\sqrt{t} - t\right)\left(1 + \frac{1}{d^2}(1 - \sqrt{t})^2 + 2(1 - \sqrt{t})\sqrt{t} + 3t\right)\right)}\frac{1}{d}
\end{aligned}\\
\scriptsize{
\begin{aligned}
P_\xi(3,(1-t),d)=&&\frac{\left(\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t\right)^3
}{\left( \left(\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t\right)^3 + \left(1 + 2(1 - \sqrt{t})\sqrt{t} - t\right)\left(1 + \frac{1}{2d^2}(1 - \sqrt{t})^2 + 2(1 - \sqrt{t})\sqrt{t} + 3t + \left(\frac{1}{d^2}(1 - \sqrt{t})^2 + 2t\right)^2\right)
\right)}P(3,0,d)\nonumber\\&&
+ \frac{\left(1 + 2(1 - \sqrt{t})\sqrt{t} - t\right)\left(1 + \frac{1}{2d^2}(1 - \sqrt{t})^2 + 2(1 - \sqrt{t})\sqrt{t} + 3t + \left(\frac{1}{d^2}(1 - \sqrt{t})^2 + 2t\right)^2\right)
}{\left( \left(\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t\right)^3 + \left(1 + 2(1 - \sqrt{t})\sqrt{t} - t\right)\left(1 + \frac{1}{2d^2}(1 - \sqrt{t})^2 + 2(1 - \sqrt{t})\sqrt{t} + 3t + \left(\frac{1}{d^2}(1 - \sqrt{t})^2 + 2t\right)^2\right)
\right)}\frac{1}{d}
\end{aligned}}
\end{gather}

linecolor=black,linewidth=0.5pt, frametitlerule=true,
apptotikzsetting=mdfframetitlebackground/.append style=
shade,left color=white, right color=gray!20,
frametitlerulewidth=0.5pt, innertopmargin=,
frametitle=Framework-2: Comparison of Success probability between the switch and non-switch scenario,

These plots show the effect of noise strength $(1-t)$ on the success probability of finding the marked element in the search space in Noisy Grover's search algorithm. We are taking the search space to be $d = 2^4$, and thus the algorithm should stop at $k_Gr = \frac{\pi}{4}\sqrt{16} = \pi \approx 3$ iterations. The Plots from left to right show these variations for different iterations: k = 1 (top-left), k = 2 (top-right), and 3 (bottom-left). Here, the green curve represents the Success probability without using any switches, and the magenta curve represents the success probability on applying switches as described in Framework 2<ref>

Here, we plot the figure <ref> comparing the success probability of the switched channel framework 2 and the success probability of the noisy Grover iteration when there is no switch as the noise $(1-t)$ varies across $x$-axis. Just like <ref>, it is again clear that the switch is giving an advantage in terms of restoring the success probability for the first and subsequent $k=2$ and $k=3$ (we take $d=2^4$ as an example). Ideally, the algorithm is supposed to stop after $k_{Gr}= \frac{\pi}{4}\sqrt{2^4} = \pi \approx 3$ iterations, and we can see how an increase in noise can drastically bring down the success probability from 1. This can be prevented using the switched channel framework 2 proposed in this section, which allows the system to tolerate more noise while keeping the success probability within an acceptable range.

§ CONCLUSIONS

We can conclude that using quantum switches can
As given in Vrana et al., quantum search is only one such problem fitting the framework and definition of a fault-ignorant quantum algorithm.

Acknowledgement: SS acknowledges useful discussions with Dr. Shantanav Chakraborty and Dr. Siddhartha Das of Centre for Quantum Science and Technology, IIIT Hyderabad.

§ APPENDIX

§.§ Calculations for the first iteration (k = 1) in noisy Grover's Search with Algorithm with quantum  switch

For $k = 1$, we have $\mathcal{S} (\mathcal{D}_{\sqrt{t}} , \mathcal{D}_{\sqrt{t}}) (\rho \otimes \rho_c)$. Now, by expanding the inputs in the  expression, we have

1. The depolarising channel noise represented as $\mathcal{D}_{\sqrt{t}}$

\begin{eqnarray}
\mathcal{D}_{\sqrt{t}}(\rho) &&= \sqrt{t} \rho + (1 - \sqrt{t}) \mathrm{Tr}(\rho) \dfrac{\mathbb{I}_d}{d}\nonumber\\&&
= \sqrt{t}\rho + (1 - \sqrt{t})\dfrac{1}{d^2}\mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2} U_i \rho U_i^\dagger\qquad\text{using, } \dfrac{1}{d^2}\sum_{i = 1}^{d^2}U_i \rho U_{i}^{\dagger} = \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\nonumber\\&&
= \dfrac{(1-\sqrt{t})}{d^2}\Bigg (\dfrac{\sqrt{t}d^2}{1-\sqrt{t}} \mathbb{I}_d \rho \mathbb{I}_d^\dagger + \mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2} U_i \rho U_i^\dagger \Bigg){}\nonumber\\&&
= \dfrac{(1-\sqrt{t})}{d^2}\Bigg ( U_0 \rho U_0^\dagger + \mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}   U_i   \rho   U_i^\dagger \Bigg )\qquad\text{taking, } U_0 = \sqrt{\dfrac{\sqrt{t}d^2}{1-\sqrt{t}}}   \mathbb{I}_d\nonumber\\&&
= \dfrac{(1-\sqrt{t})}{d^2} \mathlarger{\mathlarger{\sum\limits}}_{i = 0}^{d^2}   U_i   \rho   U_i^\dagger
\end{eqnarray}

Using, $K_0 = \sqrt{\dfrac{(1-\sqrt{t})}{d^2}}U_0 = \sqrt[4]{t}\mathbb{I}_d$ and $K_i = \sqrt{\dfrac{(1-\sqrt{t})}{d^2}}U_i$  where {$i = 1,2,\ldots d^2$}. We have the set of Kraus operators $\{K_i\}$ for $\mathcal{D}_{\sqrt{t}}$

\begin{equation} \label{def:dep_kraus_sqrt(t)}
\mathcal{D}_{\sqrt{t}}(\rho)= \mathlarger{\mathlarger{\sum\limits}}_{i = 0}^{d^2} K_i \rho K_i^\dagger
\end{equation}

2. The control qubit represented as denoted by $\rho_c$
\begin{eqnarray}
\rho_c &&= \ket{c}\bra{c}\ \qquad \text{where, }\ket{c}=\sqrt{\theta}\ket{0} + \sqrt{\overline{\theta}}\ket{1}{}\nonumber\\&&
\end{eqnarray}

3. The input search space after the application of the first Grover iteration, consisting of $n$-qubits $\equiv$  $2^n$ dimensional qudit system denoted by $\rho(1)$.

We can express the Kraus operators of the switch $\mathcal{S}$ <ref>:

\begin{eqnarray}
\mathcal{W}_{ij} &&= K_i K_j \otimes \ket{0}\bra{0} + K_j K_i \otimes \ket{1}\bra{1}{}\nonumber\\&& = \dfrac{(1-\sqrt{t})}{d^2}\Bigg (U_i U_j \otimes \ket{0}\bra{0} + U_j U_i \otimes \ket{1}\bra{1}\Bigg )  \text{for } i,j = 0,1,2\ldots d^2
\end{eqnarray}

\begin{eqnarray}
\mathcal{S} (\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho(1) \otimes \rho_{c})
&&= \mathlarger{\mathlarger{\sum\limits}}_{i, \,j = 0}^{d^2} \mathcal{W}_{ij}(\rho(1) \otimes \rho_{c}) \mathcal{W}_{ij}^{\dagger}\nonumber\\
&&= \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2} \Bigl\{ \bigl(K_i K_j\otimes \ket{0} \bra{0} + K_j K_i \otimes \ket{1} \bra{1}\bigl)\bigl(\rho(1) \otimes \rho_{c}\bigl)\bigl(K_i K_j\otimes \ket{0} \bra{0} + K_j K_i \otimes \ket{1} \bra{1}\bigl)^{\dagger}\Bigl\}{}\nonumber\\
&&= \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2}\Bigl\{ \bigl (K_i K_j  \rho_{(1)}  K_j^{\dagger} K_i^{\dagger} \otimes \ket{0}\bra{0}  \rho_{c}  \ket{0}\bra{0}\bigl )  {} +  \bigl (K_i K_j  \rho_{(1)}  K_j^{\dagger} K_i^{\dagger} \otimes \ket{0}\bra{0}  \rho_{c_1}  \ket{1}\bra{1}\bigl ){}\nonumber\\
&&\quad+ \bigl (K_i K_j  \rho_{(1)}  K_j^{\dagger} K_i^{\dagger} \otimes \ket{1}\bra{1}  \rho_{c_1}  \ket{0}\bra{0}\bigl ){}+  \bigl (K_i K_j  \rho_{(1)}  K_j^{\dagger} K_i^{\dagger} \otimes \ket{1}\bra{1}  \rho_{c_1}  \ket{1}\bra{1}\bigl ) \Bigl\}\\
% \left \{
%   \begin{tabular}{ccc}
%     $\because (A + B)^{\dagger} = A^{\dagger} + B^{\dagger}$\\
%     $\because ( A \otimes B)^{\dagger} = A^{\dagger} \otimes B^{\dagger}$ \\
%     $\because (AB)^{\dagger} = B^{\dagger}A^{\dagger}$
%   \end{tabular}
%   \right \}
%           \end{eqnarray}
% \begin{eqnarray}
\mathcal{S} (\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho_{(1)} \otimes \rho_{c_1})
&&=  \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2}\biggl \{ \bigl (K_i K_j  \rho_{(1)}  K_j^{\dagger} K_i^{\dagger} \otimes \theta \ket{0}\bra{0}\bigl )  +  \bigl (K_i K_j  \rho_{(1)}  K_j^{\dagger} K_i^{\dagger} \otimes \sqrt{\theta\overline{\theta}} \ket{0}\bra{1}\bigl ) {}\nonumber\\
&&\quad+ \bigl (K_i K_j  \rho_{(1)}  K_j^{\dagger} K_i^{\dagger} \otimes \sqrt{\theta\overline{\theta}} \ket{1}\bra{0}\bigl ) + \bigl (K_i K_j  \rho_{(1)}  K_j^{\dagger} K_i^{\dagger} \otimes \overline{\theta} \ket{1}\bra{1}\bigl ) \biggl \}
\end{eqnarray}

<ref> gives the Kraus operators. We will break this equation into four parts:

1. After fixing both $i = j = 0$ , we have

\begin{eqnarray} \label{eqn:switch_i=0,j=0}
&&\mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2} \Biggl \{ \Biggl (\sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_i \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j \rho_{(1)} \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j^{\dagger}\sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_i^{\dagger} \otimes  \theta \ket{0}\bra{0}\Biggl ) +{}\nonumber\\
&&\quad \Biggl (\sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_i \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j \rho_{(1)} \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j^{\dagger}\sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_i^{\dagger} \otimes  \sqrt{\theta\overline{\theta}} \ket{0}\bra{1}\Biggl ) +{}\nonumber\\
&&\quad \Biggl (\sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_i \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j \rho_{(1)} \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j^{\dagger}\sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_i^{\dagger} \otimes  \sqrt{\theta\overline{\theta}} \ket{1}\bra{0}\Biggl ) +{}\nonumber\\
&&\quad \Biggl (\sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_i \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j \rho_{(1)} \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j^{\dagger}\sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_i^{\dagger} \otimes  \overline{\theta} \ket{1}\bra{1}\Biggl )
\Biggl \}{}\nonumber\\
&&= \mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2} \Biggl(\dfrac{1-\sqrt{t}}{d^2}\Biggl)^2\Biggl (U_i U_j  \rho_{(1)}  U_j^{\dagger} U_i^ {\dagger} \otimes \theta \ket{0}\bra{0} +{}\nonumber
U_i U_j  \rho_{(1)}  U_{i}^{\dagger} U_j^{\dagger} \otimes \sqrt{\theta\overline{\theta}} \ket{0}\bra{1} \nonumber\\
&&\quad + U_j U_i  \rho_{(1)}  U_{j}^{\dagger} U_i^{\dagger} \otimes \sqrt{\theta\overline{\theta}} \ket{1}\bra{0} +{}
U_j U_i  \rho_{(1)}  U_i^{\dagger} U_j^{\dagger} \otimes \overline{\theta} \ket{1}\bra{1}\Biggl)\\
% \noindent Using the property for a $d$-dimensional linear operator $V$, we have $\dfrac{1}{d^2}\Biggl ( \mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}\biggl (U_i  V  U_i^{\dagger}\biggl)\Biggl) = \mathrm{Tr}(V)  \dfrac{\mathbb{I}_d}{d}$ and $\dfrac{1}{d}\Biggl ( \mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}\biggl (\mathrm{Tr}[U_i  V] U_i^{\dagger}\biggl)\Biggl) = V$
% \begin{eqnarray}
&&= \Biggl(\dfrac{1-\sqrt{t}}{d^2}\Biggl)^2\Biggl(\mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2} (U_i U_j  \rho_{(1)}  U_j^{\dagger} U_i^{\dagger} \otimes \theta \ket{0}\bra{0}) + \mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2}  (U_i U_j  \rho_{(1)}  U_{i}^{\dagger} U_j^{\dagger} \otimes \sqrt{\theta\overline{\theta}} \ket{0}\bra{1}){}\nonumber\\
&&\quad+ \mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2}  (U_j U_i  \rho_{(1)}  U_{j}^{\dagger} U_i^{\dagger} \otimes \sqrt{\theta\overline{\theta}} \ket{1}\bra{0}) + \mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2}  (U_j U_i  \rho_{(1)}  U_i^{\dagger} U_j^{\dagger} \otimes \overline{\theta} \ket{1}\bra{1})\Biggl){}\nonumber
\end{eqnarray}

\begin{eqnarray}
&&= (1-\sqrt{t})^2\Biggl \{\dfrac{1}{d^2 }\mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}U_i\Biggl (\dfrac{1}{d^2}\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2} U_j   \rho_{(1)}  U_j^{\dagger}\Biggl ) U_i^{\dagger} \otimes \theta \ket{0}\bra{0} +\dfrac{1}{d^2 }\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2}\Biggl (\dfrac{1}{d^2}\mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2} U_i   \biggl(U_j \rho_{(1)}\biggl)  U_i^{\dagger}\Biggl ) U_j^{\dagger} \otimes \sqrt{\theta\overline{\theta}} \ket{0}\bra{1}{}\nonumber\\
&&\quad+\dfrac{1}{d^2 }\mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}\Biggl (\dfrac{1}{d^2}\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2} U_j   \biggl(U_i \rho_{(1)}\biggl)  U_j^{\dagger}\Biggl ) U_i^{\dagger} \otimes \sqrt{\theta\overline{\theta}} \ket{1}\bra{0}
+\dfrac{1}{d^2 }\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2}U_j\Biggl (\dfrac{1}{d^2}\mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2} U_i   \rho_{(1)}  U_i^{\dagger}\Biggl ) U_j^{\dagger} \otimes \overline{\theta} \ket{1}\bra{1}\Biggl \}{}\nonumber\\
&&= (1-\sqrt{t})^2\Biggl \{\dfrac{1}{d^2 }\mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}U_i \Biggl (\mathrm{Tr}\bigl(\rho_{(1)}\bigl) \dfrac{\mathbb{I}_d}{d}\Biggl ) U_i^{\dagger} \otimes \theta\ket{0}\bra{0} + \dfrac{1}{d^2}\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2} \Biggl (\mathrm{Tr}\bigl(U_j\rho_{(1)}\bigl)\dfrac{\mathbb{I}_d}{d}U_j^{\dagger}\Biggl ) \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1}{}\nonumber\\
&&+\quad\dfrac{1}{d^2}\mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2} \Biggl (\mathrm{Tr}\bigl(U_i\rho_{(1)}\bigl)\dfrac{\mathbb{I}_d}{d}U_i^{\dagger}\Biggl ) \otimes  \sqrt{\theta\overline{\theta}}\ket{1}\bra{0}+\dfrac{1}{d^2}\mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2}U_j \Biggl (\mathrm{Tr}\bigl(\rho_{(1)}\bigl)\dfrac{\mathbb{I}_d}{d}\Biggl ) U_j^{\dagger} \otimes \overline{\theta}\ket{1}\bra{1}
\Biggl\}{}\nonumber\\
&&= (1-\sqrt{t})^2\Biggl\{\mathrm{Tr}(\rho)
% \cancelto{1}{\mathrm{Tr}\biggl(\dfrac{\mathbb{I}_d}{d} \biggl)}
\dfrac{\mathbb{I}_d}{d}\otimes\theta\ket{0}\bra{0}
+\dfrac{1}{d^2}\rho_{(1)}\otimes \sqrt{\theta\overline{\theta}} \ket{0}\bra{1}{}
+\dfrac{1}{d^2}\rho_{(1)}\otimes \sqrt{\theta\overline{\theta}} \ket{1}\bra{0}
+ \mathrm{Tr}(\rho)
% \cancelto{1}{\mathrm{Tr}\biggl(\dfrac{\mathbb{I}_d}{d} \biggl)}
\dfrac{\mathbb{I}_d}{d}\otimes\overline{\theta}\ket{1}\bra{1} \Biggl\}
% \end{eqnarray}
%    % \begin{tabular}{ccc}
%     \text{Using (b)}, \dfrac{1}{d}\Biggl ( \mathlarger{\mathlarger{\sum\limits}}_{i = 1}^{d^2}\biggl (\mathrm{Tr}[U_i V]U_i^{\dagger}\biggl)\Biggl) = V
% \end{tabular}
%=& (1-\sqrt{t})^2\Biggl (\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\otimes \biggl(\theta\ket{0}\bra{0}+\overline{\theta}\ket{1}\bra{1}\biggl)+\dfrac{\rho}{d^2}\otimes\biggl(\sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1}+\ket{1}\bra{0}\biggl)\biggl) \Biggl)
\end{eqnarray}

2. fix $i = 0, j \neq 0$.

\begin{eqnarray}\label{eqn:switch_i_n=_0,j=0}
&&= \mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2} \Biggl\{\sqrt[4]{t} \mathbb{I}_d\sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j \rho_{(1)} \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j^{\dagger}\sqrt[4]{t} \mathbb{I}_d \otimes  \theta \ket{0}\bra{0}{}\nonumber\\
&&\quad+ \sqrt[4]{t} \mathbb{I}_d\sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j \rho_{(1)}\sqrt[4]{t} \mathbb{I}_d \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j^{\dagger} \otimes  \sqrt{\theta\overline{\theta}} \ket{0}\bra{1}{}\nonumber\\
&&\quad+ \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j \sqrt[4]{t} \mathbb{I}_d \rho_{(1)}\sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j^{\dagger} \sqrt[4]{t}\otimes  \sqrt{\theta\overline{\theta}} \ket{1}\bra{0}{}\nonumber\\
&&\quad+ \sqrt{\dfrac{1-\sqrt{t}}{d^2}}U_j \sqrt[4]{t} \mathbb{I}_d \rho_{(1)} \sqrt[4]{t} \mathbb{I}_d\sqrt{\dfrac{1-\sqrt{t}}{d^2}} \otimes  \overline{\theta}\ket{1}\bra{0}\Biggl \}{}\nonumber\\&&=\mathlarger{\mathlarger{\sum\limits}}_{j=1}^{d^2}\Biggl(\sqrt{\dfrac{\sqrt{t}(1-\sqrt{t})}{d^2}}\Biggl)^{2}\Biggl(U_j \rho_{(1)} U_j^{\dagger} \otimes \theta\ket{0}\bra{0} + U_j \rho_{(1)} U_j^{\dagger} \otimes \overline{\theta}\ket{1}\bra{1}{}\nonumber\\
&&\quad+ U_j \rho_{(1)} U_j^{\dagger} \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1} + U_j \rho_{(1)} U_j^{\dagger} \otimes \sqrt{\theta\overline{\theta}}\ket{1}\bra{0}\Biggl){}\nonumber\\
&&= \Biggl(\dfrac{\sqrt{t}(1-\sqrt{t})}{d^2}\Biggl)\mathlarger{\mathlarger{\mathlarger{\mathlarger{\sum\limits}}}}_{j=1}^{d^2}\Biggl(U_j \rho_{(1)} U_j^{\dagger} \otimes \biggl(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1} + \sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1} + \ket{1}\bra{0} \biggl) \biggl) \Biggl){}\nonumber\\
&&= \sqrt{t}\bigl(1-\sqrt{t}\bigl) \dfrac{1}{d^2} \mathlarger{\mathlarger{\sum\limits}}_{j = 1}^{d^2}\Biggl(U_J \rho_{(1)} U_J^{\dagger} \otimes \rho_c\Biggl){} = \sqrt{t}\bigl(1-\sqrt{t}\bigl) \mathrm{Tr}(\rho) \dfrac{\mathbb{I}_d}{d} \otimes \rho_c \nonumber\\
\end{eqnarray}

3. This is symmetric to <ref> and will evaluate to the same value

\begin{equation} \label{eqn:switch_i=0,j_n=_0}
= \sqrt{t}\bigl(1-\sqrt{t}\bigl) \mathrm{Tr}(\rho) \dfrac{\mathbb{I}_d}{d} \otimes \rho_c
\end{equation}

4. Finally, fix $i \neq 0, j \neq 0$

\begin{eqnarray} \label{eqn:switch_i_n=_0,j_n=_0}
= \sqrt[4]{t} \mathbb{I}_d\sqrt[4]{t} \mathbb{I}_d\bigl( \rho  \otimes \rho_c\bigl)\sqrt[4]{t} \mathbb{I}_d\sqrt[4]{t} \mathbb{I}_d\nonumber\\
= t \bigl(\rho \otimes \rho_C\bigl)
\end{eqnarray}

Hence, <ref>+<ref>+<ref>+<ref>

\begin{equation}\label{eqn:switch_k=1_iter}
\begin{aligned}
&\mathcal{S} (\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho_{(1)} \otimes \rho_{c_1}) =\\
&(1-\sqrt{t})^2\Biggl (\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}   \otimes  \biggl(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\biggl) +  \dfrac{\rho}{d^2}  \otimes \biggl(\sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1} + \ket{1}\bra{0}\biggl)\biggl) \Biggl)  +  2\sqrt{t}\bigl(1-\sqrt{t}\bigl) \mathrm{Tr}(\rho) \biggl(\dfrac{\mathbb{I}_d}{d} \otimes \rho_c\biggl) + t \bigl(\rho \otimes \rho_C\bigl)
\end{aligned}
\end{equation}

Collecting Terms, this output can also be written as:

\begin{eqnarray*}
=& \Biggl[\Biggl [ \biggl(1- \sqrt{t}\biggl)^2\Biggl( \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d} \otimes \biggl(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\biggl) + \dfrac{\rho}{d^2} \otimes \sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1} + \ket{1}\bra{0}\biggl)\Biggl)\Biggl]\\
&+ \Biggl [2\sqrt{t}\biggl(1-\sqrt{t}\biggl) \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d} \otimes \biggl(\theta\ket{0}\bra{0} + \sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1}+\ket{1}\bra{0}\biggl) + \overline{\theta}\ket{1}\bra{1}\Biggl]\\
&+ \Biggl[t\rho \otimes \biggl(\theta\ket{0}\bra{0} + \sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1}+\ket{1}\bra{0}\biggl) + \overline{\theta}\ket{1}\bra{1}\Biggl]\Biggl]
\end{aligned}\\
=& \biggl(1-\sqrt{t}\biggl)^2\Biggl(\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d} \otimes \biggl(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\biggl)\Biggl) + 2\sqrt{t}\biggl(1-\sqrt{t}\biggl)\Biggl(\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d} \otimes \biggl(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\biggl)\Biggl)\\
&+ t\Biggl(\rho \otimes \biggl(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\biggl)\Biggl) + \dfrac{(1-\sqrt{t})^2}{d^2}\Biggl(\rho \otimes \sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1}+\ket{1}\bra{0}\biggl)\Biggl) \\
&+ t\Biggl(\rho \otimes \sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1}+\ket{1}\bra{0}\biggl)\Biggl)
+ 2\sqrt{t}\biggl(1-\sqrt{t}\biggl)\Biggl(\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d} \otimes \sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1}+\ket{1}\bra{0}\biggl)\Biggl)
\end{aligned}\\
=& \Biggl((1-\sqrt{t})^2+2\sqrt{t}(1-\sqrt{t})\Biggl) \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d} \otimes \Biggl(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\Biggl)  +  (t)\rho \otimes  \Biggl(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\Biggl)\\
&+ \Biggl(\biggl(\dfrac{1-\sqrt{t}}{d}\biggl)^2+ t\Biggl)\Biggl(\rho \otimes \sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1}+\ket{1}\bra{0}\biggl) \Biggl) + 2\sqrt{t}\biggl(1-\sqrt{t}\biggl)\Biggl(\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d} \otimes  \sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1}+\ket{1}\bra{0}\biggl)\Biggl)
\end{aligned}\\
=& \Biggl((1
% -\cancel{2\sqrt{t}}
% +\cancel{2\sqrt{t}}
-2t\Biggl)\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\otimes\Biggl(\theta\ket{0}\bra{0}+\overline{\theta}\ket{1}\bra{1}\Biggl)+t\rho\otimes \Biggl(\theta\ket{0}\bra{0}+\overline{\theta}\ket{1}\bra{1}\Biggl)\\
&+\Biggl(\biggl(\dfrac{1-\sqrt{t}}{d}\biggl)^2+t\Biggl)\Biggl(\rho\otimes\sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1}+\ket{1}\bra{0}\biggl)\Biggl)+2\sqrt{t}\biggl(1-\sqrt{t}\biggl)\Biggl(\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\otimes \sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1}+\ket{1}\bra{0}\biggl)\Biggl)
\end{aligned}\\
\end{eqnarray*}

\begin{equation}\label{eqn:switch_k=1_iter_rearranged}
\begin{aligned}
&\mathcal{S} (\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho_{(1)} \otimes \rho_{c_1})\\
=& \Biggl(\bigl(1-t\bigl)\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}+t\rho\Biggl)\otimes\Biggl(\theta\ket{0}\bra{0}+\overline{\theta}\ket{1}\bra{1}\Biggl)\\
% \right.\\+& \left.
&+\left\{\Biggl(\biggl(\dfrac{(1-\sqrt{t})}{d}\biggl)^2+t\Biggl)\rho + 2\sqrt{t}\bigl(1-\sqrt{t}\bigl)\Biggl(\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\Biggl)\right\}\otimes\sqrt{\theta\overline{\theta}}\biggl(\ket{0}\bra{1}+\ket{1}\bra{0} \biggl)
\end{aligned}
\end{equation}

\begin{gather*}
\text{Let, } f_{\rho} = t, \qquad
f_{\mathbb{I}} = (1-t), \qquad
r_{\rho} = \left(\dfrac{1-\sqrt{t}}{d}\right)^2 + t, \qquad
r_{\mathbb{I}} = 2\sqrt{t}(1-\sqrt{t})
\end{gather*}

\begin{eqnarray}
=&& \begin{bmatrix}
\theta\Biggl(\biggl(1-t\biggl)\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}+t\rho\Biggl)
& \hspace{0.5cm}\sqrt{\theta\overline{\theta}}\Biggl\{\Biggl(\left(\dfrac{1-\sqrt{t}}{d}\right)^2 + t\Biggl)\rho + 2\sqrt{t}\biggl(1-\sqrt{t}\biggl)\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\Biggl\}\\
\sqrt{\theta\overline{\theta}}\Biggl\{\Biggl(\left(\dfrac{1-\sqrt{t}}{d}\right)^2 + t\Biggl)\rho + 2\sqrt{t}\biggl(1-\sqrt{t}\biggl)\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\Biggl\}
& \hspace{0.5cm}\overline{\theta}\Biggl(\biggl(1-t\biggl)\mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}+t\rho\Biggl)
\end{bmatrix}\nonumber\\
=&& \begin{bmatrix}
\theta\Biggl(f_{\rho}\rho + f_{\mathbb{I}_d} \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\Biggl)
& \sqrt{\theta\overline{\theta}}\Biggl(r_{\rho} \rho + r_{\mathbb{I}_d} \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\Biggl)\\
\sqrt{\theta\overline{\theta}}\Biggl(r_{\rho} \rho + r_{\mathbb{I}_d} \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\Biggl)
& \overline{\theta}\Biggl(f_{\rho}\rho + f_{\mathbb{I}_d} \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}\Biggl)
\end{bmatrix}\nonumber\\
\end{eqnarray}

\begin{gather*} \label{F/R_notation_k=1_result}
\text{Let, }
\mathcal{F}(\rho) = f_{\rho}\rho + f_{\mathbb{I}_d} \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d},\\
\mathcal{R}(\rho) = r_{\rho}\rho + r_{\mathbb{I}_d} \mathrm{Tr}(\rho)\dfrac{\mathbb{I}_d}{d}
\end{gather*}

\begin{equation} \label{eqn:switch_k=1_iter_blockmatrix}
\begin{aligned}
&\mathcal{S} (\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho_{(1)} \otimes \rho_{c_1})\\
&= \begin{bmatrix}
\theta \mathcal{F}(\rho_{(1)})
& \sqrt{\theta\overline{\theta}} \mathcal{R}(\rho_{(1)})\\
\sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(1)})
& \overline{\theta} \mathcal{F}(\rho_{(1)})
\end{bmatrix}
\end{aligned}
\end{equation}

Thus we have 3 ways <ref>, <ref>, <ref> to write the output for $\mathcal{S} (\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho_{(1)} \otimes \rho_{c_1})$

§.§ Measurement of the system

\begin{equation*}
\rho_{\xi}(1)=\frac{\bra{\pm}\mathcal{S}(\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho(1)\otimes\rho_{c})\ket{\pm}}{\mathrm{Tr}\left[\bra{\pm}\mathcal{S}(\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho(1)\otimes\rho_{c})\ket{\pm}\right]}
\end{equation*}

Calculating the numerator, N:

\begin{eqnarray*}
&&=\bra{\pm}\Biggl[\left\{t\rho(1) + (1-t)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\right\} \otimes\left(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\right)\nonumber\\
&&\quad+\left\{\left(\left(\frac{1-\sqrt{t}}{d}\right)^2+t\right)\rho(1) + 2\sqrt{t}(1-\sqrt{t})\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\right\} \otimes\sqrt{\theta\overline{\theta}}\left(\ket{0}\bra{1}+\ket{1}\bra{0} \right)\Biggr]\ket{\pm}\\
% &&=\left(t\rho+(1-t)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\right) \otimes \ket{\pm}\bra{\pm}\left(\theta|0\rangle\langle 0|+\overline{\theta}|1\rangle\langle1|\right)\ket{\pm}\bra{\pm}^\dagger\\
% &&\quad+\left\{\left(\left(\frac{1-\sqrt{t}}{d}\right)^2+t\right)\rho(1) + 2\sqrt{t}(1-\sqrt{t})\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\right\}\otimes\ket{\pm}\bra{\pm}\left(\sqrt{\theta\overline{\theta}}|0\rangle\langle1| + \sqrt{\theta\overline{\theta}}|1\rangle\langle0|\right)\ket{\pm}\\
&&=\frac{1}{2}\left(t\rho(1) + (1-t)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\right) + \frac{1}{2} \left(\pm2\sqrt{\theta\overline{\theta}}\left\{\left(\left(\frac{1-\sqrt{t}}{d}\right)^2+t\right)\rho(1) + 2\sqrt{t}(1-\sqrt{t})\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\right\}\right)\\
&&=\frac{1}{2}\left\{t\rho(1) + (1-t)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d} \pm2\sqrt{\theta\overline{\theta}}\left(\left(\frac{1-\sqrt{t}}{d}\right)^2+t\right)\rho(1) \pm2\sqrt{\theta\overline{\theta}} \left(2\sqrt{t}(1-\sqrt{t})\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\right)\right\}\\
&&=\frac{1}{2}\left\{\left(t \pm2\sqrt{\theta\overline{\theta}}\left(\left(\frac{1-\sqrt{t}}{d}\right)^2+t\right)\right)\rho(1) +  \left((1-t) \pm2\sqrt{\theta\overline{\theta}} 2\sqrt{t}(1-\sqrt{t})\right)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\right\}\\
\end{eqnarray*}

Calculating the denominator:

\begin{eqnarray*}
\mathrm{Tr}\left[\bra{\pm}\mathcal{S}(\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho(1)\otimes\rho_{c})\ket{\pm}\right] = \mathrm{Tr}\left[\frac{1}{2}\left(\left(\pm2\sqrt{\theta\overline{\theta}}(\frac{(1-\sqrt{t})^{2}}{d^{2}} + t) + t\right)\rho(1)+ \left((1-t)\pm2\sqrt{\theta\overline{\theta}}(2\sqrt{t}(1-\sqrt{t}))\right)\frac{\mathbb{I}_d}{d}\right)\right]\\
% = \frac{1}{2}\m\left(\left(\pm2\sqrt{\theta\overline{\theta}}(\frac{(1-t)^{2}}{d^{2}} + t^2) + t^2\right)\rho+ \left((1-t^2)\pm2\sqrt{\theta\overline{\theta}}(2t(1-t))\right)\frac{I}{d}\right)\\
= \frac{1}{2}\left\{\mathrm{Tr}\left[\left(\pm2\sqrt{\theta\overline{\theta}}(\frac{(1-\sqrt{t})^{2}}{d^{2}} + t) + t\right)\rho(1)\right]+ \mathrm{Tr}\left[\left((1-t)\pm2\sqrt{\theta\overline{\theta}}(2\sqrt{t}(1-\sqrt{t}))\right)\frac{\mathbb{I}_d}{d}\right]\right\}\\
= \frac{1}{2}\left\{\left(\pm 2\sqrt{\theta\overline{\theta}}(\frac{(1-\sqrt{t})^{2}}{d^{2}} + t) + t\right)+ \left((1-t)\pm 2\sqrt{\theta\overline{\theta}}(2\sqrt{t}(1-\sqrt{t}))\right)\right\}\qquad\because\mathrm{Tr}(\rho(1)) = \mathrm{Tr}(\frac{\mathbb{I}_d}{d}) = 1\\
\end{eqnarray*}

Thus, the density matrix after measurement in Fourier basis is:

\begin{eqnarray*}
\frac{
% \cancel{\frac{1}{2}}
\frac{1}{2}\left\{\left(t \pm2\sqrt{\theta\overline{\theta}}\left(\left(\frac{1-\sqrt{t}}{d}\right)^2+t\right)\right)\rho(1) +  \left((1-t) \pm2\sqrt{\theta\overline{\theta}} 2\sqrt{t}(1-\sqrt{t})\right)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}\right\}}{
% \cancel{\frac{1}{2}}
\frac{1}{2}\left\{\left(\pm2\sqrt{\theta\overline{\theta}}\frac{(1-\sqrt{t})^{2}}{d^{2}} + t) + t\right)+ \left((1-t)\pm 2\sqrt{\theta\overline{\theta}}(2\sqrt{t}(1-\sqrt{t}))\right)\right\}}
\end{eqnarray*}

For $\theta = 0$ or $(1-\theta) = \overline{\theta} = 0$

\begin{eqnarray*}
=& \frac{1}{2}\left(t^2\rho(1)+(1-t^2)\frac{\mathbb{I}_d}{d})\right)
\end{eqnarray*}

For maximum superposition in the switch, $\theta = (1-\theta) = \overline{\theta} = \frac{1}{2}$. Taking the $|+\rangle$ component of the measurement.  Post Selection and Correcting based on the + or - part of the measurement

\begin{eqnarray*}
\frac{\left(2t + \left(\frac{1-\sqrt{t}}{d}\right)^2\right)\rho(1) +  \left((1-t) + 2\sqrt{t}(1-\sqrt{t})\right)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}}{\left(\frac{(1-\sqrt{t})^{2}}{d^{2}} + 2t\right)+ \left((1-t)+(2\sqrt{t}(1-\sqrt{t}))\right)}
=& \frac{\left(2t + \left(\frac{1-\sqrt{t}}{d}\right)^2\right)\rho(1) +  \left((1-t) + 2\sqrt{t}(1-\sqrt{t})\right)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}}{\frac{(1-\sqrt{t})^{2}}{d^{2}}+ \left(1-t+2\sqrt{t}\right)}\\
=& \frac{\left(2t + \left(\frac{1-\sqrt{t}}{d}\right)^2\right)\rho(1) +  \left((1-t) + 2\sqrt{t}(1-\sqrt{t})\right)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}}{\frac{1 -2\sqrt{t} + t + (1-t+2\sqrt{t})d^2}{d^{2}}}\\
=& \frac{\left(2t + \left(\frac{1-\sqrt{t}}{d}\right)^2\right)\rho(1) +  \left((1-t) + 2\sqrt{t}(1-\sqrt{t})\right)\mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}}{\frac{1 + (-2\sqrt{t} + t) + (t - 2\sqrt{t})(-d^2) + d^2}{d^{2}}}\\
f_\xi(t)\rho(1) + (1-f_\xi(t)) \mathrm{Tr}(\rho(1))\frac{\mathbb{I}_d}{d}
% =& \frac{\left(\frac{(1-t)^{2}}{d^{2}} + 2t^2\right)}{\left(\frac{t^2(1-d^2) -2t(1-d^2) + 1}{d^{2}}+1\right)}\rho+\frac{\left((1-t^2)+2t(1-t)\right)}{\left(\frac{t^2(1-d^2) -2t(1-d^2) + 1}{d^{2}}+1\right)}\frac{I}{d}\\
% =& \frac{\left(\frac{(1-t)^{2}}{d^{2}} + 2t^2\right)}{\left(\frac{t^2(1-d^2) -2t(1-d^2) + 1}{d^{2}}+1\right)}\rho+ \left(1-\frac{\left(\frac{(1-t)^{2}}{d^{2}} + 2t^2\right)}{\left(\frac{t^2(1-d^2) -2t(1-d^2) + 1}{d^{2}}+1\right)}\right)\frac{I}{d}\\
% \longrightarrow& \boxed{\frac{\left(\frac{1-\sqrt{t}}{d}\right)^{2} + 2t}{\left(\frac{t(1-d^2) -2\sqrt{t}(1-d^2) + 1}{d^{2}}+1\right)}\rho+ \left(1-\frac{\left(\left(\frac{1-\sqrt{t}}{d}\right)^{2} + 2t\right)}{\left(\frac{t(1-d^2) -2\sqrt{t}(1-d^2) + 1}{d^{2}}+1\right)}\right)\frac{\mathbb{I}_d}{d}}\\
\end{eqnarray*}

\begin{equation}
f_\xi(t)= \frac{\left(\frac{1-\sqrt{t}}{d}\right)^2 + 2t}{\left(\frac{1+(t-2\sqrt{t})(1-d^2)}{d^2}+1\right)}
\end{equation}

§.§ Calculations for next iterations (k > 1) in Grover’s Search Algorithm

After the first iteration, the switched depolarizing channel's output in block form, $\rho_{\omega1}(1) = \mathcal{S}(\mathcal{D}_{\sqrt{t}}, \mathcal{D}_{\sqrt{t}})(\rho(1)\otimes\rho_c)$
is $\left(\begin{array}{ll} \theta\mathcal{F} & \sqrt{\theta\overline{\theta}} \mathcal{R} \\ \sqrt{\theta\overline{\theta}} \mathcal{R} & \overline{\theta}\mathcal{F} \end{array}\right)$. Now, this is input for the next iteration, K = 2

\begin{eqnarray*}
\Bigl(\mathcal{G}\otimes\mathbb{I}_d\Bigl)\rho_{\omega1}(1)\Bigl(\mathcal{G}\otimes\mathbb{I}_d\Bigl)^{\dagger}
=&\left(\mathcal{G}\otimes\begin{bmatrix}1 & 0\\0 & 1\end{bmatrix}\right)\rho_{\omega1}(1)\left(\mathcal{G}^{\dagger}\otimes\begin{bmatrix}1 & 0\\0 & 1\end{bmatrix}\right)
\\% \mqty[\imat{2}] used for identity matrix
=&\begin{bmatrix}\mathcal{G} & 0\\0 & \mathcal{G}\end{bmatrix} \rho_{(1)}^{\prime}  \begin{bmatrix}\mathcal{G}^{\dagger} &0\\0& \mathcal{G}^{\dagger}\end{bmatrix}\\
=&\begin{bmatrix}\mathcal{G} & 0 \\0 & \mathcal{G}\end{bmatrix}
\begin{bmatrix}\theta \mathcal{F}(\rho(1))& \sqrt{\theta\overline{\theta}} \mathcal{R}(\rho(1))\\        \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho(1)) & \overline{\theta} \mathcal{F} (\rho(1))\end{bmatrix}  \begin{bmatrix}\mathcal{G}^{\dagger} & 0\\0& \mathcal{G}^{\dagger}\end{bmatrix}\\
=&\begin{bmatrix}\theta \mathcal{G} \mathcal{F} (\rho(1))\mathcal{G}^{\dagger}                         & \sqrt{\theta\overline{\theta}} \mathcal{G} \mathcal{R} (\rho(1))\mathcal{G}^{\dagger} \\ \sqrt{\theta\overline{\theta}} \mathcal{G} \mathcal{R} (\rho(1))\mathcal{G}^{\dagger} & \overline{\theta}\mathcal{G} \mathcal{F} (\rho(1))\mathcal{G}^{\dagger}\end{bmatrix}
\end{eqnarray*}

\begin{eqnarray*}
\mathcal{G} \mathcal{F}(\rho(1))\mathcal{G}^{\dagger}
&= \mathcal{G}\mathcal{F} \Bigl(f_{\rho}\rho(1) + f_{\mathbb{I}} \mathrm{Tr}(\rho(1))\dfrac{\mathbb{I}_d}{d}\Bigl)\mathcal{G}^{\dagger}
= f_{\rho} \mathcal{G}\rho(1)\mathcal{G}^{\dagger} + f_{\mathbb{I}} \mathcal{G}\mathrm{Tr}(\rho(1))\dfrac{\mathbb{I}_d}{d}\mathcal{G}^{\dagger}\\
&= f_{\rho}\rho(2)+f_{\mathbb{I}}\dfrac{\mathbb{I}_d}{d}
= \underline{\mathcal{F}\bigl(\rho_{(2)}\bigl)}\qquad
\Biggl\{\because \mathrm{Tr}(\rho_{(1)}) = 1 = \mathrm{Tr}(\rho_{(2)})\Biggl\}\\
\mathcal{G} \mathcal{R} (\rho(1))\mathcal{G}^{\dagger}
&= \mathcal{G}\mathcal{R}\bigl(r_{\rho}\rho(1)+r_{\mathbb{I}}\mathrm{Tr}(\rho(1))\dfrac{\mathbb{I}_d}{d}\bigl)\mathcal{G}^{\dagger}
= r_{\rho}G\rho_{(1)}\mathcal{G}^{\dagger}+r_{\mathbb{I}}\mathcal{G}\mathrm{Tr}(\rho(1))\dfrac{\mathbb{I}_d}{d}\mathcal{G}^{\dagger}\\
&= r_{\rho}\rho_{(2)}+r_{\mathbb{I}_d}
% \cancelto{1}{\mathrm{Tr}\bigl(\rho_{(1)}\bigl)}
\dfrac{\mathbb{I}_d}{d}
= \underline{R\bigl(\rho_{(2)}\bigl)}
\end{eqnarray*}

So, now we apply the noise, $\bigl(D_{\sqrt{t}} \otimes \mathbb{I}_d\bigl)$ because the switch is noiseless.

We can express the Kraus operators of switch with two identical channels$\bigl(D_{\sqrt{t}} \otimes \mathbb{I}_d\bigl)$ as:

\begin{eqnarray}
\mathcal{W}_{ij}^{(2)} = \Bigl(K_i \otimes \mathbb{I}_d\Bigl)\Bigl(K_j \otimes \mathbb{I}_d\Bigl) \otimes \ket{0}\bra{0} + \Bigl(K_i \otimes \mathbb{I}_d\Bigl)\Bigl(K_j \otimes \mathbb{I}_d\Bigl) \otimes \ket{1}\bra{1}\\
% \[\begin{aligned}
%     \because\Bigl(A \otimes B\Bigl)\Bigl(C \otimes D\Bigl)
%     &= \Bigl(a_{ij}B\Bigl)_{ij}\Bigl(C_{ij}D\Bigl)_{ij}\\
%     &=\Biggl(\mathlarger{\mathlarger{\sum\limits}}_{K}\biggl(a_{iK}B\biggl)\biggl(c_{Kj}D\biggl)\Biggl)_{ij} = \Biggl(\mathlarger{\mathlarger{\sum\limits}}_{K}\biggl(a_{iK}c_{Kj}\biggl)\biggl(BD\biggl)\Biggl)_{ij} \\
%     &= AB \otimes CD = AC \otimes BD
% \end{aligned}\]\\\[
% \mathcal{W}_{ij}^{(2)} = K_iK_j \otimes \mathbb{I}_d\otimes\ket{0}\bra{0}+K_jK_i\otimes\mathbb{I}_d\otimes\ket{1}\bra{1}\\
= \Bigl(K_iK_j\otimes\mathbb{I}_d\Bigl)\otimes\ket{0}\bra{0}+\Bigl(K_jK_i\otimes\mathbb{I}_d\Bigl)\otimes\ket{1}\bra{1}\nonumber
\end{eqnarray}

\begin{eqnarray}
\mathcal{S}(D_{\sqrt{t}} , D_{\sqrt{t}})(\rho_{(2)}^{\prime} \otimes \rho_{c_2})
=& \mathlarger{\mathlarger{\sum\limits}}_{i, j =0}^{d^2}\mathcal{W}_{ij}^{(2)}\Bigl(\rho_{(2)}^{\prime} \otimes \rho_{c}\Bigl)\mathcal{W}_{ij}^{\dagger}\\
=& \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2}\Biggl\{ \Bigl(K_iK_j \otimes \mathbb{I}_d\Bigl) \otimes \ket{0}\bra{0} + \Bigl(K_jK_i \otimes \mathbb{I}_d\Bigl) \otimes \ket{1}\bra{1} \Biggl\}\Bigl(\rho_{(2)}^{\prime} \otimes \rho_c \Bigl)\\
&\Biggl\{ \Bigl(K_iK_j \otimes \mathbb{I}_d\Bigl) \otimes \ket{0}\bra{0} + \Bigl(K_jK_i \otimes \mathbb{I}_d\Bigl) \otimes \ket{1}\bra{1} \Biggl\}^{\dagger}\\
=& \mathlarger{\mathlarger{\sum\limits}}_{i,j = 0}^{d^2}\Biggl\{\Bigl(K_iK_j \otimes \mathbb{I}_d\Bigl)\rho_{(2)}^{\prime}\Bigl(K_iK_j \otimes \mathbb{I}_d\Bigl)^{\dagger} \otimes \ket{0}\bra{0}\rho_c\ket{0}\bra{0}\\
&+\Bigl(K_iK_j \otimes \mathbb{I}_d\Bigl)\rho_{(2)}^{\prime}\Bigl(K_jK_i \otimes \mathbb{I}_d\Bigl)^{\dagger} \otimes \ket{0}\bra{0}\rho_c\ket{1}\bra{1}\\
&+\Bigl(K_j K_i \otimes \mathbb{I}_d\Bigl)\rho_{(2)}^{\prime}\Bigl(K_i K_j \otimes \mathbb{I}_d\Bigl)^{\dagger} \otimes \ket{1}\bra{1}\rho_c\ket{0}\bra{0}\\
&+\Bigl(K_j K_i \otimes \mathbb{I}_d\Bigl)\rho_{(2)}^{\prime}\Bigl(K_j K_i \otimes \mathbb{I}_d\Bigl)^{\dagger} \otimes \ket{1}\bra{1}\rho_c\ket{1}\bra{1}\Biggl\}\\
\end{eqnarray}

\begin{eqnarray*}
&= \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2} \mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\{}}}}
\begin{bmatrix}
K_iK_j & 0      \\
0      & K_iK_j
\end{bmatrix}\begin{bmatrix}
\theta F(\rho_{({(2)})})                        & \sqrt{\theta\overline{\theta}} F(\rho_{({(2)})}) \\
\sqrt{\theta\overline{\theta}}R(\rho_{({(2)})}) & \overline{\theta} F (\rho_{({(2)})})\end{bmatrix}  \begin{bmatrix}
\end{bmatrix} \otimes \theta\ket{0}\bra{0}  +\\ \phantom{= \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2} \mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\{}}}} }
K_iK_j & 0      \\
0      & K_iK_j
\end{bmatrix}\begin{bmatrix}
\theta F(\rho_{({(2)})})                        & \sqrt{\theta\overline{\theta}} R(\rho_{({(2)})}) \\
\sqrt{\theta\overline{\theta}}R(\rho_{({(2)})}) & \overline{\theta} F (\rho_{({(2)})})\end{bmatrix}  \begin{bmatrix}
\end{bmatrix} \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1}  +\\
\\\phantom{= \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2} \mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\{}}}} }
K_jK_i & 0 \\
0  & K_jK_i
\end{bmatrix}\begin{bmatrix}
\theta F(\rho_{({(2)})})                        & \sqrt{\theta\overline{\theta}} R(\rho_{({(2)})}) \\\\
\sqrt{\theta\overline{\theta}}R(\rho_{({(2)})}) & \overline{\theta} F (\rho_{({(2)})})\end{bmatrix}  \begin{bmatrix}
\end{bmatrix} \otimes \sqrt{\theta\overline{\theta}}\ket{1}\bra{0}  +\\\phantom{= \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2} \mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\{}}}} }
K_jK_i & 0      \\
0      & K_jK_i
\end{bmatrix}\begin{bmatrix}
\theta F(\rho_{({(2)})})                        & \sqrt{\theta\overline{\theta}} R(\rho_{({(2)})}) \\\\
\sqrt{\theta\overline{\theta}}R(\rho_{({(2)})}) & \overline{\theta} F (\rho_{({(2)})})\end{bmatrix}  \begin{bmatrix}
K_i^{\dagger}K_j^{\dagger} & 0                          \\
0                          & K_i^{\dagger}K_j^{\dagger}
\end{bmatrix} \otimes \overline{\theta}\ket{1}\bra{1}  \mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\}}}}}\\
&= \mathlarger{\mathlarger{\sum\limits}}_{i, j = 0}^{d^2} \mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\{}}}}\begin{bmatrix}
\theta K_iK_j F(\rho_{({(2)})})K_j^{\dagger}K_i^{\dagger}                        & \sqrt{\theta\overline{\theta}} K_iK_j R(\rho_{({(2)})})K_j^{\dagger}K_i^{\dagger} \\\\
\sqrt{\theta\overline{\theta}}K_iK_jR(\rho_{({(2)})}) K_j^{\dagger}K_i^{\dagger} & \overline{\theta} K_iK_jF (\rho_{({(2)})})K_j^{\dagger}K_i^{\dagger}
\end{bmatrix}  \otimes \theta\ket{0}\bra{0}  +\\
\theta K_iK_j F(\rho_{({(2)})})K_i^{\dagger}K_j^{\dagger}                        & \sqrt{\theta\overline{\theta}} K_iK_j R(\rho_{({(2)})})K_i^{\dagger}K_j^{\dagger} \\\\
\sqrt{\theta\overline{\theta}}K_iK_jR(\rho_{({(2)})}) K_i^{\dagger}K_j^{\dagger} & \overline{\theta} K_iK_jF (\rho_{({(2)})})K_i^{\dagger}K_j^{\dagger}
\end{bmatrix}  \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1} +\\
\theta K_jK_i F(\rho_{({(2)})})K_j^{\dagger}K_i^{\dagger}                        & \sqrt{\theta\overline{\theta}} K_jK_i R(\rho_{({(2)})})K_j^{\dagger}K_i^{\dagger} \\\\
\sqrt{\theta\overline{\theta}}K_jK_iR(\rho_{({(2)})}) K_j^{\dagger}K_i^{\dagger} & \overline{\theta} K_jK_iF (\rho_{({(2)})})K_j^{\dagger}K_i^{\dagger}
\end{bmatrix}  \otimes \sqrt{\theta\overline{\theta}}\ket{1}\bra{0} +\\
\theta K_jK_i F(\rho_{({(2)})})K_i^{\dagger}K_j^{\dagger}                        & \sqrt{\theta\overline{\theta}} K_jK_i R(\rho_{({(2)})})K_i^{\dagger}K_j^{\dagger} \\\\
\sqrt{\theta\overline{\theta}}K_jK_iR(\rho_{({(2)})}) K_i^{\dagger}K_j^{\dagger} & \overline{\theta} K_jK_iF (\rho_{({(2)})})K_i^{\dagger}K_j^{\dagger}
\end{bmatrix}  \otimes \overline{\theta}\ket{1}\bra{1}\mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\}}}}}\\
\end{eqnarray*}

Now, we divide this summation into four parts as before: 1.  $j = 0, i = 0$, 2. $i\neq 0, j = 0$, 3. $i = 0, j \ne 0$, 4. $i\ne = 0, j \ne 0$

\begin{eqnarray*}
\begin{aligned}
M_{00} = \{\begin{bmatrix}
\theta\sum\limits_{i, j = 1}^{d^2} K_iK_j F(\rho_{({(2)})})K_j^{\dagger}K_i^{\dagger}                        & \sqrt{\theta\overline{\theta}}\sum\limits_{i, j = 1}^{d^2} K_iK_j R(\rho_{({(2)})})K_j^{\dagger}K_i^{\dagger} \\
\sqrt{\theta\overline{\theta}}\sum\limits_{i, j = 1}^{d^2}K_iK_jR(\rho_{({(2)})}) K_j^{\dagger}K_i^{\dagger} & \overline{\theta}\sum\limits_{i, j = 1}^{d^2} K_iK_jF (\rho_{({(2)})})K_j^{\dagger}K_i^{\dagger}
\end{bmatrix}  \otimes \theta\ket{0}\bra{0}  +\\
\begin{bmatrix}
\theta \sum\limits_{j = 1}^{d^2}K_oK_j F(\rho_{({(2)})})K_j^{\dagger}K_o^{\dagger}                        & \sqrt{\theta\overline{\theta}}\sum\limits_{j = 1}^{d^2} K_oK_j R(\rho_{({(2)})})K_j^{\dagger}K_o^{\dagger} \\\\
\sqrt{\theta\overline{\theta}}\sum\limits_{j = 1}^{d^2}K_oK_jR(\rho_{({(2)})}) K_j^{\dagger}K_o^{\dagger} & \overline{\theta}\sum\limits_{j = 1}^{d^2} K_oK_jF (\rho_{({(2)})})K_j^{\dagger}K_o^{\dagger}
\end{bmatrix}  \otimes \theta\ket{0}\bra{0} +\\
\begin{bmatrix}
\theta \sum\limits_{i = 1}^{d^2}K_iK_o F(\rho_{({(2)})})K_o^{\dagger}K_i^{\dagger}                        & \sqrt{\theta\overline{\theta}}\sum\limits_{i = 1}^{d^2} K_iK_o R(\rho_{({(2)})})K_o^{\dagger}K_i^{\dagger} \\\\
\sqrt{\theta\overline{\theta}}\sum\limits_{i = 1}^{d^2}K_iK_oR(\rho_{({(2)})}) K_o^{\dagger}K_i^{\dagger} & \overline{\theta}\sum\limits_{i = 1}^{d^2} K_iK_oF (\rho_{({(2)})})K_o^{\dagger}K_i^{\dagger}
\end{bmatrix}  \otimes \theta\ket{0}\bra{0} +\\
\begin{bmatrix}
\theta K_oK_o F(\rho_{({(2)})})K_o^{\dagger}K_o^{\dagger}                        & \sqrt{\theta\overline{\theta}} K_oK_o R(\rho_{({(2)})})K_o^{\dagger}K_o^{\dagger} \\\\
\sqrt{\theta\overline{\theta}}K_oK_oR(\rho_{({(2)})}) K_o^{\dagger}K_o^{\dagger} & \overline{\theta} K_oK_oF (\rho_{({(2)})})K_o^{\dagger}K_o^{\dagger}
\end{bmatrix}  \otimes \theta\ket{0}\bra{0}\}
\end{aligned}\\
\begin{aligned}
= \{
\Bigl(1-\sqrt{t}\Bigl)^2\begin{bmatrix}
\theta\mathrm{Tr} (F(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d}                          & \sqrt{\theta\overline{\theta}}\mathrm{Tr} (R(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d} \\\\
\sqrt{\theta\overline{\theta}}\mathrm{Tr} (R(\rho_{({(2)})})) \dfrac{\mathbb{I}_d}{d} & \overline{\theta}\mathrm{Tr} (F(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d}
\end{bmatrix}  \otimes \theta\ket{0}\bra{0}  +\\
\sqrt{t}\Bigl(1-\sqrt{t}\Bigl)\begin{bmatrix}
\theta \mathrm{Tr} (F(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d}                         & \sqrt{\theta\overline{\theta}}\mathrm{Tr} (R(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d} \\\\
\sqrt{\theta\overline{\theta}}\mathrm{Tr} (R(\rho_{({(2)})})) \dfrac{\mathbb{I}_d}{d} & \overline{\theta}\mathrm{Tr} (F(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d}
\end{bmatrix}  \otimes \theta\ket{0}\bra{0} +\\
\sqrt{t}\Bigl(1-\sqrt{t}\Bigl)\begin{bmatrix}
\theta \mathrm{Tr} (F(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d}                         & \sqrt{\theta\overline{\theta}}\mathrm{Tr} (R(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d} \\\\
\sqrt{\theta\overline{\theta}}\mathrm{Tr} (R(\rho_{({(2)})})) \dfrac{\mathbb{I}_d}{d} & \overline{\theta}\mathrm{Tr} (F(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d}
\end{bmatrix}  \otimes \theta\ket{0}\bra{0} +\\
\theta F (\rho_{(2)})\dfrac{\mathbb{I}_d}{d}                         & \sqrt{\theta\overline{\theta}}R (\rho_{(2)}) \dfrac{\mathbb{I}_d}{d} \\\\
\sqrt{\theta\overline{\theta}}R (\rho_{(2)}) \dfrac{\mathbb{I}_d}{d} & \overline{\theta} F (\rho_{(2)})\dfrac{\mathbb{I}_d}{d}
\end{bmatrix}   \otimes \theta\ket{0}\bra{0}\}\end{aligned}\\
\end{eqnarray*}

\begin{eqnarray*}
\begin{aligned}
M_{01} = \{\begin{bmatrix}
\theta\sum\limits_{i, j = 1}^{d^2} K_iK_j F(\rho_{({(2)})})K_i^{\dagger}K_j^{\dagger}                        & \sqrt{\theta\overline{\theta}}\sum\limits_{i, j = 1}^{d^2} K_iK_j R(\rho_{({(2)})})K_i^{\dagger}K_j^{\dagger} \\\\
\sqrt{\theta\overline{\theta}}\sum\limits_{i, j = 1}^{d^2}K_iK_jR(\rho_{({(2)})}) K_i^{\dagger}K_j^{\dagger} & \overline{\theta}\sum\limits_{i, j = 1}^{d^2} K_iK_jF (\rho_{({(2)})})K_i^{\dagger}K_j^{\dagger}
\end{bmatrix}  \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1}  +\\\begin{bmatrix}
\theta \sum\limits_{j = 1}^{d^2}K_oK_j F(\rho_{({(2)})})K_o^{\dagger}K_j^{\dagger}                        & \sqrt{\theta\overline{\theta}}\sum\limits_{j = 1}^{d^2} K_oK_j R(\rho_{({(2)})})K_o^{\dagger}K_j^{\dagger} \\\\
\sqrt{\theta\overline{\theta}}\sum\limits_{j = 1}^{d^2}K_oK_jR(\rho_{({(2)})}) K_o^{\dagger}K_j^{\dagger} & \overline{\theta}\sum\limits_{j = 1}^{d^2} K_oK_jF (\rho_{({(2)})})K_o^{\dagger}K_j^{\dagger}
\end{bmatrix}  \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1} +\\\begin{bmatrix}
\theta \sum\limits_{i = 1}^{d^2}K_iK_o F(\rho_{({(2)})})K_i^{\dagger}K_o^{\dagger}                        & \sqrt{\theta\overline{\theta}}\sum\limits_{i = 1}^{d^2} K_iK_o R(\rho_{({(2)})})K_i^{\dagger}K_o^{\dagger} \\\\
\sqrt{\theta\overline{\theta}}\sum\limits_{i = 1}^{d^2}K_iK_oR(\rho_{({(2)})}) K_i^{\dagger}K_o^{\dagger} & \overline{\theta}\sum\limits_{i = 1}^{d^2} K_iK_oF (\rho_{({(2)})})K_i^{\dagger}K_o^{\dagger}
\end{bmatrix}  \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1} +\\\begin{bmatrix}
\theta K_oK_o F(\rho_{({(2)})})K_o^{\dagger}K_o^{\dagger}                        & \sqrt{\theta\overline{\theta}} K_oK_o R(\rho_{({(2)})})K_o^{\dagger}K_o^{\dagger} \\
\sqrt{\theta\overline{\theta}}K_oK_oR(\rho_{({(2)})}) K_o^{\dagger}K_o^{\dagger} & \overline{\theta} K_oK_oF (\rho_{({(2)})})K_o^{\dagger}K_o^{\dagger}
\end{bmatrix}  \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1}\}
\end{aligned}\\
\begin{aligned}
= \mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\{}}}}\Bigl(1-\sqrt{t}\Bigl)^2\begin{bmatrix}
\theta\dfrac{F(\rho_{(2)})}{d^2}                                               & \sqrt{\theta\overline{\theta}}\dfrac{R(\rho_{(2)})}{d^2} \\\\
\sqrt{\theta\overline{\theta}}\dfrac{R(\rho_{(2)})}{d^2} \dfrac{\mathbb{I}_d}{d} & \overline{\theta}\dfrac{F(\rho_{(2)})}{d^2}
\end{bmatrix}  \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1}  +\\\\\\
\phantom{=  \mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\{}}}}}\sqrt{t}\Bigl(1-\sqrt{t}\Bigl)\begin{bmatrix}
\theta \mathrm{Tr} (F(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d}                         & \sqrt{\theta\overline{\theta}}\mathrm{Tr} (R(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d} \\\\
\sqrt{\theta\overline{\theta}}\mathrm{Tr} (R(\rho_{({(2)})})) \dfrac{\mathbb{I}_d}{d} & \overline{\theta}\mathrm{Tr} (F(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d}
\end{bmatrix}  \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1} +\\\\\\
\phantom{=  \mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\{}}}}}\sqrt{t}\Bigl(1-\sqrt{t}\Bigl)\begin{bmatrix}
\theta \mathrm{Tr} (F(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d}                         & \sqrt{\theta\overline{\theta}}\mathrm{Tr} (R(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d} \\\\
\sqrt{\theta\overline{\theta}}\mathrm{Tr} (R(\rho_{({(2)})})) \dfrac{\mathbb{I}_d}{d} & \overline{\theta}\mathrm{Tr} (F(\rho_{({(2)})}))\dfrac{\mathbb{I}_d}{d}
\end{bmatrix}  \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1} +\\\\\\
\phantom{=  \mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\{}}}}}t\begin{bmatrix}
\theta F (\rho_{(2)})                        & \sqrt{\theta\overline{\theta}}R (\rho_{(2)}) \\\\
\sqrt{\theta\overline{\theta}}R (\rho_{(2)}) & \overline{\theta} F (\rho_{(2)})
\end{bmatrix}   \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1}\mathlarger{\mathlarger{\mathlarger{\mathlarger{\Biggl\}}}}}
\end{aligned}
\end{eqnarray*}

(10) and (11) terms will be similar to (01) and (00) terms, respectively, except the coefficients of the switch and hence,

\begin{eqnarray*}
=(1-\sqrt{t})^2 \left\{ \begin{bmatrix}
\theta \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\\
\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} &
\overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}
\end{bmatrix} \otimes \theta\ket{0}\bra{0}\right.\\
+  \left.\begin{bmatrix}
\theta \frac{\mathcal{F}(\rho_{(2)})}{d^2} & \sqrt{\theta\overline{\theta}} \frac{\mathcal{R}(\rho_{(2)})}{d^2}\\
\sqrt{\theta\overline{\theta}} \frac{\mathcal{R}(\rho_{(2)})}{d^2} &
\overline{\theta} \frac{\mathcal{F}(\rho_{(2)})}{d^2}
\end{bmatrix} \otimes \sqrt{\theta\overline{\theta}}\ket{0}\bra{1}\right.\\
+ \left.\begin{bmatrix}
\theta \frac{\mathcal{F}(\rho_{(2)})}{d^2} & \sqrt{\theta\overline{\theta}} \frac{\mathcal{R}(\rho_{(2)})}{d^2}\\
\sqrt{\theta\overline{\theta}} \frac{\mathcal{R}(\rho_{(2)})}{d^2} &
\overline{\theta} \frac{\mathcal{F}(\rho_{(2)})}{d^2}
\end{bmatrix} \otimes \sqrt{\theta\overline{\theta}}\right.\\
+ \left.\begin{bmatrix}
\theta \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\\
\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} &
\overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}
\end{bmatrix} \otimes \overline{\theta}\ket{1}\bra{1}\right\}
\end{aligned}\\
&\quad+ 2\sqrt{t}(1-\sqrt{t}) \begin{bmatrix}
\theta \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\\
\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} &
\overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}
\end{bmatrix} \otimes \left(\theta\ket{0}\bra{0} + \sqrt{\theta\overline{\theta}}\ket{0}\bra{1} + \sqrt{\theta\overline{\theta}}\ket{1}\bra{0} + \overline{\theta}\ket{1}\bra{1}\right) \\
&\quad+ t \begin{bmatrix}
\theta \mathcal{F}(\rho_{(2)}) & \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)})\\
\sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)}) &
\overline{\theta}\mathcal{F}(\rho_{(2)})
\end{bmatrix} \otimes \left(\theta\ket{0}\bra{0} + \sqrt{\theta\overline{\theta}}\ket{0}\bra{1} + \sqrt{\theta\overline{\theta}}\ket{1}\bra{0} + \overline{\theta}\ket{1}\bra{1}\right)\\
=(1-\sqrt{t})^2 \left\{ \begin{bmatrix}
\theta \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\\
\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} &
\overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}
\end{bmatrix} \otimes \left(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\right)\right.\\
+  \left.\begin{bmatrix}
\theta \frac{\mathcal{F}(\rho_{(2)})}{d^2} & \sqrt{\theta\overline{\theta}} \frac{\mathcal{R}(\rho_{(2)})}{d^2}\\
\sqrt{\theta\overline{\theta}} \frac{\mathcal{R}(\rho_{(2)})}{d^2} &
\overline{\theta} \frac{\mathcal{F}(\rho_{(2)})}{d^2}
\end{bmatrix} \otimes \sqrt{\theta\overline{\theta}}\left(\ket{0}\bra{1} + \ket{1}\bra{0}\right)\right\}
\end{aligned}\\
&\quad+ 2\sqrt{t}(1-\sqrt{t}) \begin{bmatrix}
\theta \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\\
\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} &
\overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}
\end{bmatrix} \otimes \rho_{c_2} \\
&\quad+ t \begin{bmatrix}
\theta \mathcal{F}(\rho_{(2)}) & \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)})\\
\sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)}) &
\overline{\theta}\mathcal{F}(\rho_{(2)})
\end{bmatrix} \otimes \rho_{c_2}
\end{eqnarray*}

Similar to $k = 1$, collecting terms in the above result we have

\begin{eqnarray}
\left\{ t \begin{bmatrix}
\theta \mathcal{F}(\rho_{(2)}) & \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)})\\
\sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)}) &
\overline{\theta}\mathcal{F}(\rho_{(2)})
\end{bmatrix} + (1-t) \begin{bmatrix}
\theta \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\\
\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} &
\overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}
\end{bmatrix}\right\}\otimes \left(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\right)\\
+ \left\{ \left(\left(\frac{1-t}{d}\right)^2 + t\right) \begin{bmatrix}
\theta \mathcal{F}(\rho_{(2)}) & \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)})\\
\sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)}) &
\overline{\theta}\mathcal{F}(\rho_{(2)})
\end{bmatrix}\right.\\
+ \left.2 \sqrt{t} (1- \sqrt{t}) \begin{bmatrix}
\theta \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\\
\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} &
\overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}
\end{bmatrix}\right\}\otimes \sqrt{\theta\overline{\theta}}\left(\ket{0}\bra{1} + \ket{1}\bra{0}\right)
\end{eqnarray}

Now, following a similar substitution/ notation <ref> as $k=1$,

\begin{eqnarray}
\begin{aligned}
=\left\{f_{\rho} \begin{bmatrix}
\theta \mathcal{F}(\rho_{(2)}) & \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)})\\
\sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)}) &
\overline{\theta}\mathcal{F}(\rho_{(2)})
\end{bmatrix} + f_{\mathbb{I}_d} \begin{bmatrix}
\theta \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\\
\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} &
\overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}
\end{bmatrix} \right\}\otimes \left(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\right)\\
+ \left\{ r_{\rho} \begin{bmatrix}
\theta \mathcal{F}(\rho_{(2)}) & \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)})\\
\sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)}) &
\overline{\theta}\mathcal{F}(\rho_{(2)})
\end{bmatrix} + r_{\mathbb{I}_d} \begin{bmatrix}
\theta \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\\
\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d} &
\overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}
\end{bmatrix} \right\}
\otimes \sqrt{\theta\overline{\theta}}\left(\ket{0}\bra{1} + \ket{1}\bra{0}\right)
\end{aligned}
\end{eqnarray}

Comparing this equation with the result in <ref>

\begin{eqnarray}
=\left\{\underbrace{f_{\rho} \begin{bmatrix}
\theta \mathcal{F}(\rho_{(2)}) & \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)})\\
\sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)}) &
\overline{\theta}\mathcal{F}(\rho_{(2)})
\end{bmatrix}}_{f_{\rho}(\rho) + } + \underbrace{f_{\mathbb{I}_d} \frac{\mathbb{I}_d}{d}\otimes\begin{bmatrix}
\theta \mathrm{Tr}(\mathcal{F}(\rho_{(2)})) & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\\
\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)})) &
\overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))
\end{bmatrix}}_{f_{\mathbb{I}_d} \frac{I}{d} \otimes \mathrm{Tr}(\rho)} \right\}\otimes \left(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\right)\\
+ \left\{\underbrace{r_{\rho} \begin{bmatrix}
\theta \mathcal{F}(\rho_{(2)}) & \sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)})\\
\sqrt{\theta\overline{\theta}}\mathcal{R}(\rho_{(2)}) &
\overline{\theta}\mathcal{F}(\rho_{(2)})
\end{bmatrix}}_{r_{\rho}(\rho) + } + \underbrace{r_{\mathbb{I}_d} \frac{\mathbb{I}_d}{d}\otimes\begin{bmatrix}
\theta \mathrm{Tr}(\mathcal{F}(\rho_{(2)})) & \sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\\
\sqrt{\theta\overline{\theta}} \mathrm{Tr}(\mathcal{R}(\rho_{(2)})) &
\overline{\theta} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))
\end{bmatrix}}_{r_{\mathbb{I}_d} \frac{I}{d} \otimes \mathrm{Tr}(\rho)} \right\}
\otimes \sqrt{\theta\overline{\theta}}\left(\ket{0}\bra{1} + \ket{1}\bra{0}\right)
\end{aligned}\\
\begin{bmatrix}
\theta \left(f_{\rho}\mathcal{F}(\rho_{(2)}) + f_{\mathbb{I}_d} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\right) & \sqrt{\theta\overline{\theta}} \left(f_{\rho}\mathcal{R}(\rho_{(2)}) + f_{\mathbb{I}_d} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\right) \\ \sqrt{\theta\overline{\theta}} \left(f_{\rho}\mathcal{R}(\rho_{(2)}) + f_{\mathbb{I}_d} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\right) & \overline{\theta} \left(f_{\rho}\mathcal{F}(\rho_{(2)}) + f_{\mathbb{I}_d} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\right)
\end{bmatrix}
\otimes \left(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\right)\right.\\
+ \left.\begin{bmatrix}
\theta \left(r_{\rho}\mathcal{F}(\rho_{(2)}) + r_{\mathbb{I}_d} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\right) & \sqrt{\theta\overline{\theta}} \left(r_{\rho}\mathcal{R}(\rho_{(2)}) + r_{\mathbb{I}_d} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\right) \\ \sqrt{\theta\overline{\theta}} \left(r_{\rho}\mathcal{R}(\rho_{(2)}) + r_{\mathbb{I}_d} \mathrm{Tr}(\mathcal{R}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\right) & \overline{\theta} \left(r_{\rho}\mathcal{F}(\rho_{(2)}) + r_{\mathbb{I}_d} \mathrm{Tr}(\mathcal{F}(\rho_{(2)}))\frac{\mathbb{I}_d}{d}\right)
\end{bmatrix}\otimes \sqrt{\theta\overline{\theta}}\left(\ket{0}\bra{1} + \ket{1}\bra{0}\right)\right\}
\end{aligned}\\
\theta \mathcal{F}(\mathcal{F}(\rho_{(2)})) & \sqrt{\theta\overline{\theta}} \mathcal{F}(\mathcal{R}(\rho_{(2)})) \\ \sqrt{\theta\overline{\theta}} \mathcal{F}(\mathcal{R}(\rho_{(2)})) & \overline{\theta} \mathcal{F}(\mathcal{F}(\rho_{(2)}))
\end{bmatrix} \otimes \left(\theta\ket{0}\bra{0} + \overline{\theta}\ket{1}\bra{1}\right)\right.\\
+ \left.\begin{bmatrix}
\theta \mathcal{R}(\mathcal{F}(\rho_{(2)})) & \sqrt{\theta\overline{\theta}} \mathcal{R}(\mathcal{R}(\rho_{(2)})) \\ \sqrt{\theta\overline{\theta}} \mathcal{R}(\mathcal{R}(\rho_{(2)})) & \overline{\theta} \mathcal{R}(\mathcal{F}(\rho_{(2)}))
\end{bmatrix} \otimes \sqrt{\theta\overline{\theta}}\left(\ket{0}\bra{1} + \ket{1}\bra{0}\right)\right\}
\end{aligned}\\
&= \begin{bmatrix}
\theta \begin{bmatrix}
\theta \mathcal{F}(\mathcal{F}(\rho_{(2)})) & \sqrt{\theta\overline{\theta}} \mathcal{F}(\mathcal{R}(\rho_{(2)})) \\ \sqrt{\theta\overline{\theta}} \mathcal{F}(\mathcal{R}(\rho_{(2)})) & \overline{\theta} \mathcal{F}(\mathcal{F}(\rho_{(2)}))
\end{bmatrix} &
\sqrt{\theta\overline{\theta}} \begin{bmatrix}
\theta \mathcal{R}(\mathcal{F}(\rho_{(2)})) & \sqrt{\theta\overline{\theta}} \mathcal{R}(\mathcal{R}(\rho_{(2)})) \\ \sqrt{\theta\overline{\theta}} \mathcal{R}(\mathcal{R}(\rho_{(2)})) & \overline{\theta} \mathcal{R}(\mathcal{F}(\rho_{(2)}))
\end{bmatrix} \\
\sqrt{\theta\overline{\theta}} \begin{bmatrix}
\theta \mathcal{R}(\mathcal{F}(\rho_{(2)})) & \sqrt{\theta\overline{\theta}} \mathcal{R}(\mathcal{R}(\rho_{(2)})) \\ \sqrt{\theta\overline{\theta}} \mathcal{R}(\mathcal{R}(\rho_{(2)})) & \overline{\theta} \mathcal{R}(\mathcal{F}(\rho_{(2)}))
\end{bmatrix} &
\overline{\theta} \begin{bmatrix}
\theta \mathcal{F}(\mathcal{F}(\rho_{(2)})) & \sqrt{\theta\overline{\theta}} \mathcal{F}(\mathcal{R}(\rho_{(2)})) \\ \sqrt{\theta\overline{\theta}} \mathcal{F}(\mathcal{R}(\rho_{(2)})) & \overline{\theta} \mathcal{F}(\mathcal{F}(\rho_{(2)}))
\end{bmatrix}
\end{bmatrix}
\end{eqnarray}

(<ref>) is a $4d$ dimensional block matrix which is again analogous to (<ref>) and we can expand the previous notation of $\mathcal{F}$ and $\mathcal{R}$ to write the above result as:

\[
\rho^{(2)}_{(2)} = \begin{bmatrix}
\theta \mathcal{F}^{(2)}(\rho^{(1)}_{(2)} & \sqrt{\theta\overline{\theta}} \mathcal{R}^{(2)}(\rho^{(1)}_{(2)} \\ \sqrt{\theta\overline{\theta}} \mathcal{R}^{(2)}(\rho^{(1)}_{(2)} & \theta \mathcal{F}^{(2)}(\rho^{(1)}_{(2)}
\end{bmatrix}
\]

The superscript denotes the number of switches correlated to the input state, and the subscript denotes the iteration of Grover's Algorithm, the input state.

§.§ Find the state after k Grover iterations where system correlated with $k$ switches
$= \rho_k(k)$

If we denote Measurement after k iterations as $M_k$:

\begin{equation}
M_k(\rho_k(k) = (\mathbb{I}_d \otimes \bra{+}^{\otimes k}) \rho_k(k) (\mathbb{I}_d \otimes \ket{+}^{\otimes k})
\end{equation}

We have $\mathbb{I}_d$ as part of the measurement operation because we want to keep the input state intact and only trace out the quantum switches correlated with the input state.

\begin{eqnarray*}
&= \left((\mathbb{I}_d \otimes \bra{+}^{\otimes k-1}) \otimes \bra{+}\right) \rho_k(k) \left((\mathbb{I}_d \otimes \ket{+}^{\otimes k-1}) \otimes \ket{+}\right)\\
&= \left((\mathbb{I}_d \otimes \bra{+}^{\otimes k-1}) \otimes \begin{bmatrix}
\frac{1}{\sqrt{2}} & \frac{1}{\sqrt{2}}
\end{bmatrix}\right) \rho_k(k) \left((\mathbb{I}_d \otimes \ket{+}^{\otimes k-1}) \otimes
\begin{bmatrix}
\frac{1}{\sqrt{2}} \\ \frac{1}{\sqrt{2}}
\end{bmatrix}\right)\\
&= \begin{bmatrix}
\frac{\mathbb{I}_d \otimes \bra{+}^{\otimes k-1}}{\sqrt{2}} & \frac{\mathbb{I}_d \otimes \bra{+}^{\otimes k-1}}{\sqrt{2}}
\end{bmatrix} \begin{bmatrix}
\theta \mathcal{F}_k(\rho_{k-1}(k)) & \sqrt{\theta\overline{\theta}} \mathcal{R}_k(\rho_{k-1}(k)) \\ \sqrt{\theta\overline{\theta}} \mathcal{R}_k(\rho_{k-1}(k)) & \overline{\theta} \mathcal{F}_k(\rho_{k-1}(k))
\end{bmatrix} \begin{bmatrix}
\frac{\mathbb{I}_d \otimes \bra{+}^{\otimes k-1}}{\sqrt{2}} \\ \frac{\mathbb{I}_d \otimes \bra{+}^{\otimes k-1}}{\sqrt{2}}
\end{bmatrix}\\
&= (\frac{1}{\sqrt{2}})^2 \begin{bmatrix}
\mathbb{I}_d \otimes \bra{+}^{\otimes k-1} & \mathbb{I}_d \otimes \bra{+}^{\otimes k-1}
\end{bmatrix} \begin{bmatrix}
\theta \mathcal{F}_k(\rho_{k-1}(k)) & \sqrt{\theta\overline{\theta}}
\mathcal{R}_k(\rho_{k-1}(k)) \\ \sqrt{\theta\overline{\theta}} \mathcal{R}_k(\rho_{k-1}(k)) &
\overline{\theta} \mathcal{F}_k(\rho_{k-1}(k))
\end{bmatrix} \begin{bmatrix}
\mathbb{I}_d \otimes \ket{+}^{\otimes k-1} \\ \mathbb{I}_d \otimes \ket{+}^{\otimes k-1}
\end{bmatrix}\\
&= \begin{bmatrix}
(\mathbb{I}_d \otimes \bra{+}^{\otimes k-1})(\theta \mathcal{F}_k(\rho_{k-1}(k))) + (\mathbb{I}_d \otimes \bra{+}^{\otimes k-1}) (\sqrt{\theta\overline{\theta}} \mathcal{R}_k(\rho_{k-1}(k))) \\  (\mathbb{I}_d \otimes \bra{+}^{\otimes k-1}) (\sqrt{\theta\overline{\theta}} \mathcal{R}_k(\rho_{k-1}(k))) +  (\mathbb{I}_d \otimes \bra{+}^{\otimes k-1})(\overline{\theta} \mathcal{F}_k(\rho_{k-1}(k)))
\end{bmatrix}^{\mathcal{T}}\begin{bmatrix}
\mathbb{I}_d \otimes \ket{+}^{\otimes k-1} \\ \mathbb{I}_d \otimes \ket{+}^{\otimes k-1}
\end{bmatrix}\\
&= \begin{bmatrix}\begin{aligned}
(\mathbb{I}_d \otimes \bra{+}^{\otimes k-1})(\theta \mathcal{F}_k(\rho_{k-1}(k)))(\mathbb{I}_d \otimes \ket{+}^{\otimes k-1})\\
+ (\mathbb{I}_d \otimes \bra{+}^{\otimes k-1}) (\sqrt{\theta\overline{\theta}} \mathcal{R}_k(\rho_{k-1}(k))) (\mathbb{I}_d \otimes \ket{+}^{\otimes k-1})\\
+ (\mathbb{I}_d \otimes \bra{+}^{\otimes k-1}) (\sqrt{\theta\overline{\theta}} \mathcal{R}_k(\rho_{k-1}(k))) (\mathbb{I}_d \otimes \ket{+}^{\otimes k-1})\\
+ (\mathbb{I}_d \otimes \bra{+}^{\otimes k-1})(\overline{\theta} \mathcal{F}_k(\rho_{k-1}(k))) (\mathbb{I}_d \otimes \ket{+}^{\otimes k-1})
\end{aligned}
\end{bmatrix}
= \begin{bmatrix}\begin{aligned}
(\mathbb{I}_d \otimes \bra{+}^{\otimes k-1})(\mathcal{F}_k(\rho_{k-1}(k)))(\mathbb{I}_d \otimes \ket{+}^{\otimes k-1})\\
+ 2\sqrt{\theta\overline{\theta}} (\mathbb{I}_d \otimes \bra{+}^{\otimes k-1}) (\mathcal{R}_k(\rho_{k-1}(k))) (\mathbb{I}_d \otimes \ket{+}^{\otimes k-1})
\end{aligned}
\end{bmatrix}
\end{eqnarray*}

Now we can start unpacking the block matrices $F_k$ and $R_k$:

\begin{equation}