Classically Replaceable Operations

Quantum information science provides powerful technologies beyond the scope of classical physics. In practice, accurate control of quantum operations is a challenging task with current quantum devices. The implementation of high fidelity and multi-qubit quantum operations consumes massive resources and requires complicated hardware design to fight against noise. An approach to alleviating this problem is to replace quantum operations with classical processing. Despite the common practice of this approach, rigorous criteria to determine whether a given quantum operation is replaceable classically are still missing. In this work, we define the classically replaceable operations in four general scenarios. In each scenario, we provide their necessary and sufficient criteria and point out the corresponding classical processing. For a practically favorable case of unitary classically replaceable operations, we show that the replaced classical processing is deterministic. Beyond that, we regard the irreplaceability of quantum operations by classical processing as a quantum resource and relate it to the performance of a channel in a non-local game, as manifested in a robustness measure.


Introduction
Quantum technology realizes information processing tasks that cannot be achieved by classical means. For instance, quantum key distribution (QKD) brings information-theoretic security between two remote parties [1,2]. In the field of computation, quantum computers have the potential to bring an exponential speedup in solving certain problems. The recent realizations of controllable quantum systems with dozens of qubits exhibit the "quantum advantage" over their classical counterparts [3][4][5]. On the other hand, quantum information processing is costly. Due to the unavoidable noise in quantum devices, current realizations of high-fidelity multi-qubit quantum operations are extremely challenging. On the contrary, classical processing is in general easier to implement and has higher accuracy.
The tractability of classical processing motivates us to replace some quantum operations in a task with classical ones. In QKD, after the quantum stage of state preparation and measurement, the users would apply certain quantum operations to distill a secret key [6]. In general, these operations contain a mass of multi-qubit gates, like controlled-NOT and Tofolli gates, and hence are very challenging to realize. Thanks to Shor and Preskill's seminal work to reduce quantum operations to classical post-processing [7], QKD becomes the earliest practical application in quantum information science [8].
The idea of replacing is also conducive to quantum computing. Within the decoherence time of a quantum system, the number of implementable operations is bounded [9], hindering the ability of quantum computing to solve large-scale problems. If we replace some quantum operations in a quantum circuit with classical processing, we can reduce the number of quantum gates. For instance, when realizing a quantum circuit, we shall omit any operation commuting with the observable to be measured, as these operations do not change the measurement results.
These instances show that certain quantum operations under specific scenarios can be replaced by classical processing. In practice, classical replacement is flexible and can be embedded into many quantum information processing protocols. In particular, it is appealing to combine the idea with the recent quantum-classical-hybrid algorithms and data processing techniques, such as the variational quantum algorithms (VQA) [10] and shadow tomography [11], where we may further reduce the difficulty in the quantum part of the task.
Here, we are interested to see what kind of quantum operations are classically replaceable, namely, classically replaceable operations (CROs). In the study of some resource theories, such as quantum coherence of states [12][13][14] and entanglement of quantum channels [15,16], the issue has been implicitly involved. For example, maximally incoherent operations (MIO) [17][18][19] cannot generate coherence from incoherent states, which means that on the set of incoherent states they act like classical processing. This implies that MIO is classically replaceable to some extent. In the entanglement theory, entanglement breaking (EB) channels destroy the entanglement of the input states. This also shows a clue that they are classically replaceable in some scenarios.
In the literature, these operations are mainly studied under the scenario of coherence manipulation or entanglement manipulation. At the moment, a systematic study of CROs is still missing. There are neither rigorous definitions nor efficient criteria for a CRO. On the other hand, there are quantum operations that cannot be replaced classically. Then, this "irreplaceability" implies quantum features intractable to classical means, which might exhibit quantum advantages in some information processing tasks. A mathematical characterization of the irreplaceability would reveal the boundary between quantum and classical technologies.
In this work, we provide rigorous definitions of CROs in four different scenarios, depending on whether the input and output of the operation are classical or quantum. It is worth noting that, whether a quantum operation can be precisely replaced is what we are concerned with for classical replacement. In the case where the input and output are both classical, classical replacement is essentially classical simulation and any quantum operation is a CRO. We shall focus on the remaining three cases where at least either the input or the output is quantum. We characterize the three CRO sets by showing their necessary and sufficient criteria. Furthermore, we establish a resource-theoretic framework to quantify the irreplaceability of an operation. Interestingly, we can prove the existence of a non-local game to show the quantum advantage of irreplaceable operations.
The paper is organized as follows. In Section 2, we clarify the definitions of "classical processing" and "classical replaceability" in this work. In Section 3, we show the main result -providing the mathematical characterization of CROs. Furthermore, we deal with two extensions of CRO and discuss the application of CRO. In Section 4, we establish a channel resource theory for CRO and quantify the irreplaceability of a channel in a non-local game. Finally, we conclude in Section 5 with further discussions.

Classical replaceability
First, we introduce the notations. A quantum system is represented as a state in a Hilbert space H. For simplicity, we assume the dimension of H is finite. Denote d = dim H, we could find d orthonormal where H is an ancillary quantum system with an arbitrary dimension and I is the identity operation acting on D(H ). In the following, we denote CPTP as the set of all quantum operations. The multiplication or composition on CPTP, is denoted as •.
A classical system can be viewed as a random variable. If a random variable has d values, we call it as a dit with dimension d. Given a dit taking the value i with probability p i , i ∈ [d], i p i = 1, the state preparation under basis {|e i , i ∈ [d]} is transforming the dit into the quantum state σ = d−1 i=0 p i |e i e i |. Reversely, given a quantum state ρ, we can perform a measurement under basis {|e i , i ∈ [d]} and obtain a random variable taking the value i with probability tr(ρ |e i e i |).
Now, let us clarify the meaning of "classical processing". Classical computers can be viewed as Turing machines or circuit models [20,21]. Any function of the form f : can be realized with a certain number of fixed logical gates in classical circuits [9], where d, d ∈ Z + are positive integers. If we introduce probabilistic Turing machines [22,23], we have the ability to compute random functions. In principle, we can use a classical computer to realize any probabilistic function subject to a pre-determined probability distribution. In this work, we do not consider the computability of probabilistic Turing machine. That is, we do not consider the computational complexity to realize a random function.
Mathematically, a random function can be described by a stochastic matrix. Given a dit s taking i with probability p i , a probabilistic map O c : [d] → [d ] transfers it to a new random variable s = O c (s). A specific result j occurs with probability where the probabilistic map is described by the stochastic matrix T , satisfying T ji ≥ 0 and j T ji = 1, ∀i. In general, d and d can be different. Now we aim to find out all the quantum operations that can be replaced by classical processing. We distinguish CROs in four cases. To be specific, we restrict the input and output of the operation to be classical or quantum, and then find out the CROs. They are classical-quantum CROs (cqCRO), quantum-quantum CROs (qqCRO), quantum-classical CROs (qcCRO), and classical-classical CROs (ccCRO). Here, classical input means that we prepare a state based on a classical random variable and set this state as the input of the quantum operation. Classical output means that we further implement a measurement after the action of a quantum operation. The measurement result is the classical output and we do not concern about the remained state after the measurement. The replacement means that the output does not change for any input, even the input is unknown. Definition 1 (Classically replaceable operation). There are four cases that a quantum operation is replaceable with classical processing, cqCRO, qqCRO, qcCRO, and ccCRO defined as follows, as shown in Figure 1. Here, we define a fixed computational basis for state preparation and measurement. It is worth mentioning that in Definition 1, the CRO is the quantum operation beside the state preparation and measurement where the state preparation and measurement are excluded. We require the most strict condition for qqCRO as we do not put any restriction on the input and output. Any qqCRO is a cqCRO and a qcCRO. Interestingly, in Section 3, we show that the intersection of cqCRO and qcCRO is not qqCRO. Furthermore, the case of ccCRO can be viewed as the classical simulation. As all quantum operations can be simulated classically, ccCRO contains all quantum operations so that cqCRO, qqCRO, and qcCRO are all subsets of ccCRO. Note that in this work we might use CRO to represent a replaceable operation or the set of replaceable operations depending on the context.
In Definition 1, a CRO only guarantees that the subsystem it acts on is unchanged before and after classical replacement. The state of the rest part of the system might change. Assume that a CRO on system A, O A , originates from a unitary, U AB , on a large system, AB. In general, replacing O A will destroy U AB and change the correlation between A and B. On the other hand, if we consider a third system beyond AB, C, replacing O A will not change the correlation between A and C. Strictly speaking, the evolution on system A originating from U AB is not necessarily a CPTP map. Here, we only consider the CPTP map case. We provide more discussions in Appendix B. Now, let us consider unitary CROs, namely, classically replaceable unitary operations (CRU). This is a special case when B is a trivial system. In Section 3, we prove that cqCRU, qqCRU, and qcCRU can be replaced by deterministic classical processing while this conclusion is not true for ccCRU. A counter-example is that a Hadamard gate between the state preparation and measurement on a qubit can only be replaced with probabilistic classical processing. Figure 2 shows examples of CRUs in a quantum circuit. The state of the whole quantum circuit at any time does not change before and after replacement for any circuit input.

Mathematical Characterization of CRO
In this section, we first provide the mathematical characterizations for the four kinds of CROs. As any quantum operation can be treated as a ccCRO, we focus on the rest three cases. Then, we discuss the extensions of CRO when the state preparation and measurement are not performed on the computational basis.

Equivalent Definitions of CRO
Here, we provide the mathematical characterization of the first three kinds of CROs in Definition 1. Given a computational basis on H, the dephasing operation is defined as a map from D(H) to D(H) that ∀ρ ∈ D(H), Then, we mathematically characterize the three kinds of CROs.
We sketch the proof here and leave the details in Appendix C. As the proof for three kinds of CROs are similar, we exhibit the idea with respect to qcCRO. Theorem 1 contains three equivalent criteria for each kind of CRO. We first prove the equivalence of the second criterion and the third, then the first and the second. The equivalence of the second criterion and the third can be directly verified with the idempotence of the dephasing operation.
For the next proof, we first find the corresponding classical processing for each operation satisfying ∆ • O = ∆ • O • ∆. Then we prove that if any operation does not satisfy that criterion, then it cannot be replaced. The argument for the irreplaceability of an operation comes from that it can output different results for two inputs but through classical processing we can only get the same results. From this we can conclude there exists a quantum state that the output cannot be obtained after replacing the operation with classical processing.
From Theorem 1, we can define the sets for different CROs, In Appendix C, we show that for any qcCRO, O, the stochastic matrix T of the corresponding classical processing satisfies T ji = tr(|j j| O(|i i|)). If ∃U , where U is unitary, such that ∀ρ ∈ D(H), O(ρ) = U ρU † . Then Eq. (6) requires that where δ ij equals 1 if i = j and 0 otherwise. Then for any i, j, k and i = j, where U ki = k| U |i . It means for each row of U , there is only one element nonzero. As T ji = tr |j j| U |i i| U † = |U ji | 2 , the value of T ji must be 0 or 1. Then the replacing classical processing is deterministic. Similar arguments apply to unitary operations in cqCRO and qqCRO, Corollary 1. cqCRU, qqCRU and qcCRU can be replaced with deterministic classical processing.
It is interesting that from Theorem 1, we can obtain a relation between CRO and the resource theory of coherence [17]. In the framework of coherence resource theory, the free states, also named incoherent states, are the states diagonal on the computational basis. We can define two sets of operations: MIO and coherence non-activating operations (CNAO) [13]. The former is the maximal set of operations that cannot generate coherence from incoherent states. The latter is the maximal set of operations that cannot activate coherence from the input state. The details of coherence theory are shown in Appendix A.
In fact, Eq. (4) can be seen as the equivalent definition of MIO [13]. Similarly, Eq. (6) is a definition for CNAO. Then, we see the equivalence between cqCRO and MIO, qcCRO and CNAO. The intersection of cqCRO and qcCRO, or the intersection of MIO and CNAO, is a set of dephasing-covariant incoherent operations (DIO) [12,13], defined as It is worth noting that although MIO and CNAO have been proposed before, their classical replaceability has not been discovered yet. In a sense, the coincidence of the equivalence between cqCRO and MIO, qcCRO and CNAO, respectively, endows MIO and CNAO with a new operational meaning.
From Eq. (5) and Eq. (9), we can see that qqCRO is a proper subset of DIO, hence qqCRO is not the intersection of cqCRO and qcCRO. An operation belonging to both cqCRO and qcCRO might not be qqCRO. For example, CNOT gate is a DIO but not a qqCRO. At the same time, qqCRO is a subset of EB channels [15], since any qqCRO, O, can be given by where T ji is the stochastic matrix associated with the replaced classical processing. Furthermore, DIO is a proper subset of both cqCRO and qcCRO. For example, ∆ • Had is a cqCRO but not a DIO, where Had represents the super-operator form of the Hadamard gate. A state preparation channel, O(ρ) = |+ +|, is a qcCRO but not a DIO. Also, we can find an EB channel, O(ρ) = |0 +| ρ |+ 0| + |+ −| ρ |− +|, which is not a CRO. In summary, the relations among three kinds of CROs, MIO, CNAO and EB channels can be visualized in Figure 3.

Extension of CRO to Projective Measurement
In previous discussions, the measurements are rank-one, or, von Neumann measurements.
Here, we discuss a more general case where the measurement is a projective measurement, described by the projective-valued measure (PVM  Measurement result n occurs with probability tr(ρE n ).
The von Neumann measurement is a special case of PVMs. For a general PVM, several basis projectors may correspond to a same classical outcome, which represents a degeneracy phenomenon. In a similar fashion, we consider a generalized state preparation process. Given a set of projectors that span the entire Hilbert space, {E n |n ∈ [d ]}, we define the associated state preparation to be a map from [d ] to D(H), mapping n ∈ [d ] to En tr(En) . For d = d, where the projectors form an orthonormal basis of the Hilbert space, this process is the usual state preparation.
Using the generalized measurement and state preparation, with respect to a set of projectors {E n |n ∈ [d ]} on Hilbert space H, we define quantum channel T E , which acts on a state ρ ∈ D(H) as The channel has the following operational interpretation: measure ρ with {E n }, obtain result n, and then prepare state En tr(En) based on n. Note that when all of projectors E n are rank-one, that is, {E n |n ∈ [d ]} = {|i i| |i ∈ [d]}, T E reduces to the dephasing operation on the basis {|i }. For a general case, T E is different from the block-dephasing operation defined by the projectors [19], Still, measuring the state T E (ρ) with the PVM {E n } gives the same statistics as directly measuring ρ, that is, tr[T E (ρ)E n ] = tr(ρE n ).
Using the above ingredients, we define CRO in the extended scenarios of general PVMs. The formal definitions are the same as Definition 1 except for that the state preparation and measurement may not be rank-one. Here, we only discuss the extensions of cqCRO, qqCRO, and qcCRO, denoted as Theorem 2 is a generalization of Theorem 1 and the proof ideas of the two are the same, with details shown in Appendix C. Then, we define the sets of operations for extensions of CROs, In the study of block coherence, with the block-dephasing operation ∆ E , one can define the set of maximally block incoherent operations [24],

Extension of CRO with Unitary Transformation
In the discussion above, we fix the state preparation and measurement. In practice, the state preparation and measurement could be selected from multiple choices. When we use classical processing to replace the quantum operation, we can prepare the state or measure the state with one of these choices instead of a fixed one.
For simplicity, we assume the state preparation and measurement is rank-one. As we can apply unitary to change bases, the freedom to choose bases is equivalent to the freedom to apply unitary after state preparation and before measurement. The unitary is chosen from an ensemble U, which is often limited by quantum devices in practice. The largest unitary ensemble is U = U d , where U d is the unitary group with dimension d. In reality, single-qubit operations are normally easy to implement. In this case, we are often interested in the local unitary ensemble, U = U ⊗n 2 , where n is the number of qubits in the quantum system.
Given the ensemble U, we denote the extensions of cqCRO, qqCRO and qcCRO as cqCRO U , qqCRO U , and qcCRO U , respectively, as shown in Figure 4. The three kinds of CRO U are defined as follows.
1. Consider operations right after the state preparation, a cqCRO U can be realized by first processing the input classically and then preparing the state under a chosen basis.
2. Consider operations with quantum input and quantum output. A qqCRO U can be realized by first measuring the input with a basis, processing the outcomes classically, and then preparing the output state under another possibly different basis.
3. Consider operations right before measurement. A qcCRO U can be realized by measuring the quantum input and processing the outcomes classically.
Note that the classical value can always be discriminated and copied, which means we can choose the state preparation basis based on the classical input and measurement outcomes. This is the origin of control unitary in Figure 4(a) and 4(b). In our model, we suppose the quantum input is unknown and cannot be discriminated before measuring it, so the measurement basis cannot be chosen depending on the quantum input. That means in the first step of replacing qqCRO U or qcCRO U , we need to select a fixed measurement independent of the input.
We remark that unlike qcCRO U , cqCRO U or qqCRO U is not a simple union of {cqCRO U } or {qqCRO U }, U ∈ U, due to the possible dependence of state preparation basis on the classical input or the measurement result. From the operational meaning of qqCRO U , we can find another representation. Any qqCRO U can be realized by measuring the input state ρ with a basis {e i }, transforming measurement result i into j with probability T ji , and then preparing the state under another possibly different basis {f i j }, where T ji is the element of a stochastic matrix, { f i j } reflects the dependence between the state preparation basis and the measurement result i. From Eq. (18) we can see that any qqCRO U is an EB channel [15], which measures the state with a positive operator-valued measure (POVM) followed by state preparation.
A classical input can always be modelled as a quantum input followed with the computational basis measurement as shown in Figure 5. We can see that if an operation, where T jk is the element of a stochastic matrix, {|k } is the computational basis, { f k j } is a basis for state preparation.  Figure 5: A classical input s in is equivalent to a quantum input ρ in followed with the computational basis measurement. Here, the basis of state preparation right before O i in the second frame is set as the computational basis. Then, the equivalence in Figure 4(a) turns into the equivalence of the second and third lines.
Note that the measurement followed by state preparation is a dephasing operation.
Interestingly, if U = U d , then any CPTP map is a cqCRO U . The reason is that we can evaluate the output quantum state ρ out after reading the classical input s in . With the freedom to choose arbitrary unitary operations, one can prepare ρ out directly.

Virtual Clifford Gate from Classical Replacement
Now, we discuss the application of classical replacement. Consider a task in VQA that one needs to estimate the lowest energy level of a given Hamiltonian, H [10]. The basic idea of a VQA is preparing a parametrized state ρ and estimating its energy tr(ρH). Then, one can minimize this value to find the approximate lowest energy by adjusting the parameters of ρ. In general, an n-qubit quantum state, ρ, is prepared with a number of parametrized gates, where ρ 0 is the initial state and α, β, · · · , γ are parameters for the VQA. Then, one performs the measurement on ρ to evaluate tr(ρH). In practice, Pauli measurements are often favoured and one often decomposes H into the sum of n-qubit Pauli operators, H = i∈I c i P i , P i ∈ P n where P n is the n-qubit Pauli group and I ⊆ [4 n ] is an index set for P n . Then, estimating tr(ρH) becomes evaluating values of tr(ρP i ).
In general, one needs to perform a PVM associated with P i on ρ to obtain tr(ρP i ), which we call P i -measurement. For some gates C(α) in the state preparation of ρ, C(α) followed with P i -measurement can be replaced by P j -measurement followed with classical processing, where P i , P j ∈ P n . Then, we can replace C(α) with classical processing and skip it in the quantum circuit preparing ρ. Following the same arguments in previous subsections, the set of CRO in this case is given by Here, are the projectors to the eigenspaces of P i with eigenvalues +1 and −1, respectively. Note that ∀i ∈ I, the gates in R before P i -measurement can be replaced classically. We provide the detailed derivation and discussion in Appendix D. Interestingly, we can verify that the n-qubit Clifford group C n is always a subset of R regardless of the choice of the index set I. In fact, we can first find a subset of R, The third line comes from the fact that any Clifford gate C satisfies Any Clifford gate before Pauli measurements can be replaced and requires no real implementation, which has been discovered and utilised from the perspective of the quantum evolution in the Heisenberg picture [25].
Essentially, the classical replaceability of Clifford gates comes from the commutation relation in the Clifford algebra. This fact has been observed and widely used in quantum error correction. For example, in the Clifford+T model [26], one would remove all Clifford gates ahead of the final measurements. If one can perform mutually commuted Pauli measurements, then the Clifford gates before measurements can be absorbed. Thus, one only needs to implement multi-qubit π 8 -rotations in this model. Another example utilising the Clifford algebra to reduce quantum gates is "Pauli frame" [27][28][29]. Through updating the so-called "Pauli frame" with classical processing, there is no need for explicitly implementing Pauli gates before a Clifford gate.
The CRO set, R, as well as R are in general larger than C n since the classical replacement does not necessarily rely on the Clifford algebra. Take H = Z ⊗3 as an example where Z is the Pauli-Z gate. Then, the non-Clifford gate controlled-controlled-NOT, or CCX, is also an element in R since T i • CCX = T i • CCX • T i . Note that this can be extended to the case of the Toffoli gate with more than two control qubits. It means that we can virtually apply a number of quantum gates beyond the Clifford group. This might be an approach to improving the expressibility of the variational quantum circuit while saving the consumption of the experimental resource.

Characterization of Irreplaceability
The replaceability with classical processing of CRO motivates us to view the irreplaceability as a kind of quantum resource [30][31][32][33]. We can establish a channel resource theory to quantitatively study the potential quantum advantage brought by irreplaceability. We take CRO as the set of free channels and any quantum operation outside this set contains the resource of irreplaceability. Depending on the nature of the channel input and output, we can choose different types of CROs and specify a corresponding resource theory. In this work, we take qcCRO as an example.
To establish a channel resource theory for irreplaceability, we first need to specify the free channels and free superchannels [32]. The set of free channels is naturally given by Eq. (6). We consider the set of resource non-generating (RNG) superchannels to be the set of free superchannels F, To quantify the amount of irreplaceability of a channel, we can utilize the Choi-state representation of the channel. Given a channel N acting on D(H), the corresponding Choi-state is |ii is the maximally entangled state on H ⊗ H. We define two measures to characterize irreplaceability. One is relative entropy [34] of irreplaceability with details shown in Appendix F. The other is robustness [35] of irreplaceability defined as follows.

Definition 2 (Robustness of Irreplaceability). Given a channel N ∈ CP T P , the robustness of irreplaceability of N is
The robustness of irreplaceability in Eq. (25) has several equivalent definitions, as shown by the following lemma.

Lemma 1. The robustness of irreplaceability of a channel N can be equivalently given by
We leave the proof of the lemma in Appendix E.1. From Lemma 1, we can see that The robustness is a valid measure, which vanishes to zero only for qcCRO and enjoys the properties of monotonicity under free superchannels and convexity under channel mixing, as shown by the following lemma.

Convexity: Given an index set
We leave the proof of the lemma in Appendix E.2. Intuitively, these properties originate from the convexity of the set of free channels. The robustness can hence be viewed as a geometric measure for irreplaceability that quantifies the distance between the considered channel and the set of qcCRO.
When studying a large quantum system composed of several parts, if the action of an operation is restricted to one part of the system, we expect its robustness of irreplaceability to remain the same when considering its trivial extension to the whole system. This is indeed the case as shown in the following lemma. We leave the proof in Appendix E.3. Similar to other robustness-type measures [36], the calculation of the robustness of irreplaceability can be cast into a conic programming problem and solved efficiently. We provide the detailed method for its calculation in Appendix E.5. Here, we present some numerical results. Consider the family of single-qubit gates, U (θ) = cos θZ + sin θX, θ ∈ [0, π/2], and assign the computational basis to be the eigenvectors of Pauli operator Z. In the case of qcCRO, when θ = 0, the gate becomes Pauli operator Z, which can be omitted when followed with the computational-basis measurement. When θ = π/2, the gate becomes Pauli operator X, which can be replaced by a classical flip operation after the measurement. In cases other than these two extremes, the gate has non-zero irreplaceability. In Figure 6, we plot the amount of irreplaceability with respect to the gate set parameter, θ. In addition to the robustness measure, we also depict the relative entropy of the irreplaceability of the gates.  Figure 6: Irreplaceability of the single-qubit gates family, {U (θ) = cos θZ + sin θX|θ ∈ [0, π/2]}, as manifested in robustness and relative entropy measures. The two ends, when θ equals 0 and π/2, represent two qcCROs, Z, and X, respectively. While 0 < θ < π/2, U (θ) is not classically replaceable. The amount of irreplaceability achieves the highest in the case that θ = π/4, or equivalently, U (θ) is a Hadamard gate.
Interestingly, the robustness of irreplaceability has an operational meaning: it measures the advantage that a channel can provide in a non-local game [37,38] of state discrimination. To be specific, we define a bipartite non-local game in Box 1.

Box 1: Non-local Game
A non-local game G = {{α ij }, {σ i }, {|j j|}} for two parties, Alice and Bob, is composed of the following items: 3. Alice and Bob repeat the game for sufficiently many times and calculate the average payoff value.
In the case where Alice sends the state σ i , the probability that Bob takes a guess of σ j is tr(N (σ i ) |j j|). On average, the performance that Alice and Bob can obtain in this game is evaluated by the expected payoff function, For simplicity, we call it the performance of N in the non-local game G. Without loss of generality, we can require that ∀M ∈ qcCRO, the payoff values α ij satisfy that the performance of all qcCROs is non-negative and bounded by 1. Under this constraint, we have the following theorem showing the advantage brought by an irreplaceable quantum channel.

Theorem 3. The best advantage a quantum channel can provide over all qcCROs and all non-local games is given by
The proof of Theorem E.4 follows the idea of duality in conic programming [36,37]. We leave the detailed proof in Appendix E. Here, we discuss the operational meaning of the result. A qcCRO followed with a computational basis measurement is equivalent to applying a computational basis measurement followed with classical processing. As a result, Bob cannot distinguish the off-diagonal terms of {σ i } with a qcCRO. If the considered quantum channel is irreplaceable, when optimizing over all possible non-local games to maximize its advantage, we may choose a set of states {σ i } that vary mainly in the off-diagonal terms. The replaceable channels would fail in distinguishing the difference in these elements. On the other hand, a higher value of the robustness of irreplaceability brings a stronger ability of a channel to probe the off-diagonal terms of {σ i } and hence a higher performance in the non-local game.
In the non-local game as shown in Box 1, Bob can only perform computational basis measurement to distinguish quantum states. We can generalize the non-local game by considering other measurement settings. In fact, for the case where Bob can perform arbitrary POVM to distinguish quantum states, the best advantage a quantum channel can provide over all qcCROs and all non-local games is also 1 + R(N ). This result can be viewed as a special case of Ref. [37]. Another interesting case is where Bob can choose arbitrary local basis measurements. This is often the scenario in practical implementation of quantum information processing protocols, like shadow tomography [11]. In this case, we could choose the convex hull of qcCRO U as the set of free channels, where U equals U ⊗n 2 and represents the freedom to choose measurement bases. We expect to obtain similar results like Theorem 3 when considering the advantage brought by an irreplaceable quantum channel and leave it for future works.

Conclusion
In this work, we define the concept of CROs in four scenarios. Depending on the feature of the input and output of an operation, we classify CROs into four types. Among these sets, ccCRO is the largest, since it composes of all quantum operations, while qqCRO is the smallest, being a subset of each of the other three sets. We provide necessary and sufficient criteria to determine whether an operation is a CRO and present its corresponding classical processing. Interestingly, for the special cases of unitary operations, namely, cqCRU, qqCRU, and qcCRU, one only needs deterministic classical processing for replacement. Furthermore, we discuss two extensions of CRO, where the state preparation and measurement may not be rank-one and fixed. As an application, we show that a number of quantum gates beyond the Clifford group can be replaced in VQA, unveiling an approach to enhancing the expressibility of a variational quantum circuit with classical replacement.
From a theoretical view, the clarification of replaceability and irreplaceability manifests a difference between classical and quantum operations. Focusing on the set of qcCRO, we establish a resource theory framework for the study of irreplaceability with classical operations. We propose two measures, namely, robustness and relative entropy, to quantify the resource. An interesting discovery is that the robustness measure quantifies the quantum advantage of an operation over all the qcCROs in a non-local game. Besides, we find that cqCRO and qcCRO are equivalent to MIO and CNAO in the resource theory of coherence, respectively, while qqCRO is a subset of both DIO and EB channels. The relation reveals the connection between irreplaceability, coherence, and entanglement.
Note that, unlike classical simulation, we are only concerned with whether a quantum operation can be replaced regardless of the consumption of classical computing resources. This is the case in many subjects like the security analysis of QKD. It may be practically interesting to study the circuit complexity issues [39] in the classical replacement. Also, verifying whether a quantum gate, especially a large circuit composed of many quantum gates, is classically replaceable is important in quantum computing.
There are some other interesting future directions. One direction is extending the concept of CRO from finite dimensions to infinite dimensions. We expect such studies to benefit continuous-variable quantum information processing and inspire new perspectives on the non-classicality in the continuous-variable regime. Another topic is studying the problem of classical replacement in a non-Markovian evolution, that is, the evolution be-tween two different times may not be a CPTP map. It is also interesting to further explore the resource theory of irreplaceability. As in other resource theories, we expect to witness more valid measures with operational meanings for irreplaceability.

A Resource Theory
Quantum resource theory (QRT) studies how to characterize the resource stored in a quantum state, like entanglement [34] and coherence [17]. It also provides a tool to explore the problem of the interconversion between different resources under specific restrictions. In this section we will review the framework of resource theory [40] and introduce the resource theory of coherence [17] as well as the channel resource theory.

A.1 Framework of Resource Theory
For any QRT, we first point out the following as three main ingredients: resource, free states, and free operations. The resource like coherence is the quantity we characterize in the resource theory. The term "free" means that this kind of states or operations can be obtained at no cost. The state not free is a resourceful state. The three ingredients are not independent to each other. They satisfy the free operations postulate (FOP) [40], that is, any free operation cannot transform a free state to a resourceful state. Denote the Hilbert space as H, the states on H as D(H), the set of free states on D(H) as F. Then for any free operation Λ, Λ(σ) ∈ F, ∀σ ∈ F.
From this postulate, we could define a set of operations named resource non-generating operations (RNG), containing all the operations satisfying FOP: CPTP represents the set of all completely positive channels on D(H). Any set of free operations is a subset of RNG. Different sets of free operations lead to different resource theories while the resource theories with RNG might have a universal property [40]. After defining the three ingredients in QRT, we need to characterize the resource by providing a resource measure. The measure of the resource is a functional M mapping from D(H) to non-negative real numbers. A valid measure M should satisfy the following two conditions. First, it is 0 for the set of free states: In some QRTs this requirement is more strict. M is 0 if and only if the state is free state: Second, any proper resource measure M cannot increase under the action of free operations. This is the monotone condition. Then, for any free operation Λ, There are some additional requirements for the measure in different QRTs. These extra requirements could vary a lot for different QRTs. In the resource theory of coherence, it is reasonable that coherence cannot increase under mixing from a physical point of view. This leads to the convexity condition of the measure: Here, we introduce two kinds of measures. The first is divergence measure, that is, the measure of the resource bases on the divergence between the state and the set of free states F. Divergence is a functional mapping two quantum states into a non-negative real number: requiring D(ρ, σ) = 0 ⇔ ρ = σ. The divergence of a state ρ and the set of free states F is defined as To get a well-defined divergence measure, we require F to be a convex set, i.e., for any ρ, σ ∈ F, tρ + (1 − t)σ ∈ F, ∀0 ≤ t ≤ 1. Normally, we take D as the K-L divergence or relative entropy S: S(ρ||σ) = tr(ρ log σ) − tr(σ log σ). The relative entropy of the resource is M (ρ) = S(ρ||F). We can prove that this measure meets the requirements of Eq. (37), Eq. (38) and Eq. (39).
It can be verified that divergence measure satisfies Eq. (37). Due to the contractive property of relative entropy S, i.e., for any CPTP channel E,
(44) leads to the convexity of the measure.
Another widely used resource measure is robustness of the resource, that is how hard to make the state become a free state with mixing another state. For any state ρ ∈ D(H), the robustness of the resource is Obviously robustness measure satisfies Eq. (37). We can prove it also satisfies monotone condition. For any quantum state ρ, we set r = R(ρ). According to the definition of robustness measure, ∃σ ∈ D(H), ρ+rσ 1+r ∈ F. Then for any free operation Λ, From Eq. (45) we can see R(Λ(ρ)) ≤ r = R(ρ). That is the condition of Eq. (38). Moreover, the robustness measure meets the requirement of Eq. (39) if the set of free states F is convex. Denote r i = R(ρ i ) for a set of states {ρ 1 , ρ 2 , · · · , ρ n }, then ∃{σ 1 , σ 2 , · · · , σ n }, ρ i +r i σ 1+r i ∈ F, ∀i. For any convex combination of {ρ 1 , ρ 2 , · · · , ρ n }: ρ = This accounts for the convexity of the robustness measure.

A.2 Resource Theory of Coherence
Here we apply the framework of resource theory to characterize coherence. In the resource theory of coherence [17], the set of free states and free operations are named incoherent states and incoherent operations. We first set the computational basis of Hilbert space H, denoted as {|i , i ∈ [d]}. Then we define the incoherent states to be the states only with diagonal terms in computational basis, i.e., The set of incoherent operations has different choices. The largest set of incoherent operations (RNG) is called maximally incoherent operations (MIO) in the resource theory of coherence. Any operation in MIO cannot generates coherence from incoherent states. It can be proved that [13] where ∆ is dephasing operation on D(H). A smaller set of incoherent operations is dephasing-covariant incoherent operations (DIO): DIO is the set of operations commuting with the dephasing operation. Dephasing operation can be viewed as the resource destroying map [13] in the resource theory of coherence. From it we can define another set of operations named coherence non-activating operations (CNAO): CNAO is not a subset of MIO so it cannot be specified as the set of free operations. Provided the incoherent states and incoherent operations, we need to find coherence measure. We can verify that the set of incoherent states is convex. Then applying the conclusion in Subsection A.1, we define the relative entropy of coherence and robustness of coherence. The relative entropy of coherence C rel is where S(ρ) = − tr(ρ log ρ) is the von-neumann entropy. The robustness of coherence R is With these two measures we can study the interconversion of states under different sets of incoherent operations and explore the quantum advantage shown in coherence.

A.3 Channel Resource Theory
Previous two subsections discuss the state resource theory. We can also establish a resource theory framework for the channels. Channel is the completely positive and trace preserving map on D(H). In a channel resource theory, the resource is a functional mapping a channel instead of a state to the non-negative number. We need to specify the set of free channels and the set of free superchannels as the analogy of the set of free states and the set of free operations. The superchannel transforms one channel to another just like the operation acting on the states. We can choose RNG superchannels as the free superchannels when we establish a channel resource theory to avoid providing a specific representation of superchannels. Similar with the state resource theory, we need to provide the resource measure. One approach to discussing resource measure is transforming the channel to its Choi-state representation, then characterize the resource of Choi-state with the tool of state resource theory. Here we briefly introduce this approach. The Choi-state representation of a channel N is where Φ + is the maximally entangled state 1 N (|i j|)). Then the set of free channels can be transformed into a set of free states. The set of free superchannels will become a set of free operations. As long as the set of free channels is convex, the corresponding set of Choi-states is convex. After that we can define the divergence measure and robustness measure in the channel resource theory.
A concrete example of channel resource theory is entanglement breaking (EB) channel [15]. A channel N is entanglement breaking if and only if its Choi-state Φ N is separable. At the same time, any EB channel has the form: where σ i is a density operator and {M i } form a POVM. That is, any EB channel can be realized by measuring the state with a POVM, and then preparing a state based on the measurement result. The set of EB channels is convex. We can take this set to be free channels and quantify the resource of a channel relative to this set.

B Partial Replacement of Quantum Operation
Here, we discuss the scenario of replacing part of a quantum operation with classical processing in detail. For simplicity, we only consider the case of qcCRO. First, we focus on the case where the evolution of a subsystem originating from a large evolution on the overall system can be viewed as a CPTP map.
Consider a system composed of two subsystems, H a and H b , as shown in Figure 7, where the quantum state of the whole system, H ab ≡ H a ⊗ H b , is a product state. The quantum evolution on the whole system is given by a unitary operation U . If we focus on the subsystem H b and ignore subsystem H a , the equivalent action on H b is given by (56) If we know the initial state of ρ a and the unitary U , we can obtain the form of O. Here, we set specific values for ρ a and U so that O is a qcCRO. Then, O can be moved after the computational basis measurement and replaced by classical processing O c . Before classical replacement, the final state on system H ab is which exhibits correlation between subsystem H a and H b . After classical replacement, the interaction between H a and H b is eliminated, so there is no correlation between two subsystems in the end. In this sense, we conclude that replacing a CRO only guarantees the subsystem it acts on is unchanged while the other systems and the correlation between the subsystem and the rest might change.
In Figure 8, we show an example replacing a CRO while maintaining the state of the whole system after classical replacement. The two subsystems H a and H b are both qubits with computational basis as Z basis. The initial state on the whole system is ρ a ⊗ ρ b and the interaction is a control unitary from H a to H b . The action on H a after ignoring H b is a dephasing channel, for any state ρ a ∈ D(H a ), where p is dephasing rate depending on the interaction and initial state on H b . Here, O is a qcCRO and can be moved after computational basis measurement. The corresponding classical processing O c is identity, mapping a classical bit to itself. To ensure the state on H ab does not change before and after classical replacement, we add a classical-quantum control from subsystem a to subsystem b. In this way, not only the subsystem the CRO acts on is unchanged, the whole system is unchanged as well. It is worth noting that Figure 8 shows an example where we can perform classical replacement without knowing the concrete form of a CRO. In this example, the dephasing rate p is unknown if the initial state on subsystem H b is uncharacterized. Nevertheless, for any value of p, O is related to a fixed classical processing so that the replacement can be implemented.
In the discussion above, we restrict the initial state to be a product state so that the evolution on the whole system reduces to a CPTP map when we look at the subsystem. However, if the initial state is entangled, the evolution on a subsystem may not be able to be expressed as a CPTP map, as shown in Figure 9. The classical replacement in this case is different from replacing a quantum operation, which is another interesting problem. The situation where a quantum evolution cannot reduce to a CPTP map on a subsystem comes from the violation of the Markovian assumption. Another example of non-Markovian evolution on the subsystem is shown in Figure 10. With a product initial state ρ a ⊗ ρ b on system H a ⊗ H b , two unitary evolutions on the whole system, U 1 and U 2 , can reduce to two qcCROs on subsystem b, O 1 and O 2 , respectively. However, the concatenation of two unitary evolutions, U 2 • U 1 , cannot reduce to O 2 • O 1 . An interesting question for future research is that when U 2 • U 1 can reduce to a qcCRO in such a case. A positive example is when U 1 and U 2 are both CNOT gates. Here, U 2 • U 1 cannot reduce to O 2 • O 1 but can reduce to an identity operation, which is a qcCRO.

C Proof of Theorem 1 and Theorem 2
Here, we provide a proof of Theorem 1 and Theorem 2. The former is a special case of the latter so we only prove Theorem 2. We prove two lemmas to verify the equivalence of the second and the third criteria, and the equivalence of the first and the second, respectively, for each kind of CRO. The notations are the same in the main-text.

C.1 Proof of the Equivalence of the Second and the Third Criteria
We start with proving Lemma 4 as shown below.
Here, the second equality comes from the idempotence of T E , From Lemma 4 we obtain that the third criterion implies the second for cqCRO {En} , qqCRO {En} , and qcCRO {En} respectively. The opposite is also true as the second criterion means that there exists respectively. As a consequence, the two criteria are equivalent for cqCRO {En} , qqCRO {En} , and qcCRO {En} respectively.

C.2 Proof of the Equivalence of the First and the Second Criteria
For the next proof, we first prove the equivalence of the first and second criteria for qcCRO {En} , and then discuss the cases of other two CROs. We begin with defining an extension of qcCRO and qcCRO {En} and propose Lemma 5.
Given any input state ρ ∈ D(H), any quantum channel O, we perform the PVM,   Figure 11. Here, we utilise the measurement result of M 1 does not change if inserting T E before measurement and the measurement result s of M 1 on O(ρ) takes the value n with probability m tr(F m ρ) tr E n O( Fm tr(Fm) ) . It is equivalent to measure ρ with M 2 to get m with probability tr(F m ρ), and then transfer m to n with probability tr E n O( Fm tr(Fm) ) . We can view tr(F m ρ) as an initial probability distribution and tr E n O( Fm tr(Fm) ) as a stochastic matrix of the classical processing. Note that the term tr E n O( Fm tr(Fm) ) is irrelevant to the initial state ρ so the classical replacement can be realized. Then we find the corresponding classical processing for any operation satisfying Eq. (63) and complete the proof of the first step.
For the second step, we show that for any operation O outside Eq. (63), there exists two different states, ρ 1 and ρ 2 satisfying T F (ρ 1 ) = T F (ρ 2 ), while M 1 on O(ρ 1 ) and O(ρ 2 ) can output different probability distributions. Note that T F (ρ 1 ) = T F (ρ 2 ) implies PVM M 2 cannot distinguish the classical measurement results of the two. Then the classical processing only outputs the same results for these two inputs. That means for either ρ 1 or ρ 2 the quantum operation and classical processing cannot output the same result, then we prove O cannot be replaced by classical processing.
The equivalence of the first and the second criteria for qcCRO and qcCRO {En} is proved as a special case of Lemma 5.
For cqCRO {En} , we turn back to the scenario where the state preparation in the classical replacement is the same as that right before the replaced quantum operation. They are both state preparation associated with projectors {E n }.
Set σ E = T E (σ) = n En tr(En) tr(σE n ), then we can see that σ E can be obtained from state preparation by inputting n with probability tr(σE n ). From Eq. (66), we can see O(σ E ) = T E (O(σ E )). However, for a state, ρ, obtained from state preparation, ρ must satisfy ρ = T E (ρ). Hence, O(σ E ) cannot be obtained from state preparation, which means O cannot be replaced by a classical processing and state preparation. Thus, we prove the equivalence of the first and second criteria for qcCRO {En} .
Similar for qqCRO {En} , given any quantum operation O satisfying O = T E • O • T E , we can replace it with measurement, classical processing and state preparation. The stochastic matrix of the corresponding classical processing is then O(σ) cannot be obtained with state preparation, which means O cannot be replaced.
As any qqCRO {En} is a qcCRO {En} , in this case O cannot be replaced neither. Here, we prove the equivalence of the first and second criteria for qqCRO {En} and complete the whole proof.

D Application of Classical Replacement in VQA
Here, we present the details of applying classical replacement to the variational quantum algorithm. First we introduce the n-qubit Pauli group and Clifford group for further elaboration.
The four Pauli matrices on a qubit are defined as The n-qubit Pauli group P n contains all the n-qubit Pauli operators in the form of tensor product of n Pauli matrices, The n-qubit Clifford group C n is defined as the normalizer group of P n , that is, ∀C ∈ C n , ∀i ∈ [4 n ], ∃j ∈ [4 n ], s.t., P j = C −1 P i C. In another word, As a consequence, given T i = 1 2 n−1 (tr P + i · P + i +tr P − i · P − i ) associated with P i -measurement, it will become T j associated with P j -measurement under the action of C as shown below.
where P j = C −1 P i C. Here, we utilise C −1 P + i C = C −1 (I + P i )C/2 = (I + P j )/2 = P + j and In the variational quantum algorithm, to estimate the lowest energy level of a Hamiltonian, H, one first prepares a parametrized state ρ = |ψ ψ| through a structured quantum circuit, and then evaluate E = tr(ρH) by the measurement. Here, we take the circuit ansatz to be where n is the number of qubits, α and θ are parameter vectors. The energy for state ρ is a function of α and θ, that is, E = E( α, θ). By adjusting parameters α and θ one can achieve a minimum of E( α, θ) and set it as the approximate value for the lowest energy of H. In practice, E( α, θ) is often obtained with Pauli measurements. One may first express Hamiltonian H as the sum of Pauli operators, H = i∈I c i P i where I ⊆ [4 n ] is an index set and P i ∈ P n . Then, one can measure ρ with P i to obtain tr(ρP i ) for any i in I and evaluate E = tr(ρH) = i c i tr(ρP i ).
Here, the circuit ansatz is divided into two parts as shown in Figure 12. The part U ( θ) is in general irreplaceable and needs real implementation while C( α) is taken from the set of qcCRO and can be moved after measurement and become classical processing. Recalling Lemma 5, a quantum operation before P i -measurement that can be replaced by P j -measurement and classical processing belongs to the set Note that, for any i ∈ I, there exists j ∈ [4 n ], C( α) can be moved after P i -measurement and be replaced by P j -measurement followed with classical processing. Then we deduce that C( α) belongs to the set In fact, R is the maximal set of quantum operations that can be replaced with classical processing in this case. That means, the optimization of C( α) is confined in R. As a consequence, one can improve the expressibility of the variational quantum circuit with the help of virtual quantum gates C( α) while only U ( θ) needs to be really implemented.
In the main-text, we show that C n is a subset of R. Moreover, replacing a Clifford gate does not acquire further classical processing after the measurement. It takes no price to implement a Clifford gate if we only concern the classical result of the Pauli measurement. In [25], the authors propose this idea from another perspective, by viewing the evolution Quantum Part ( Ԧ ) Classical Part Figure 12: The ansatz for a variational quantum circuit is set as C( α)U ( θ) |0 ⊗n . It contains two parts.
One is irreplaceable quantum operation U ( θ) and the other is classically replaceable operation C( α). ∃j ∈ [4 n ], ∀i ∈ I, C( α) before P i -measurement can be replaced with P j -measurement and classical processing O c .
of C( α) in Heisenberg picture. The final measurement result can be given by Therefore, one can perform P j -measurement on U ( θ) |0 ⊗n instead of performing P i -measurement on C( α)U ( θ) |0 ⊗n to evaluating E( α, θ). The action of C( α) is moved from the state to Hamiltonian H and hence C( α) becomes a virtual gate.

E.1 Proof of Lemma 1
Ahead of the proof, we briefly restate Lemma 1 for better reading. There are five equivalent definitions for the robustness of irreplaceability of a quantum channel N as shown below. and Eq. (78), Eq. (77) and Eq. (79) respectively to prove Lemma 1, which comes from the idempotence of the dephasing operation. Notice that ∆ • ∆ = ∆, we have Assuming the minimization of Eq. (77) gives s 1 and that of Eq. (78) gives s 2 , that means Combining Eq. (80) with Eq. (81) we get Then we get s 3 ≤ s 1 . Following the similar approach we can also prove s 1 ≤ s 3 implying s 1 = s 3 . Thus, we prove the equivalence between Eq. (77) and Eq. (79), and complete the whole proof.

E.2 Proof of Lemma 2
Proof. First, we prove the monotonicity of robustness of irreplaceability. For any free superchannel Λ ∈ F, suppose M is the channel achieving the minimal value of s, s.t., N +sM 1+s ∈ qcCRO. Then As Λ(M) is also a CPTP channel, from the definition we see that R(Λ(N )) ≤ s = R(N ). The convexity of robustness comes from the convexity of qcCRO. Given a set of channels {N i } where i belongs to an index set I, assuming s i = R(N i ) and M i achieves the minimal value, that is, We set M = i p i s i M i s , s = i p i s i . Due to the convexity of qcCRO, From the definition of the robustness we get

E.3 Proof of Lemma 3
Before proving Lemma 3, we introduce some basic properties of CROs in a large system with multiple parts. These properties are natural corollaries of Theorem 1. We first consider the joint behavior of independent CROs on different subsystems, which is described by the tensor-product operation.
Corollary 2. cqCRO, qqCRO, and qcCRO are closed under the action of tensor product.
Proof. We prove the result for qcCRO. Similar arguments apply to cqCRO and qqCRO.
Recall that the computational basis of an n-party system, n−1 k=0 H k , is the tensor product of subsystem computational bases. Thus, the dephasing operation on n−1 k=0 H k is also the tensor product of subsystem dephasing operations, It means that n−1 k=0 O k is a qcCRO on n−1 k=0 H k .
Next, we consider the inverse operation of the tensor product. Without loss of generality, we consider a bipartite system H 0 ⊗ H 1 . The dephasing operations on H 0 , H 1 , and H 0 ⊗ H 1 are denoted as ∆ 0 , ∆ 1 , and ∆ 01 = ∆ 0 ⊗ ∆ 1 , respectively. Consider a quantum operation O 01 on the bipartite system. If its effective operation on a subsystem is CPTP, then we call the operation on the subsystem as the partial trace over the other subsystem. The partial trace over H 1 or H 0 of O 01 is denoted as O 0 or O 1 , respectively. In general, O 01 jointly acts on the two subsystems and we cannot write it as O 01 = O 0 ⊗ O 1 . While in our cases, it suffices to consider the following definitions for the partial trace of quantum operations, where I 0 and I 1 are identity operators on H 0 and H 1 , respectively, d 0 = dim H 0 , and This directly leads to ∆ 0 Utilising the symmetry, we also obtain In the following, we write I 0 ⊗ ∆ 1 as ∆ 1 for simplicity and similarly for the alike.
With the above two results, we now prove Lemma 3.
Proof. Given a quantum channel on system H 0 , N , and the identity operation on ancillary system H 1 , I, we denote s 1 = R(N ) and s 2 = R(N ⊗ I). Then by definition, there exists a quantum channel on H 0 , M 0 , and a quantum channel on H 0 ⊗ H 1 ,M 01 , satisfying From Eq. (92) one can deduce that which implies that s 2 ≤ s 1 . On the other hand, one can take partial trace over system H 1 for both sides of Eq. (93) and obtain that which implies that s 1 ≤ s 2 . Here,M 0 represents the partial trace ofM 01 over H 1 given by Eq. (90). Therefore, we obtain R(N ) = s 1 = s 2 = R(N ⊗ I) and complete the proof.

E.4 Proof of Theorem 3
Proof. The proof idea is transforming the minimization problem in robustness of irreplaceability to a dual problem. The dual problem is a maximization problem, where the objective function corresponds to the performance of a channel in the non-local game. For further elaboration, we clarify the notations. The Choi-state I ⊗N ( Φ + Φ + ) of a channel N is a bipartite state and we label the two parties with 0 and 1, respectively. That is, The computational basis of each party H k is denoted as {|i k , i ∈ [d]}, k = 0, 1. With respect to the computation basis, we define two dephasing operations on the subsystem, such that ∀ρ ∈ D(H 0 ⊗ H 1 ), Now we take the second equivalent definition of robustness of irreplaceability, i.e., Eq. (26), and express the minimization problem as a conic optimization problem [37], A ∈ cone(F ), , M ∈ qcCRO}, and cone(·) represents their unnormalized versions, which forms a convex cone. The term A corresponds to the numerator, Φ ∆•N + sΦ ∆•M , in Eq. (26). Note that Φ ∆•N = ∆ 1 (Φ N ). We use I 0 ∈ L(H 0 ) to denote the identity operator, where L(H 0 ) represents the set of linear operators on H 0 . The Lagrangian function of this problem is Here, ·, · represents Hilbert-Schmidt inner product, with and W ∈ (cone(S)) * , X ∈ (cone(F )) * , Y ∈ L(H 0 ). Here, (cone(S)) * represents the dual cone of cone(S), defined as (cone(S)) * = {V ∈ L(H 0 )|∀U ∈ cone(S), U, V ≥ 0}, and the definition of (cone(F )) * is similar. The dual problem is We can change the form of Lagrangian function: Note that Y, tr 1 (A) = Y ⊗ I 1 , A . Then the dual problem is equivalent to: The above can also be written as By taking X = I 01 2 , Y = I 0 , W = I 01 2 , we can check that Slater's conditions are fulfilled and hence the problem satisfies the strong duality [41]. Note that the primal problem is minimizing a convex function s and Y, (1 + s) I 0 d − tr 1 (A) is an affine function relative to s and A. Also, we can see that the objective function is not related to X and Y , hence we can rewrite the optimization as Note that for any qcCRO M, ∆ 1 (Φ M ) ∈ F , there always exists W = ∆ 1 (Φ M ) satisfying the restriction and achieving the maximization. The corresponding robustness is 0 which is the value for any qcCRO.

E.5 Calculation of the Robustness of Irreplaceability
Given a channel N ∈ CPTP, evaluating its robustness of irreplaceability can be recast into a convex optimisation problem. Here, we consider the case of a qcCRO. Suppose the robustness value is given by R(N ) = s * and the corresponding CPTP map in its evaluation is given by M * . That is, where d is the dimension of subsystem 0 and I 0 is the identity operator on subsystem 0. The second and the third constraints correspond to the requirement of a CPTP map. For the set of qcCRO, the cone of its corresponding set of Choi states can be described as where ∆ 1 and ∆ 01 are given in Eq. (97) and (98). Eq. (111) is the Choi-state representation of Eq. (6). Then, Eq. (110) is written in a standard semi-definite programming problem, which can be solved in polynomial time, for example, by using interior-point algorithm.

F Relative Entropy of Irreplaceability
The relative entropy of irreplaceability is defined as follows.
The set of qcCRO and F = {Φ ∆•M M ∈ qcCRO} are convex, hence Eq. (112) is well-defined. This measure is different from the normal definition of the relative entropy measure, usually defined as the minimum relative entropy of a channel to the free channels, i.e., min M∈qcCRO D(Φ N Φ M ). Here, we adopt the Choi state of ∆ • N instead of N as we concern about whether an operation followed with a measurement can be replaced by classical operations or not. The irreplaceability of a channel N should be the same as ∆•N as no measurement can distinguish them. Also, we have proven that R(N ) = R(∆ • N ), showing that it is reasonable to consider the distance between ∆ • N and ∆ • M instead of N and M.
The relative entropy of irreplaceability has an analytic expression, as given by the following lemma. The dephasing operations ∆ 0 , ∆ 1 , ∆ 01 are given by Eq.
In the last line, the state Φ M = ∆ 01 (N ) saturates the equality. This completes the proof.
From the proof of Lemma 6, we can see that for any qcCRO, M, the state ∆ 1 (Φ M ) is an incoherent state on H 0 ⊗ H 1 . Correspondingly, Eq. (113) is the relative entropy of coherence of ∆ 1 (Φ N ). From Lemma 6, to obtain C rel (N ), one only needs to get Φ N and calculate the von Neumann entropy of ∆ 01 (Φ N ) as well as ∆ 1 (Φ N ). This calculation is essentially a matrix diagonalization problem, which can be solved in polynomial time.
In the discussion below, we take a subset of RNG superchannels to be the set of free superchannels F, The set F is not empty as the identity superchannel, Λ(N ) = N , belongs to F. It is also a convex set as Λ 1 , Λ 2 ∈ F ⇒ pΛ 1 + (1 − p)Λ 2 ∈ F, ∀0 ≤ p ≤ 1. Now we show that the relative entropy of irreplaceability has the properties of non-increasing under mixing and monotonicity under F, as shown by the following lemma.
where M i is the CPTP channel minimizing the value D(∆ 1 (Φ N i )||∆ 1 (Φ M )). The inequality of the third line comes from the joint convexity of relative entropy. For any free superchannel Λ ∈ F, The inequality of the fourth line comes from the data processing inequality.
Similar with the robustness of irreplaceability, the relative entropy of irreplaceability also enjoys the stability under extensions to large systems as shown in the following lemma. Proof. Given a quantum channel, N , on Hilbert space H 0 and the identity operation I 0 on an ancillary system H 0 , the Choi-state of N and N ⊗ I 0 are shown below.