Encodability Criteria for Quantum Based Systems

Quantum based systems are a relatively new research area for that different modelling languages including process calculi are currently under development. Encodings are often used to compare process calculi. Quality criteria are used then to rule out trivial or meaningless encodings. In this new context of quantum based systems, it is necessary to analyse the applicability of these quality criteria and to potentially extend or adapt them. As a first step, we test the suitability of classical criteria for encodings between quantum based languages and discuss new criteria. Concretely, we present an encoding, from a language inspired by CQP into a language inspired by qCCS. We show that this encoding satisfies compositionality, name invariance (for channel and qubit names), operational correspondence, divergence reflection, success sensitiveness, and that it preserves the size of quantum registers. Then we show that there is no encoding from qCCS into CQP that is compositional, operationally corresponding, and success sensitive.


Introduction
The technological progress turns quantum based systems from theoretical models to hopefully soon practicable realisations.This progress inspired research on quantum algorithms and protocols.They allow for a significant increase in efficiency in many cases and provide new approaches to secure systems.These algorithms and protocols in turn call for verification methods that can deal with the new quantum based setting.
Among the various tools for such verifications, also several process calculi for quantum based systems are developed [JL04, GN05, Gay06, YFDJ09].To compare the expressive power and suitability for different application areas, encodings have been widely used for classical, i.e., not quantum based, systems.To rule out trivial or meaningless encodings, they are required to satisfy quality criteria.In this new context of quantum based systems, we have to analyse the applicability of these quality criteria and potentially extend or adapt them.
Therefore, we start by considering a well-known framework of quality criteria introduced by Gorla in [Gor10] for the classical setting.As a case study we want to compare Communicating Quantum Processes (CQP) introduced in [GN05] and the Algebra of Quantum Processes (qCCS) introduced in [FDJY07,YFDJ09].These two process calculi are particularly interesting, because they model quantum registers and the behaviour of quantum based systems in fundamentally different ways.CQP considers closed systems, where qubits are manipulated by unitary transformations and the behaviour is expressed by a probabilistic transition system.In contrast, qCCS focuses on open systems and super-operators.Moreover, the transition system of qCCS as presented at [YFDJ09] is non-probabilistic.(Unitary transformations and super-operators are discussed in the next section.) Unfortunately, the languages also differ in classical aspects: CQP has π-calculus-like name passing but the CCS based qCCS does not allow to transfer names; qCCS has operators for choice and recursion but CQP in [GN05] has not.Therefore, comparing the languages directly would yield negative results in both directions, that do not depend on their treatment of qubits.To avoid these obvious negative results and to concentrate on the treatment of qubits, we consider CQS, a strictly less expressive sublanguage of CQP that removes name passing and simplifies the syntax/semantics, but as we claim does treat qubits in the same way as CQP.As second language we consider OQS that is similar to qCCS as presented in [YFDJ09] extended by an operator for a conditional, but as we claim again does treat qubits in the same way as qCCS.Accordingly, our focus is not exactly on the languages CQP and qCCS but on how they treat qubits.The language CQS, for closed quantum systems, inherits from CQP the closed systems with only unitary transformations and has a semantics that is no longer probabilistic, but explicitly deals with probability distributions.In contrast OQS, for open quantum systems, inherits from qCCS the open systems and super-operators and a non-probabilistic semantics without explicitly considering probability distributions.We further discuss the differences between CQP and CQS as well as qCCS and OQS when we introduce these languages.
We then show that there exists an encoding from CQS into OQS that satisfies the quality criteria of Gorla and thereby that the treatment of qubits in OQS/qCCS is strong enough to emulate the treatment of qubits in CQS/CQP.We also show that the opposite direction is more difficult, even if we restrict the classical operators in qCCS.In fact, the counterexample that we use to prove the non-existence of an encoding considers the treatment of qubits only, i.e., relies on the application of a specific super-operator that has no unitary equivalent.
These two results show that the quality criteria can still be applied in the context of quantum based systems and are still meaningful in this setting.They may, however, not be exhaustive.Therefore, we discuss directions of additional quality criteria that might be relevant for quantum based systems.
Our encoding satisfies compositionality, name invariance w.r.t.channel names and qubit names, strong operational correspondence, divergence reflection, success sensitiveness, and that the encoding preserves the size of quantum registers.We also show that there is no encoding from OQS/qCCS into CQS/CQP that satisfies compositionality, operational correspondence, and success sensitiveness, where we consider a variant qCCS with a measurement operator as given in [FDJY07,FDY12].
Summary.We need a number of preliminaries: Quantum based systems are briefly discussed in §2, the considered process calculi are introduced in §3, and §4 presents the quality criteria of Gorla.§5 introduces the encoding from CQS into OQS and comments on its correctness.The negative result from OQS/qCCS with a measurement operator into CQS/CQP is presented in §6.In §7 we discuss directions for criteria specific to quantum based systems.We conclude in §8.The present work extends and revises [SPD22a,SPD22b].In particular, we restore the negative result in §6, since unfortunately the counterexample used in [SPD22a] was an invalid super-operator.Moreover, we revise both of the considered languages to get closer to the original versions of qCCS and CQP and more clearly describe the differences to their respective prototypes.We present detailed proofs of the mentioned results and provide more explanations.

Quantum Based Systems
We briefly introduce the aspects of quantum based systems, which are needed for the rest of this paper.For more details, we refer to the books by Nielsen and Chuang [NC10], Gruska [Gru09], and Rieffel and Polak [RP00].
A quantum bit or qubit is a physical system which has the two base states: |0⟩ and |1⟩.These states correspond to one-bit classical values.The general state of a quantum system is a superposition or linear combination of base states, concretely |ψ⟩ = α|0⟩ + β|1⟩.Thereby, α and β are complex numbers such that |α| 2 + |β| 2 = 1, e.g.|0⟩ = 1|0⟩ + 0|1⟩.Further, a state can be represented by column vectors |ψ⟩ = α β = α|0⟩ + β|1⟩, which sometimes for readability will be written in the format (α, β) T , where T stands for transpose.The vector space of these vectors is a Hilbert space, denoted by H.It forms the state space of a quantum based system.In [YFDJ09] finite-dimensional and countably infinite-dimensional Hilbert spaces are considered, where the latter are treated as tensor products of countably infinitely many finite-dimensional Hilbert spaces.For this work finite-dimensional Hilbert spaces are sufficient.
The evolution of a closed quantum system can be described by unitary transformations [NC10].A unitary transformation U is represented by a complex-valued matrix such that the effect of U onto a state of a qubit is calculated by matrix multiplication.It holds that U † U = I, where U † is the adjoint of U and I is the identity matrix.Thereby, I is one of the Pauli matrices together with X , Y, and Z.Another important unitary transformation is the Hadamard transformation H, as it creates the superpositions H|0⟩ = |+⟩ and H|1⟩ = |−⟩.
|α| 2 + |β| 2 and leaves the system in state 1 The result 1 is given with probability |γ| 2 + |δ| 2 .In this case the system has state 1 Further, the measurement of both qubits simultaneously gives result 0 for both qubits with probability |α| 2 (leaving the system in state |00⟩), result 0 for the first and 1 for the second qubit with probability |β| 2 (leaving the system in state |01⟩) and so on.We use binary numbers to refer to measurement results, i.e., for two qubits the measurement results are 00, 01, 10, or 11.
In multi-qubit systems unitary transformations can be performed on single or several qubits.As an example for an unitary transformation, consider the transformation X on both qubits of a 2-qubit system in state |00⟩ simultaneously, we use the unitary transformation X ⊗ X .The result of (X ⊗ X )|00⟩ is the state |11⟩.To apply X only to the second qubit, we use I ⊗ X and (I ⊗ X )|00⟩ = |01⟩.The Pauli matrix I denotes the identity matrix in 2 1 dimensional space.By slightly abusing notation we also use I {q 1 ,...,qn} or simply I to denote identity in 2 n dimensional space for all natural numbers n.
The multi-qubit systems can exhibit entanglement, meaning that states of qubits are correlated, e.g. in 1 √ 2 (|00⟩ + |11⟩) which is one of the so-called Bell pairs.Here, a measurement of the first qubit in the computational basis results in 0 (leaving the state |00⟩) with probability 1 2 and in 1 (leaving the state |11⟩) with probability 1 2 .In both cases a subsequent measurement of the second qubit in the same basis gives the same result as the first measurement with probability 1.The effect also occurs if the entangled qubits are physically separated.Because of this, states with entangled qubits cannot be written as a tensor product of single-qubit states.
States of quantum systems can also be described by density matrices or density operators.In contrast to the vector description of states, density matrices allow to describe the states of open systems.A density operator in a Hilbert space H is a linear operator ρ on it, such that |ψ⟩ † ρ|ψ⟩ ≥ 0 for all |ψ⟩ and tr(ρ) = 1, where the trace tr(ρ) is the sum of elements on the main diagonal of the matrix ρ.A positive operator ρ is called a partial density operator if tr(ρ) ≤ 1.We write D(H) for the set of (partial) density operators on H.For every state |ψ⟩ in the above described vector representation, we obtain the corresponding density matrix by the outer product |ψ⟩⟨ψ| = |ψ⟩|ψ⟩ † .For example, consider again the 2-qubit system in general state |ψ⟩ = α|00⟩ + β|01⟩ + γ|10⟩ + δ|11⟩ which corresponds to the vector (α, β, γ, δ) T .
The corresponding density matrix is given as: where the adjoint |ψ⟩ † = α, β, γ, δ is the conjugate transpose of |ψ⟩.Here, x denotes the complex conjugate of x.For real numbers a and b, the complex conjugate of a + ib is a − ib.Such states, i.e., states that result from the outer product of a vector with itself, are called pure states.Additionally, density matrices can represent mixed states, that arise either when the system is not fully known or when one wants to describe a system which is entangled with another.Every density matrix can be represented as i p i |ψ i ⟩⟨ψ i |, called sum representation, i.e., by an ensemble of pure states |ψ i ⟩ with their probabilities p i ≥ 0 and i p i = 1.
We often use density matrix to refer to a state of a potentially open system and call the transformations on these states super-operators.Note that unitary transformations can only describe transitions in closed systems.Super-operators are strictly more expressive, since they can also express interaction with an (unknown) environment.Example 6.1 in Section 6 presents a super-operator that does not resemble any unitary transformation.This super-operator can be used to model a specific kind of noise in quantum communication.Intuitively, noise is a form of partial entanglement with an unkown environment.Note that the channels that are used to transfer qubit-systems in CQP, CQS, qCCS, and OQS, are modelled as noise-free channels, i.e., noise has to be added explicitly by respective super-operators as discussed in [YFDJ09].There are different ways to define super-operators, e.g.via the sum representation.
Definition 2.1 (Super-Operator, Operator-Sum Representation, [NC10]).Let ρ be the initial state of a system, |e 1 ⟩, . . ., |e n ⟩ be an orthonormal basis for the (finite dimensional) state space of the environment, and ρ env = |e 0 ⟩⟨e 0 | be the initial state of the environment.A super-operator E(ρ) on the system ρ is an operator E which is defined as , where E i = ⟨e i |U |e 0 ⟩ is an operator on the state space of the system.Thereby, the operators {E i } are known as operation elements for the quantum operation E, which have to satisfy Then, by [YFDJ09], {M m } is a collection of measurement operators.We usually let m refer to the measurement outcome.For each . Then E m is a super-operator, which is not necessarily trace-preserving, whereas E is a trace-preserving super-operator (see Example 2.5 in [YFDJ09]).
According to [NC10] the equation where tr env () is a partial trace over the environment to obtain the reduced state of the system.Within this equation it is assumed, that the environment starts in a pure state.This assumption can be made without loss of generality, since we are free to introduce an extra system purifying the environment, if it starts in a mixed state.Another assumption made within this equation is that the system and the environment start in a product state.This is not true in general, as quantum systems constantly interact with their environment by which correlations are created.Nonetheless, in many cases of practical interest it is reasonable to make this assumption, as by bringing a quantum system to a specific state these correlations are destroyed, leaving the system in a pure state.We refer to [NC10] for further informations on super-operators.

Process Calculi
A process calculus is a language L = ⟨C, −→⟩ that consists of a set of configurations C (its syntax) and a relation −→: C × C on configurations (its reduction semantics).To range over the configurations we use the upper case letters C, C ′ , . ... Further, a configuration C contains a term out of the set of (process) terms P on which we range over using the upper case letters P, Q, P ′ , . ...
Assume three pairwise distinct countably-infinite sets N of names, V of qubit variables, and B of variables for binary numbers.We use lower case letters to range over names a, c, . .., qubits names q, q ′ , x, y, . .., binary numbers b, b ′ , . .., and variables for binary numbers v, v ′ , . ... We write bv, bv ′ , . . .for objects that are either a binary number or a variable for binary numbers.Let τ / ∈ V ∪ N ∪ B. The scope of a name defines the area in which this name is known and can be used.It can be useful to restrict this scope, for example to forbid interactions between two processes or with an unknown and, hence, potentially untrusted environment.While names with a restricted scope are called bound names, the remaining ones are called free names.
The syntax of a process calculus is usually defined by a context-free grammar defining operators, i.e., functions op : P n → P with n ≥ 0. An operator of arity 0 is a constant.The semantics of a process calculus is given as a structural operational semantics consisting of inference rules defined on the operators of the language [Plo04].The semantics is provided often in two forms, as reduction semantics and as labelled transition semantics.We assume that at least the reduction semantics is given, because its treatment is easier in the context of encodings.As we naturally extend the definition of the syntax to configurations, a (reduction) step, written as C −→ C ′ , is a single application of the reduction semantics where C ′ is called derivative.Let C −→ denote the existence of a step from C. We write C −→ ω if C has an infinite sequence of steps and =⇒ to denote the reflexive and transitive closure of −→.
To reason about environments of terms, we use functions on process terms called contexts.More precisely, a context C ([•] 1 , . . ., [•] n ) : P n → P with n holes is a function from n terms into one term, i.e., given P 1 , . . ., P n ∈ P, the term C (P 1 , . . ., P n ) is the result of inserting P 1 , . . ., P n in the corresponding order into the n holes of C. We naturally extend the definition of contexts to configurations, i.e., consider also contexts A substitution is a finite mapping on either names or qubits or variables for binary numbers defined by a non-empty set {h 1 /g 1 , . . ., h n /g n } = {h 1 , . . ., h n /g 1 , . . ., g n } of renamings, where the g 1 , . . ., g n are pairwise distinct.The application P {h 1 /g 1 , . . ., h n /g n } of a substitution on a term is defined as the result of simultaneously replacing all free occurrences of g i by h i for i ∈ {1, . . ., n}, possibly applying α-conversion to avoid capture or name clashes.For all names in N \ {g 1 , . . ., g n } or qubits in V \ {g 1 , . . ., g n } or variables in B \ {g 1 , . . ., g n } the substitution behaves as the identity mapping.Substitutions on qubits additionally cannot translate different qubits to the same qubit, since this might violate the no-cloning principle.More on substitutions of qubits can be found, e.g. , in [YFDJ09].We naturally extend substitutions to mappings that instantiate variables for binary numbers by binary numbers.We equate terms and configurations modulo alpha conversion on (qubit) names.
For the last criterion of [Gor10] in Section 4, we need a special constant ✓, called success(ful termination), in both considered languages.Therefore, we add ✓ to the grammars of both languages without explicitly mentioning them.Success is used as a barb, where C↓ ✓ if the term contained in the configuration C has an unguarded occurrence of ✓ and to implement some form of (fair) testing.

3.1.
A Calculus for Closed Quantum Systems.Communicating Quantum Processes (CQP) is introduced in [GN05].CQP is further studied e.g. in [DGNP12] to study quantum error correction, in [FGP13,FGP14] to describe and analyse linear optical quantum computing, or in [GP12], where it is extended to be able to describe d-dimensional quantum systems.
As indicated in Section 1, we build CQS by inheriting some ideas of CQP.However, the resulting language CQS is strictly less expressive than CQP.We simplify the definition of CQP by removing name passing and contexts, the additional layer on expressions in the syntax and semantics, do not allow to construct channel names from expressions, and by using a monadic version of communication in that only qubits can be transmitted.Then we add a standard conditional operator, that allows to compare two binary numbers.CQP in [GN05] does not have such a conditional, but as stated in footnote 3 in [GN05] the language can easily be extended by an operator to test the result of measurement-just as the conditional we add here.We claim, however that the treatment of qubits, in particular the manipulations of the quantum register as well as the communication of qubits, is the same as in CQP.Let b(i) return the binary number representing the natural number i. CQS configurations C C are given by (σ; ϕ; P ) or ⊞ 0≤i<2 r p i • (σ i ; ϕ; P {b(i)/v}), where σ, σ i have the form q 0 , . . ., q n−1 = |ψ⟩ with |ψ⟩ = 2 n −1 i=0 α i |ψ i ⟩, r ≤ n, ϕ is the list of channels in the system, and P ∈ P C .
The syntax of CQS is π-calculus like.The inactive process is denoted by 0 and P | P defines parallel composition.A term c?[x].P receives a qubit q ∈ V over channel c ∈ N and proceeds as P {q/x}.Similarly, c![x].P first sends a qubit x ∈ V over channel c ∈ N before proceeding as P .The term {x * = U }.P applies the unitary transformation U to the qubits in sequence x and then proceeds as P .The process (v := measure x).P measures the qubits in x with |x| > 0 and saves the result in the variable v for binary numbers.The terms (new c)P and (qubit x)P create a fresh, global channel a ∈ N and a fresh qubit q n ∈ V (for a quantum register σ = q 0 , . . ., q n−1 ) and then proceed as P {a/c} and P {q n /x}, respectively.
The variable x ∈ V is bound in P by c?[x].P and (qubit x)P .Similarly, the variable v ∈ B is bound in P by (v := measure x).P and the variable c ∈ N is bound in P by (new c)P .A variable is free if it is not bound.Let fq(P ), fc(P ), and fv(P ) denote the sets of free qubits, free channels, and free variables for binary numbers in P , respectively.
The semantics of CQS is defined by the reduction rules in Figure 1.These rules are inspired by the semantics of CQP in [GN05] but do not require a second layer for expressions, since we simplified the syntax, and drop the label of Rule (R-Prob CQS ).Accordingly, CQS in contrast to CQP does not have a probabilistic transition system, but replaces probabilistic steps by non-deterministic steps.We do that, because the encodability criteria that we study here (see Section 4) do not consider probabilistic transitions systems.We discuss this issue in Section 7.Moreover, we add the Rule (R-Cond CQS ) to reduce conditionals.Rule (R-Measure CQS ) measures the first r qubits of σ, where σ = α As a result a probability distribution over the possible base vectors is generated, where σ ′ m is the accordingly updated qubit vector and b(m) is the respective measurement outcome.Rule (R-Trans CQS ) applies the unitary transformation U on the first r qubits.In contrast to [GN05], we explicitly list in the subscript of I the qubits it is applied to.As the rules (R-Measure CQS ) and (R-Trans CQS ) operate on the first r qubits within σ, Rule (R-Perm CQS ) allows to permute the qubits in σ.Thereby, π is a permutation and is the corresponding unitary operator.The Rule (R-Prob CQS ) reduces a probability distribution with r > 0 to a single of its configurations (σ j ; ϕ; P {b(j)/v}) with non-zero probability p j .In contrast to [GN05] we drop the label indicating the probability p j of the chosen case.The rules (R-New CQS ) and (R-Qbit CQS ) create new channels and qubits and update the list of channel names or the qubit vector.Thereby, a new qubit is initialised to |0⟩ and |ψ⟩ ⊗ |0⟩ is reshaped into a 2 n+1 -vector.The Rule (R-Comm CQS ) defines communication in the style of the π-calculus.Rule (R-Par CQS ) allows reduction to take place under parallel contexts and Rule (R-Cong CQS ) enables the use of structural congruence as in the π-calculus.The structural congruence of CQS is defined, similarly to [GN05], as the smallest congruence containing α-equivalence that is closed under the following rules: As CQP also CQS is augmented with a type system to ensure that two parallel components cannot share access to the same qubits, which is the realisation of the no-cloning principle of qubits in CQP.We use a very simple type system compared to [GN05], which is possible since we significantly simplified CQS in comparison to CQP and since we require the sets N , V, and B to be pairwise distinct.Remember that we equate configurations and terms modulo alpha conversion.We use this in the type system to ensure that there are no name clashes, i.e., that no two bound variables have the same name and no bound variable has the same name as a free variable.We extend this convention to also require that no variable of a qubit has the name q i for any natural number i such that (R-Qbit CQS ) does not cause name clashes.The CQS types, denoted by T C , are given by: The data type Bin is used for binary numbers.The type Op(n) is used for unitary transformations that are applied to n qubits.
Type judgements for processes are of the form Σ ⊢ P , where Σ is a set of qubit names and P ∈ P C .The set Σ is supposed to contain all free qubit names in the process as we show in Lemma 3.2.A type judgement Σ ⊢ P holds if it can be derived from the rules in Figure 2.These rules are inspired by [GN05].By Rule (T-Par) parallel processes do not use the same qubits, since they can be typed w.r.t. to distinct sets Σ 1 and Σ 2 .Rule (T-In) checks that the variable used in inputs is from V but not yet known to the continuation P , i.e., not in Σ.Conversely, (T-Out) ensures that the transmitted qubit x in outputs was known before, i.e., in x ∈ V ∪ Σ, but is no longer available to the continuation P after sending it away.To ensure the latter, P is checked against Σ \ {x}.Rule (T-Qbit) checks whether the new qubit x was not known before by x ∈ V \ Σ and then adds x to Σ for the analyse of the remaining process.The remaining rules are self-explanatory.
We show three properties of the type system.Since the focus of this paper is on encodability criteria and not type systems of process calculi, the proofs of these properties Typing Rules for CQS can be found in the Appendix A. First we capture the intuition behind Σ, as capturing at least all free qubit names of a process.
Then we have the standard preservation property.
Finally, Lemma 3.2 ensures the no-cloning principle for well-typed CQS-terms, since their parallel components cannot have access to the same qubit.With Lemma 3.3 the principle is then also preserved in all derivatives.
Note that Lemma 3.4 is an adaptation of the Theorem 2 in [GN05]-that there ensures the no cloning principle-to the present simpler type system.
As an example in CQS we consider an implementation of the quantum teleportation protocol [BBC + 93].The quantum teleportation protocol is a procedure for transmitting a quantum state via a non-quantum medium.This protocol is particularly important: not only it is a fundamental component of several more complex protocols, but it is likely to be a key enabling technology for the development of the quantum repeaters [DRMT + 04] which will be necessary in large-scale quantum communication networks.The following example is an adaptation of the quantum teleportation example in Figure 3 of [GN05] adapted to CQS.Note that the original quantum teleportation protocol in [BBC + 93, GN05] does not require to transmit qubits but only two bits of classical information obtained from measuring qubits.Since we stripped CQS from the ability to transmit classical information, we have to cheat in the following example.After measuring the relevant qubits, the qubits themselves and not the result of their measurement is transmitted.However, since measurement transfers the respective qubits into base states, the respective communication does not carry any additional information than the result of measurement.Of course the relevance of quantum teleportation steams from the fact that the original protocol does not need to transfer qubits.

Example 3.5 (Quantum Teleportation). Consider the CQS-configuration
where System(q 0 , q 1 , q 2 ) = (new c) (Alice(q 0 , q 1 ) | Bob(q 2 )) Alice(q 0 , q 1 ) = {q 0 , q 1 * = CNOT}.{q0 * = H}.(v0 := measure q 0 , q 1 ).c Alice and Bob each possess one qubit (q 1 for Alice and q 2 for Bob) of an entangled pair in state 1 . q 0 is the second qubit owned by Alice.Within this example it is in state |1⟩, but in general it can be in an arbitrary state.It is the qubit whose state will be teleported to q 2 and therefore to Bob.
By Figure 1, S can do the following steps All configurations within the probability distribution in S * have the same probability.We can e.g.choose the first one by using Rule (R-Prob CQS ) with |ψ 3 ⟩ = q 0 , q 1 , q 2 = |001⟩.

3.2.
A Calculus for Open Quantum Systems.The algebra of quantum processes (qCCS) is first introduced in [FDJY07] and further investigated e.g. in [YFDJ09, FDY12, YKK14] as a process calculus for quantum based systems and to study observational equivalences in the quantum setting or in [KKK + 12, KKK + 13] to study quantum crypto protocols.As qCCS is designed to model open systems, its states are described by density matrices or operators.We are mainly interested in the variant of qCCS presented in [YFDJ09], because it has the rare feature of introducing a quantum based calculus without a probabilistic transition system.Indeed earlier as well as later variants of qCCS e.g. in [FDJY07,FDY12] use probabilistic transition systems.The main reason for probabilistic transition systems in most quantum based systems is measurement, since its outcome is often a probability distribution.In [YFDJ09] measurement can be performed by a super-operator and the resulting probability distribution on potentially different measurement results is captured in the density matrix that represents the state after measurement.Since they refrain from providing a measurement-operator, they can introduce a non-probabilistic transition system.Unfortunately, without a separate operator for measurement there is no way in [YFDJ09] to directly get the results of measurement; although the resulting alteration of the state does of course influence the further behaviour.Remember that the state of a qubit cannot be read but only measured, so it is not possible to extract this information directly from the state after measurement.Because of that, we add for OQS an additional operator, a conditional to compare binary numbers and the outcome of measurement, to the syntax of qCCS as presented in [FDJY07].The OQS configurations C O are given by ⟨P, ρ⟩, where P ∈ P O and ρ ∈ D(H).
Process constants A(x), where x = x 1 , . . ., x n is a sequence of pairwise distinct quantum variables, allow recursive definitions of terms.An inactive process is denoted by nil and the term τ.P executes the silent action and proceeds as P .The application of a super-operator E on the qubits in the finite set X ⊆ V is performed by the term E[X].P .The terms c?x.P and c!x.P model input and output on channel c ∈ N to transfer a single qubit x ∈ V. Choice and parallel composition are obtained from CCS and given by P + P and P ∥ P .The term P \ L restricts the scope of all channels within L ⊆ N to P .Finally, the conditional if bv = e then P continues as P if either bv and e are the same binary number or bv is the binary number that results from measuring w.r.t. the standard basis the finite set of qubits X ⊆ V. We use M to denote the super-operator for measurement in the standard base.
By slightly abusing notation, we use V to also denote the current set of qubit names of a given density matrix ρ.The variable x is bound in P by c?x.P and the channels in L are bound in P by P \ L. A variable/channel is free if it is not bound.Let fc(P ) and fq(P ) denote the sets of free channels and free qubits in P , respectively.For each process constant scheme A, a defining equation A(x) , we require the following two conditions: c!x.P ∈ P O implies x / ∈ fq(P ) (Cond1) These conditions ensure the no-cloning principle of qubits within qCCS and OQS.
The semantics of OQS is defined by the inference rules in Figure 3.We start with a labelled variant of the semantics from [YFDJ09] for qCCS, add the Rule (Cond OQS ) for the new conditional, and then add the Rule (Red OQS ) to obtain a reduction semantics.We omit the symmetric forms of the rules (Choice OQS ), (Intl OQS ), and (Comm OQS ).Let cn(α) return the possibly empty set of channels in the label α.
Rule (Oper OQS ) implements the application of a super-operator E. It updates the state of the configuration by applying E. To simplify the definition of a reduction semantics, we use (in contrast to [YFDJ09]) the label τ .
Rule (Input OQS ) ensures that the received qubits are fresh in the continuation of the input.The rules (Intl OQS ) and its symmetric rule (Intr OQS ) forbid to receive qubits within parallel contexts that do posses this qubit.Rule (Res OQS ) allows to do a step under a restriction.Rule (Cond OQS ) allows a step of the continuation of a conditional if its condition is satisfied.Therefore either b and e need to be the same binary number and then the state ρ is not updated or e = M[X] and b is one of the binary numbers that results from measuring in the standard basis the qubits in X in the state ρ with non-zero probability.In the latter case the state ρ has to be updated according to the measurement operation.For instance if ρ is a 2-qubit system with the qubits q 0 , q 1 in state |0⟩⟨0| ⊗ |1⟩⟨1| then if 01 = M[q 0 , q 1 ] then τ.nil −→ nil but if b = M[q 0 , q 1 ] then P cannot reduce for any b ̸ = 01.Note that to decide whether b ∈ M[X]{ρ} the system indeed has to measure the qubits; it is not sufficient to apply any super-operator on ρ even if it has the same effect on ρ as measurement.Since we cannot read the qubit we have to measure it, to learn anything about its state.The other rules are self-explanatory.
Similar to CQS, structural congruence for OQS is the smallest congruence containing α-equivalence that is closed under the following rules: Moreover, ⟨P, ρ⟩ ≡ ⟨Q, ρ⟩ if P ≡ Q or if ⟨Q, ρ⟩ is obtained from ⟨P, ρ⟩ by alpha conversion on the qubit names in V.

Encodings and Quality Criteria
Let L S = ⟨C S , −→ S ⟩ and L T = ⟨C T , −→ T ⟩ be two process calculi, denoted as source and target language.An encoding from L S into L T is a function • : C S → C T .We often use S, S ′ , . . .and T, T ′ , . . . to range over C S and C T , respectively.
To analyse the quality of encodings and to rule out trivial or meaningless encodings, they are augmented with a set of quality criteria.In order to provide a general framework, Gorla in [Gor10] suggests five criteria well suited for language comparison.They are divided into two structural and three semantic criteria.The structural criteria include (1) compositionality and (2) name invariance.The semantic criteria are (3) operational correspondence, (4) divergence reflection, and (5) success sensitiveness.We start with these criteria for classical systems.
Note that a behavioural relation ⪯ on the target is assumed for operational correspondence.Moreover, ⪯ needs to be success sensitive, i.e., T 1 ⪯ T 2 implies T 1 ⇓ ✓ iff T 2 ⇓ ✓ .As discussed in [PvG15], we pair operational correspondence as of [Gor10] with correspondence simulation.
T 1 and T 2 are correspondence similar, denoted as T 1 ⪯ T 2 , if a correspondence simulation relates them.
Intuitively, an encoding is compositional if the translation of an operator is the same for all occurrences of that operator in a term.Hence, the translation of that operator can be captured by a context that is allowed in [Gor10] to be parametrised on the free names of the respective source configuration.Definition 4.2 (Compositionality, [Gor10]).The encoding • is compositional if, for every operator op with arity n of L S and for every subset of names N , there exists a context Name invariance ensures that encodings are independent of specific variables in the source.In [Gor10] name invariance is defined modulo a so-called renaming policy.Since our encoding in Section 5 translates variables to themselves and name invariance is not relevant for the separation result in Section 6, we do not need a renaming policy.This simplifies the definition of name invariance such that an encoding is name invariant if it preserves and reflects substitutions.Definition 4.3 (Name Invariance).The encoding • is name invariant if, for every S ∈ C S and every substitution γ on names, it holds that Sγ = S γ.
The first semantic criterion is operational correspondence.It consists of a soundness and a completeness condition.Completeness requires that every computation of a source term can be emulated by its translation.Soundness requires that every computation of a target term corresponds to some computation of the corresponding source term.
Definition 4.4 (Operational Correspondence, [Gor10]).An encoding • is operationally corresponding w.r.t.⪯ if it is: Complete: For all S =⇒ S ′ , there exists T such that S =⇒ T and S ′ ⪯ T .Sound: For all S =⇒ T , there exists S ′ , T ′ such that S =⇒ S ′ , T =⇒ T ′ , and The next criterion concerns the role of infinite computations.
The last criterion links the behaviour of source terms to the behaviour of their encodings.Success sensitiveness requires that source configurations reach success if and only if their literal translations do.Definition 4.6 (Success Sensitiveness, [Gor10]).• is success sensitive if, for every S, S⇓ ✓ iff S ⇓ ✓ .
Moreover, ⪯ needs to be success sensitive, i.e., T 1 ⪯ T 2 implies T 1 ⇓ ✓ iff T 2 ⇓ ✓ , as required by Definition 4.1.Without this requirement the relation that is induced-as described in [PvG15,Pet19]-by operational correspondence between the source and target is trivial without some notion of barbs.To some up, we use the following notion of good encoding, where good refers to classical criteria only.
Definition 4.7 (Classical Criteria).The encoding • is good, if it is compositional, name invariant, operational corresponding w.r.t.⪯, divergence reflecting, and success sensitive, where ⪯ is success sensitive.
There are several other criteria for classical systems that we could have considered (cf.[Pet19]).Since CQS is a typed language, we may consider a criterion for types as discussed e.g. in [KPY16].As only one language is typed, it suffices to require that the encoding is defined for all terms of the source language.We could also consider a criterion for the preservation of distributability as discussed e.g. in [PNG13], since distribution and communication between distributed locations is of interest.Indeed our encoding satisfies this criterion, because it translates the parallel operator homomorphically.However, already the basic framework of Gorla, on that we rely here, suffices to observe principal design principles of quantum based systems as we discuss with the no-cloning property in Section 7.
adds a new qubit q |V| initialised with 0 to the current state ρ.
The translation of configurations maps the vector σ to the density matrix ρ σ (obtained by the outer product) and restricts all names in ϕ to the translation of the sub-term.In the translation of probability distributions, the state ρ ⊞ is the sum of the density matrices obtained from the σ i multiplied with their respective probability.Again, the names in ϕ are restricted in the translation.The nondeterminism in choosing one of the possible branches of the probability distribution in CQS by (R-Prob CQS ) is translated into the OQS-choice D(q; v; P ) with q = q 0 , . . ., q r−1 , where each case is guarded by a conditional to compare to a possible outcome of measurement followed by the continuation with a substitution to hand the result of measurement to the process.Note that, the translation of a configuration (σ; ϕ; P ) is a special case of the second line.A practical motivated encoding example using such a OQS-choice is given in Example 5.15.
The application of unitary transformations and the creation of new qubits are translated to the corresponding super-operators.Measurement is translated into the super-operator for measurement followed by the choice D(q; v; P ) over the branches of the possible outcomes of measurement, i.e., after the first measurement the translation is similar to the translation of a probability distribution in the second case.Note that we measure twice in this translation.The outer measurement-that is a super-operator for measurement-dissolves entanglement on the measured qubits and ensures that the density matrix after this first measurement is the sum of the density matrices of the respective cases in the distribution (compare with ρ ⊞ and Example 5.2).The measurements within D(q; v; P )-that are not performed by a super-operator but require to indeed physically measure the qubits-then check whether the respective case i occurs with non-zero probability and adjust the density matrix to this result of measurement if case i is picked.The creation of new channel names is translated to restriction, where a τ -guard simulates the step that is necessary in CQS to create a new channel.The restriction ensures that this new name cannot be confused with any other translated source term name.Since in the derivative of a source term step creating a new channel the new channel is added to ϕ in the configuration, we restrict all channels in ϕ.A condition in CQS is translated to a conditional in OQS.We add a τ to guard the continuation of the conditional in the target, since resolving a conditional in CQS (in contrast to OQS) requires a step.The remaining translations are homomorphic.
By Definition 5.1, S = ⟨(M[q 0 ].D(q 0 ; v; P )) \ ϕ, ρ⟩ with ρ = |ψ⟩⟨ψ|.By the rules (Oper OQS ) and (Red OQS ) in Figure 3, then S −→ T = ⟨D(q 0 ; x; P ) \ ϕ, M q 0 (ρ)⟩.Accordingly, the probability distribution in S ′ is mapped on a choice in T .The outer measurement M[q 0 ] resolves the entanglement and yields a density matrix that is the sum of the density matrices of the choice branches, i.e., M q 0 (ρ By analysing the encoding function, we observe that for all source terms the type system of CQS ensures that their literal translation satisfies the conditions Cond1 and Cond2.Hence, the encoding is defined on all source terms.
Corollary 5.3.For all S ∈ C C the term S is defined.
Before we can start to prove the quality of our encoding, i.e., that it satisfies the criteria in Definition 4.7, we have to fix a relation ⪯ on the target language OQS that is used in the definition of operational correspondence in Definition 4.4.We instantiate ⪯ with correspondence similarity as given in Definition 4.1.In the literature, operational correspondence is often considered w.r.t. a bisimulation on the target; simply because bisimilarity is a standard behavioural equivalence in process calculi, whereas correspondence simulation is not.For our encoding, we cannot use bisimilarity.
Example 5.4.Consider S = (σ; c; (v := measure q).P | Q), where S is a 1-qubit system with σ = q = |+⟩ and P, Q ∈ P C with fc(P ) = {c} = fc(Q) and v / ∈ fv(Q).By the rules (R-Measure CQS ) and (R-Par CQS ) of Figure 1, i.e., (R-Par CQS ) pulls the parallel component Q into the probability distribution that results from measuring q.Since our encoding is compositional-and indeed we require compositionality, the translation S behaves slightly differently.By Definition 5.1, S = ⟨(M[q].D(q; v; P ) ∥ Q ) \ {c}, ρ⟩, where here D(q; v; P ) = if 0 = M[q] then τ.P {0/v}+ if 1 = M[q] then τ.P {1/v}, ρ = |+⟩⟨+|, and S ′ = ⟨D(q; v; Unfortunately, S ′ and T are not bisimilar.As a counterexample consider The problem is, that a step on Q in S ′ forces us to immediately pick a case and resolve the choice, whereas after performing the same step on Q in T all cases of the choice remain available.After emulating the first step of Q in S ′ , either we reach a configuration that has to reach success eventually or we reach a configuration that cannot reach success; whereas there is just one way to do the respective step in T and in the resulting configuration success may or may not be reached depending on the next step.Fortunately, S ′ and T are correspondence similar. The encoding • in Definition 5.1 emulates a source term step by exactly one step on the target, except for source term steps on (R-Perm CQS ) that are not emulated at all.Steps on (R-Perm CQS ) are necessary in CQP and CQS, because they assume that unitary transformations and measurement is always applied to the first r qubits.With (R-Perm CQS ) the quantum register is permuted to bring the relevant qubits to the front.In OQS this is not necessary.Lemma 5.5 captures this observation, by showing that the translation of source term steps on (R-Perm CQS ) are indistinguishable in the target modulo ⪯.
Since structural congruence is defined similarly on CQS and OQS, does consider in both cases only alpha conversion, the inactive process, and parallel composition, and since • translates the inactive process and parallel composition homomorphically, the encoding preserves structural congruence.
Proof.By straightforward induction on the rules of structural congruence.
By [Gor10], good encodings are allowed to use a renaming policy that structures the way in that the translations of source term names are used in target terms and how to treat names that are introduced by the encoding function.The encoding • simply translates names by themselves and does not introduce any other names.Because of that, we can choose the identity relation as renaming policy and are able to prove a stronger variant of name invariance.Note that, name invariance considers substitutions on names only.

Case (R-Comm
and q is fresh.The corresponding encodings are given by the following terms , where σ = q 0 , . . ., q n−1 = |ψ⟩, σ ′ i = q 0 , . . ., q n−1 = |ψ ′ i ⟩, q = q 0 , . . ., q r−1 , r = |q| ≤ n, and v is fresh in Q.By the induction hypothesis, there is some T P ∈ C O such that S P =⇒ T P and S ′ P ⪯ T P .Then either (1) r = 0 and because there is just one case in the probability distribution, or (2) r > 0 and the probability distribution in S ′ P contains more than one case: (1) The corresponding encodings are given by and Since S P =⇒ T P contains at most one step, so does S =⇒ T .Finally, we show that S ′ P ⪯ T P implies S ′ ⪯ T : Then either Q performs a step on its own, P ′ does a step on its own, or they perform a communication step together.In the second and third case, S ′ P ⪯ T P ensures that for every there is some Then either Q performs a step on its own, T ′ P does a step on its own, or they perform a communication step together.In the second and third case, S ′ P ⪯ T P ensures that for every • Since correspondence simulation is stricter than weak trace equivalence, S ′ and T have the same weak traces and thus S ′ ⇓ ✓ iff T ⇓ ✓ .(2) Since v is fresh in Q, the corresponding encodings are given by where ρ = |ψ⟩⟨ψ| and ρ ′ = i p i |ψ ′ i ⟩⟨ψ ′ i |.Since S ′ P ⪯ T P , then T P = ⟨D(q; v; T ′ P ) \ ϕ ′ , ρ ′ ⟩ for some T ′ P .By the Rule (Red OQS ) in Figure 3, S P =⇒ T P implies S P τ − −→ . . .τ − −→ T P and, by Rule (Res OQS ), then ⟨ P , ρ⟩ =⇒ ⟨D(q; v; T ′ P ), ρ ′ ⟩.Then S can emulate the step S −→ S ′ using the sequence ⟨ P , ρ⟩ =⇒ ⟨D(q; v; T ′ P ), ρ ′ ⟩ and the rules (Intl OQS ) and (Res OQS ) by Since S P =⇒ T P contains at most one step, so does S =⇒ T .Finally, we show that S ′ P ⪯ T P implies S ′ ⪯ T : Then this step reduces the choice to one branch with non-zero probability with (Cond OQS ) and (Choice OQS ) and in this branch the respective super-operator to adjust the density matrix to the chosen result of measurement with (Oper OQS ), i.e., α = τ and C 1 = ( P ′ {b(j)/v} ∥ Q ) \ ϕ ′ , E b(j),q (ρ ′ ) for some 0 ≤ j < 2 r with p j ̸ = 0, where E b(j),q is measurement with the expected result b(j) and will adapt the state of the measured qubits to b(j).Then Then either the choice on the left is reduced or Q performs a step on its own.
In the former case, Because of Lemma 5.9 and ⟨D(q; v; P ′ ) \ ϕ ′ , ρ ′ ⟩ = S ′ P ⪯ T P = ⟨D(q; v; T ′ P ) \ ϕ ′ , ρ ′ ⟩, then we pick Then we pick an arbitrary case 0 ≤ j < 2 r of the probability distribution with non-zero probability p j ̸ = 0 such that S ′ −→ ( where ρ ′′′ is the result of applying the transformation on the matrix in the step T α − −→ C ′ 1 (if there is any) to the density matrix E b(j),q (ρ ′ ).Because of the non-cloning principle, applying the super-operator E b(j),q on ρ ′′ again yields ρ ′′′ , because E b(j),q and the super-operator (if any) applied in • Since correspondence simulation is stricter than weak trace equivalence, S ′ and T have the same weak traces and thus , where σ = q 0 , . . ., q n−1 = |ψ⟩ and σ ′ i = q 0 , . . ., q n−1 = |ψ ′ ⟩.By Lemma 5.6, Q ≡ P implies S ≡ S P and P ′ ≡ Q ′ implies S ′ P ≡ S ′ .By the induction hypothesis, there is some T P ∈ C O such that S P =⇒ T P is a sequence of at most one step and S ′ P ⪯ T P .Because of S ≡ S P , i.e., S P ⪯ S , then there is some T ∈ C O such that S =⇒ T is a sequence of at most one step and T P ⪯ T .Because of S ′ P ≡ S ′ , i.e., S ′ ⪯ S ′ P , then S ′ ⪯ S ′ P ⪯ T P ⪯ T , i.e., S ′ ⪯ T .
Then T = S ′ , i.e., S ′ ⪯ T .Since T = S ′ , then S ′ ⪯ T .Finally, the lemma follows from an induction over the number of steps in S =⇒ S ′ .In the opposite direction, i.e., for soundness, we show that every target term step is the result of emulating a source term step.Thereby, the formulation of soundness allows to perform-after some initial steps S =⇒ T that need to be mapped to the source-some additional steps T =⇒ T ′ , to catch up with a source term encoding S ′ .To avoid the problem described in Example 5.4, we use these additional steps on the target to resolve all unguarded choices as they result from translating probability distributions.Accordingly, the sequence S =⇒ S ′ contains the mapping of the steps in S =⇒ T , steps to resolve probability distributions to map the steps in T =⇒ T ′ , and some additional steps on Rule (R-Perm CQS ) to permute qubits.The last kind of steps is necessary in the source to prepare for applications of unitary transformations and measurement, i.e., these steps surround in S =⇒ S ′ the corresponding mappings of steps in S =⇒ T that apply the super-operators for unitary transformations or measurement.
Proof.We strengthen the proof goal by replacing ⪯ with equality: Moreover, we require that either S ′ = S or S ′ is not a probability distribution with r > 0 and that every step in the sequence T =⇒ S ′ reduces a choice.Then the proof is by induction on the number of steps in S =⇒ T .The base case for zero steps, i.e., T = S , holds trivially by choosing S ′ = S.For the induction step, assume S =⇒ T * −→ T .By the induction hypothesis, there is some S * * such that S =⇒ S * * and T * =⇒ S * * , where S * * is not a probability distribution and in T * =⇒ S * * only choices are reduced.Let S * * = (σ * * ; ϕ * * ; P * * ) with σ * * = q 0 , . . ., q n * * −1 = |ψ * * ⟩.Then there is some S ′ such that S * * −→ S ′ = (σ * * ; ϕ * * ; P ′ cond ), where P ′ cond is obtained from P * * by replacing if bv = bv ′ then P cond with P cond .Then S =⇒ S ′ .Since T * −→ T is not in conflict with any of the steps of T * =⇒ S * * , T =⇒ S ′ performs the sequence T * =⇒ S * * starting in T instead of T * .(c) By Definition 5.1, then the τ guards the subterm of a conditional within a choice.
Since T * =⇒ S * * and S * * is not a probability distribution (with r > 0), then T * =⇒ S * * reduces this choice but not necessarily to the case j that contains the considered τ guard.Accordingly, S =⇒ S * * contains a step that reduces the corresponding probability distribution, where the respective branch is not further reduced because T * =⇒ S * * reduces only choices.Then we replace in S =⇒ S * * and T * =⇒ S * * the respective steps reducing the probability distribution and the choice in question by a step that reduces this probability distribution and this choice to case j.Note that, because T * −→ T measures q, case j has a non-zero probability.Finally, we reorder the steps on the target such that S =⇒ S ′ and T * −→ T =⇒ S ′ , where S ′ is obtained from S * * by adapting the chosen branch to case j.Note that this is the only case, in that the state of S ′ is not σ * * , because the adaptation of the branch to case j also requires to adapt the state accordingly.(2) By Definition 5.1, one of the following super-operators was reduced: Case of U [q]: By Definition 5.1, U [q] cannot guard a branch of a choice nor can U [q] guard the subterm of a conditional.Then T * contains an unguarded subterm .T U that is reduced in the step T * −→ T .Because of Definition 5.1 and since T * =⇒ S * * reduces only choices, then S * * contains an unguarded subterm {q * = U }.P U that was translated into U [q].T U .Then there are some S perm , S U , S ′ such that S * * −→ S perm −→ S U −→ S ′ = (σ ′ ; ϕ * * ; P ′ U ), where S * * −→ S perm is by Rule (R-Perm CQS ) and permutes the qubits in q to the front using a permutation π, S perm −→ S U performs the unitary transformation, S U −→ S ′ permutes the qubits back to their original order, σ ′ = Π U ⊗ I {q |q| ,...,q n−1} (Π|ψ * * ⟩) = |ψ ′ ⟩, and P ′ U is obtained from P * * by replacing {q * = U }.P U with P U .Then S =⇒ S ′ and Since T * −→ T is not in conflict with any of the steps of T * =⇒ S * * , T =⇒ S ′ performs the sequence T * =⇒ S * * starting in T instead of T * .Case of M[q]: By Definition 5.1, M[q] cannot guard a branch of a choice nor can M[q] guard the subterm of a conditional.Then T * contains an unguarded subterm M[q].T M that is reduced in the step T * −→ T .Because of Definition 5.1 and since T * =⇒ S * * reduces only choices, then S * * contains an unguarded subterm (v := measure q).P M that was translated into M[q].T M .Then there are some S perm , S M , S dist , S ′ such that , where S * * −→ S perm is by Rule (R-Perm CQS ) and permutes the qubits in q to the front using a permutation π, S perm −→ S M performs the measurement, S M −→ S dist resolves the resulting probability distribution to an arbitrary case j with non-zero probability, S dist −→ S ′ permutes the qubits back to their original order, v ′ is fresh, σ ′ = |ψ ′ ⟩ is the result of measuring the qubits q in σ * * , and P ′ M is obtained from P * * by replacing (v := measure q).P M with P M {v ′ /v}.Then S =⇒ S ′ .By Lemma 5.9, then , where E b(j),q M q ρ * * sets the system state to ρ ′ = |ψ ′ ⟩⟨ψ ′ |.Since T * −→ T is not in conflict with any of the steps of T * =⇒ S * * , T =⇒ S ′ performs the sequence T * =⇒ S * * starting in T instead of T * and one additional step to reduce the choice that is the outermost operator of T M to case j.
guard the subterm of a conditional.Then T * contains an unguarded subterm of the form E |0⟩ [V].T qbit q |V| /x that is reduced in the step T * −→ T .Because of Definition 5.1 and since T * =⇒ S * * reduces only choices, then S * * contains an unguarded subterm (qubit x)P qbit that was translated into Then there is some S ′ such that S * * −→ S ′ = σ ′ ; ϕ * * ; P ′ qbit q |V| /y , where y is fresh, σ ′ = |ψ * * ⟩ ⊗ |0⟩ = |ψ ′ ⟩, and P ′ qbit is obtained from P * * by replacing (qubit x)P qbit with P qbit {y/x}.Then S =⇒ S ′ .By Lemma 5.8, then S ′ = .P out that were translated into c?x.T in and c!q.T out .Then there is problem discussed in Example 5.4.Indeed [FDY12] introduces probability distributions to qCCS and a corresponding alternative of measurement that allows to translate this operator homomorphically.However, in this study we are more concerned about the quality criteria.Hence using them to compare languages that treat qubits fundamentally differently is more interesting here.Moreover, to tighten the connection we would need a probabilistic version of operational correspondence and accordingly a probabilistic version of bisimulation.Very recently we introduced probabilistic operational correspondence in [SP23].
To illustrate the encoding • on a practical relevant example, we present the translation of the quantum teleportation protocol in Example 3.5.
Since super-operators are more expressive than unitary transformations, an encoding from qCCS or OQS into CQP or CQS is more difficult.
An encoding from qCCS or OQS into CQP or CQS needs to emulate the behaviour of Q[q 1 ].Since CQP and CQS do not allow for super-operators but only unitary transformations and since there is no unitary transformation with the same effect as Q[q 1 ], there is no good encoding from OQS into CQS or qCCS into CQP.To prove this separation result we borrow a technical result from [PNG13].By success sensitiveness, a source term S reaches success if and only if its literal translation S reaches success.As a consequence S cannot reach success if and only if S cannot reach success.The next lemma shows that operational correspondence and success sensitiveness also imply that S must reach success, i.e., reaches success in all finite traces, if and only if S must reach success.Lemma 6.3.For all operationally corresponding, success sensitive encodings • w.r.t.some success respecting preorder ⪯ on the target and for all source configurations S, S must reach success in all finite traces iff S must reach success in all finite traces.Proof.We consider both directions separately.if S must reach success then also S : Assume the opposite, i.e., there is an encoding that satisfies the criteria operational soundness and success sensitiveness, ⪯ is success respecting, and there is some source configuration S such that for all S ′ with S =⇒ S ′ we have S ′ ⇓ ✓ , i.e., S must reach success in all finite traces, but there is some target configuration T such that S =⇒ T and T cannot reach success.Since • is operationally sound, S =⇒ T implies that there exist some S ′′ , T ′′ such that S =⇒ S ′′ , T =⇒ T ′′ , and S ′′ ⪯ T ′′ .Since T cannot reach success and T =⇒ T ′′ , then T ′′ cannot reach success.Since ⪯ respects success, S ′′ ⪯ T ′′ and that T ′′ cannot reach success imply that S ′′ cannot reach success.Because • is success sensitive, then also S ′′ cannot reach success, which contradicts the assumption that S must reach success.We conclude that if S must reach success in all finite traces then S must reach success in all finite traces.if S must reach success then also S: Assume the opposite, i.e., there is an encoding that satisfies the criteria operational completeness and success sensitiveness, ⪯ is success respecting, and there is some source configuration S such that for all T with S =⇒ T we have T ⇓ ✓ , i.e., S must reach success in all finite traces, but there is some source configuration S ′ such that S =⇒ S ′ and S ′ cannot reach success.Since • is operationally complete, S =⇒ S ′ implies that there exists some T ′ such that S =⇒ T ′ and S ′ ⪯ T ′ .Because • is success sensitive and S ′ cannot reach success, then also S ′ cannot reach success.Since ⪯ respects success, S ′ ⪯ T ′ and that S ′ cannot reach success imply that T ′ cannot reach success.Since T ′ cannot reach success and S =⇒ T ′ , this contradicts the assumption that S must reach success.We conclude that if S must reach success in all finite traces then S must reach success in all finite traces.
To prove the non-existence of an encoding from OQS into CQS, we use Q on a 2-quit system as described in Example 6.2 as a counterexample and show that it is not possible in CQS to emulate the behaviour of Q[q 1 ] modulo compositionality, operational correspondence w.r.t. a success respecting preorder, and success sensitiveness.More precisely, since there is no unitary transformation with this behaviour and also measurement or additional qubits do not help to emulate this behaviour on the state of the qubit (see the proof of Theorem 6.4), there is no encoding from OQS into CQS that satisfies compositionality, operational correspondence w.r.t. a success respecting preorder, and success sensitiveness.Theorem 6.4.There is no encoding from OQS into CQS that satisfies compositionality, operational correspondence w.r.t. a success respecting preorder, and success sensitiveness.
Proof.The proof is by contradiction, i.e., we assume that there is an encoding • from OQS into CQS that satisfies compositionality, operational correspondence w.r.t. a success respecting preorder, and success sensitiveness.In OQS we start with a configuration that contains two qubits (represented as a density matrix in ρ).The encoding translates this OQS-configuration into a CQS-configuration such that its state is captured in a vector σ.The encoding may use the qubits inside ρ directly for σ, or it may measure these qubits and uses the information gained in this measurement to construct σ. Remember that it is impossible to determine the exact state of a qubit and hence the entries for the density matrix.Using the original qubits directly results in a 2-qubit vector σ.From measuring the original qubits we cannot gain more than two bit information such that we again capture all the information in a 2-qubit vector σ.In other words, we can assume that the encoding translates a 2-qubit density matrix ρ into a 2-qubit vector σ, because there is no more information available to justify the use of more qubits in CQS, i.e., systems with more qubits won't provide more information.
By compositionality, then there is a where ⟨S 00 , ρ⟩ = (σ; ϕ M ; T 1 ) and σ is the translation of ρ.Since the OQS-configurations in the source are parametric on ρ, the behaviour of the resulting CQS-configurations depends on σ.By operational correspondence and success sensitiveness, these contexts have to behave exactly as their respective sources w.r.t. the reachability of success (including the reachability of success in all finite traces as in Lemma 6.3).Since the behaviour of the translations depends only on σ as input, we can focus on the translation of Q[q 1 ] on the quantum register σ that C Q ([•]) constructs from the input ρ.In CQP as well as CQS the only operators with direct influence on the quantum register are unitary transformations, measurement, and the creation of new qubits.Moreover, e.g. by communication or the probability distributions after measurement CQP-configurations or CQS-configurations can introduce branching and thus provide different results on different branches.
With the creation of new qubits the size of the vector is increased.Intuitively, C Q ([•]) gets as input a 2-qubit vector and has to produce another 2-qubit vector as output, because T 1 − T 6 and C Q ([•]) require a 2-qubit vector.Because of that, the creation of new qubits can only contribute to C Q ([•]) by allowing to set a qubit to |0⟩.Since this can also be done by measurement followed by a bit-flip if 1 was measured, we do not need to consider the creation of new qubits, i.e., this behaviour is subsumed by the other operations.
Note that we consider 2-bit vectors.Measuring one qubit in CQP or CQS creates a probability distribution with two cases that consist of their respective probability, which can be zero, followed by the configuration in the respective case.The overall evolution of closed systems-and CQP and CQS can express only closed systems-can be described by a unitary transformation.Accordingly, for the way in that C Q ([•]) manipulates the 2-qubit vector the only relevant effect of measurement is (1) that it creates branches, (2) that some of these branches might have a zero-probability w.r.t.particular inputs but not necessarily all inputs, and (3) that the evolution of the 2-qubit vector in every of these branches is described by a unitary transformation, at least if we consider as inputs only the values |00⟩, |01⟩, |10⟩, |11⟩, |0+⟩, and There are two sources for branching: either branching results from the probability distribution after measurement or from communication.Since the matrix multiplication of two unitary transformations is again a unitary transformation, sequences of unitary transformations can be abbreviated by a single unitary transformation.Accordingly, if we consider a single branch without measurement in C Q ([•]) from the beginning to the end, the and therefore u 11 = 1 and u 21 = u 31 = u 41 = 0 for all branches, because |00⟩ = (1, 0, 0, 0) T is the only state such that T 1 applied to this state always unguards ✓ and S ce1 (|00⟩⟨00|) must reach success.Repeating this calculation for S ce2 (|01⟩⟨01|), S ce3 (|10⟩⟨10|), and S ce1 (|11⟩⟨11|), we conclude that u ii = 1 for all i ∈ {1, 2, 3, 4} and u ij = 0 for all i, j ∈ {1, 2, 3, 4} with i ̸ = j, i.e., that U = I ⊗ I is identity.But, if we apply this identity transformation U to |0+⟩ we obtain |0+⟩ and T 5 applied in this state cannot reach success, whereas S ce5 (|0+⟩⟨0+|) may reach success.This is a contradiction, i.e., there is no such unitary transformation that emulates Q[q 1 ].Therefore, our assumption that all branches in C Q ([•]) result from communication must be wrong, i.e., ) may consist of a sequence of steps containing several measurements.From S ce1 (|00⟩⟨00|), S ce2 (|01⟩⟨01|), S ce3 (|10⟩⟨10|), and S ce4 (|11⟩⟨11|) it is obvious that measuring the first qubit does not contribute to the implementation of Q[q 1 ].It suffices to consider implementations of C Q ([•]) that measure only the second qubit.More precisely, we consider only the last measurement of the second qubit that is performed in C Q ([•]) in each of its branches.Without loss of generality we can assume that this measurement was performed w.r.t. the standard base, because all other cases can be implemented by a unitary transformation right before the measurement.Then there are two possible outcomes of every last measurement, |0⟩ and |1⟩, i.e., there are two possible branches but one of them might occur with probability zero.As usual we ignore branches that occur with probability zero.All transformations in C Q ([•]) after the last measurement can again be subsumed in a single unitary transformation.Accordingly, C Q ([•]) does perform some arbitrary initial steps that may contain an arbitrary number of measurements and might produce an arbitrary number of branches and each branch with measurement ends with the final measurement of the second qubit that produces one or two branches whose behaviour after the final measurement can be described respectively by a single unitary transformation.
We consider once more the case S ce1 (|00⟩⟨00|).The last measurement of q 2 sets in every branch the qubit q 2 in σ to |0⟩ or |1⟩.Since |00⟩ is the only state such that T 1 applied to this state always unguards ✓ and S ce1 (|00⟩⟨00|) must reach success, the unitary transformation after the last measurement has to map the current state in every branch to |00⟩.Let us call this unitary transformation U 0 .Note that for instance U 0 = I ⊗ I would do the job, if the first qubit is still in state |0⟩ before its application.Similarly, in all branches in that 1 was measured, the unitary transformation has to result in |00⟩.Let us call this transformation U 1 and note that e.g.I ⊗ X can do this, if the first qubit is still in state |0⟩.Accordingly, in all branches in that the last measurement results in |0⟩ this measurement is followed by U 0 and in all branches in that the last measurement results in |1⟩ this measurement is followed by U 1 , because this ensures that each branch of C Q ([•]) for |00⟩ finally results in |00⟩ as required by T 1 .
We apply the same argumentation for |01⟩ instead of |00⟩ and S ce2 (|01⟩⟨01|) instead of S ce1 (|00⟩⟨00|) to obtain the following: In all branches in that the last measurement results in |0⟩ this measurement is followed by U 0 and in all branches in that the last measurement results in |1⟩ this measurement is followed by some U 1 such that U 0 , U 1 both ensure that the respective branch of C Q ([•]) for |01⟩ finally results in |01⟩.
Note that this is not yet a contradiction.By compositionality, C Q ([•]) has to be implemented by the same term regardless of whether we start with |00⟩ or |01⟩ and, thus, the mentioned U 0 and U 1 indeed have to be the same in both cases.And, obviously, there is no U 0 that applied to |0⟩ for the second qubit sometimes results in |0⟩ and sometimes in |1⟩.But we do not necessarily always have two branches as result of measurement.So there are so far still two plausible scenarios: Either if we start with |0⟩ for the second qubit only 0 is measured and if we start with |1⟩ for the second qubit only 1 is measured or vice versa.In the former case we could e.g.pick U 0 = U 1 = I × I and in the latter case we could e.g.pick U 0 = U 1 = I × X (if the first qubit remains in its initial state).However, we have a contradiction for the case 1 measuring the second qubit we obtain either 0 or 1 with equal probability.Because of that, the implementation of C Q ([•]) will have at least two branches with measurement on the second qubit such that in one branch after the last measurement of the second qubit U 0 is applied and in the other branch after the last measurement of the second qubit U 1 is applied.For both of the two plausible scenarios that are left, this means that in one branch the second qubit is set to |0⟩ and in the other to |1⟩.Note that the entanglement between the two qubits is destroyed (if not before then by this last measurement).Then it cannot be avoided that a subsequent measurement of both qubits will result in different values.This is in contradiction to S ce6 , because S ce6 applied on the considered bell pair must reach success and therefore T 6 requires two qubits that always return the same value in measurement.
Accordingly, our original assumption, i.e., that there is an encoding • from OQS into CQS that satisfies compositionality, operational correspondence w.r.t. a success respecting preorder, and success sensitiveness is wrong: there is no such encoding.
As we claim, the counterexample in Example 6.2 can be expressed similarly, i.e., with strongly bisimilar behaviour, in variants of qCCS with measurement operators as in [FDJY07,FDY12].Moreover, even the full expressive power of CQP does not help to correctly emulate this super-operator.Hence, there is also no encoding from qCCS into CQP.
Corollary 6.5.There is no encoding from qCCS with a measurement operator into CQP that satisfies compositionality, operational correspondence w.r.t. a success respecting preorder, and success sensitiveness.

Quality Criteria for Quantum Based Systems
Sections 5 and 6 show that the quality criteria of Gorla in [Gor10] can be applied to quantum based systems and are still meaningful in this setting.They might, however, not be exhaustive, i.e., there might be aspects of quantum based systems that are relevant but not sufficiently covered by this set of criteria.To obtain these criteria, Gorla studied a large number of encodings, i.e., this set of criteria was built upon the experience of many researchers and years of work.Accordingly, we do not expect to answer the question 'what are good quality criteria for quantum based systems' now, but rather want to start the discussion.
A closer look at the criteria in Section 4 reveals a first candidate for an additional quality criterion.Name invariance ensures that encodings cannot cheat by treating names differently.It requires that good encodings preserve substitutions to some extend.CQP and qCCS model the dynamics of quantum registers in fundamentally different ways, but both languages address qubits by qubit names.It seems natural to extend name invariance to also cover qubit names.
As in [Gor10], we let our definition of qubit invariance depend on a renaming policy φ, where this renaming policy is for qubit names.The renaming policy translates qubit names of the source to tuples of qubit names in the target, i.e., φ : V → V n , where we require that φ(q) ∩ φ(q ′ ) = ∅ whenever q ̸ = q ′ .The new criterion qubit invariance, then requires that encodings preserve and reflect substitutions on qubits modulo the renaming policy on qubits.Definition 7.1 (Qubit Invariance).The encoding • is qubit invariant if, for every S ∈ C S and every substitution γ on qubit names, it holds that Sγ = S γ ′ , where φ(γ(q)) = γ ′ (φ(q)) for every q ∈ V.
In [Gor10], name invariance allows the slightly weaker condition Sγ ⪯ S γ ′ for non-injective substitutions.In contrast, substitutions on qubits always have to be injective such that they cannot violate the no-cloning principle.Since • translates qubit names to themselves and introduces no other qubit names, it satisfies qubit invariance for φ being the identity and γ ′ = γ.The corresponding proof is given above in Lemma 5.8.
Note that the qubits discussed so far are so-called logical qubits, i.e., they are abstractions of the physical qubits.To implement a single logical qubit as of today several physical qubits are necessary.These additional physical qubits are used to ensure stability and fault-tolerance in the implementation of logical qubits.Since the number of necessary physical qubits can be much larger than the number of logical qubits, already a small increase in the number of logical qubits might seriously limit the practicability of a system.Accordingly, one may require that encodings preserve the number of logical qubits.Definition 7.2 (Size of Quantum Registers).An encoding • preserves the size of quantum registers, if for all S ∈ C S , the number of qubits in S is not greater than in S.
Again, the encoding • in Definition 5.1 satisfies this criterion, which can be verified easily by inspection of the encoding function.
Lemma 7.3.The encoding • preserves the size of quantum registers, i.e., for all S ∈ C S , the number of qubits in S is not greater than in S.
Proof.By Definition 5.1, the number of qubits in S is the same as the number of qubits in S.Moreover, • does not introduce new qubits in any of its cases except as the encoding of the creation of a new qubit in the source.Because of that, also the derivatives of source term translations have the same number of qubits as their respective source term equivalents.Thus, • preserves the size of quantum registers.
Similarly to success sensitiveness, requiring the preservation of the size of quantum registers on literal encodings is not enough.To ensure that all reachable target terms preserve the size of quantum registers, we again link this criterion with the target term relation ⪯.
More precisely, we require that ⪯ is sensible to the size of quantum registers, i.e., T 1 ⪯ T 2 implies that the quantum registers in T 1 and T 2 have the same size.The correspondence simulation ⪯ that we used as target relation for the encoding • is not sensible to the size of quantum registers, but we can easily turn it into such a relation.Therefore, we simply add the condition that |ρ| = |σ| whenever ⟨P, ρ⟩ R ⟨Q, σ⟩ to Definition 4.1.Fortunately, all of the already shown results remain valid for the altered version of ⪯.
In contrast to CQP, the semantics of OQS yields a non-probabilistic transition system, where probabilities are captured in the density matrices.The encoding • translates probability distributions into non-deterministic choices.Thereby, branches with zero probability are correctly eliminated, but all remaining branches are treated similarly and their probabilities are forgotten.To check also the probabilities of branches, we can strengthen operational correspondence e.g. to a labelled variant, where labels capture the probability of a step.The challenge here is to create a meaningful criterion that correctly accumulates the probabilities in sequences of steps as e.g. a single source term step might be translated into a sequence of target term steps, but the product of the probabilities contained in the sequence has to be equal to the probability of the single source term step.As, to the best of our knowledge, there are no well-accepted probabilistic versions of operational correspondence.Because of that, we started to study probabilistic versions of operational correspondence and the nature of the relation between source and target they imply.Just recently we were able to publish three variants of probabilistic operational correspondence [SP23].These criteria allow to more closely and more naturally connect the usually probabilistic quantum based systems.
Another important aspect is in how far the quality criteria capture the fundamental principles of quantum based systems such as the no-cloning principle: By the laws of quantum mechanics, it is not possible to exactly copy a qubit.Technically, such a copying would require some form of interaction with the qubit and this interaction would destroy its superposition, i.e., alter its state.Interestingly, the criteria of Gorla are even strong enough to observe a violation of this principle in the encoding from CQS into OQS, i.e., if we allow CQS to violate this principle but require that OQS respects it, then we obtain a negative result.Therefore, we remove the type system from CQS.Without this type system, we can use the same qubit at different locations, violating the no-cloning principle.As an example, consider S = (σ; ϕ; c![q].0 | c![q].0).Then the encoding • in Definition 5.1 is not valid any more, because S = ⟨(c!q.nil ∥ c!q.nil) \ ϕ, ρ⟩ violates condition Cond2.Using S as counterexample, it should be possible to show that there exists no encoding that satisfies compositionality, operational correspondence, and success sensitiveness.
Of course, even if we succeed with this proof, this does not imply that the criteria are strong enough to sufficiently capture the no-cloning principle.Indeed, the other direction is more interesting, i.e., criteria that rule out encodings such that the source language respects the no-cloning principle but not all literal translations or their derivatives respect it.We believe that capturing the no-cloning principle and the other fundamental principles of quantum based systems is an interesting research challenge.

Conclusions
We proved that CQS can be encoded by OQS w.r.t. the quality criteria compositionality, name invariance, operational correspondence, divergence reflection, and success sensitiveness.Additionally, this encoding satisfies two new, quantum specific criteria: it is invariant to qubit names and preserves the size of quantum registers.We think that these new criteria are relevant for translations between quantum based systems.
The encoding proves that the way in that qCCS treats qubits-using density matrices and super-operators-can emulate the way in that CQP treats qubits.The other direction is more difficult.We showed that there exists no encoding from OQS into CQS that satisfies compositionality, operational correspondence, and success sensitiveness and claim that this also implies that there is no encoding from qCCS into CQP.
The results themselves may not necessarily be very surprising.The unitary transformations used in CQS/CQP are a subset of the super-operators used in OQS/qCCS and also density matrices can express more than the vectors used in CQS/CQP.What our case study proves is that the quality criteria that were originally designed for classical systems are still meaningful in this quantum based setting.They may, however, not be exhaustive.Accordingly, in Section 7 we start the discussion on quality criteria for this new setting of quantum based systems.The first two candidate criteria that we propose, namely qubit invariance and preservation of quantum register sizes, are relevant, but rather basic.Since the semantics of quantum based systems is often probabilistic, a variant of operational correspondence that requires the preservation and reflection of probabilities in the respective traces might be meaningful.The encoding • presented above does not satisfy probabilistic operational correspondence as presented in [SP23].More difficult and thus also more interesting are criteria that capture the fundamental principles of quantum based systems such as the no-cloning principle.Hereby, we pose the task of identifying such criteria as research challenge.
any of the steps of T * =⇒ S * * , T =⇒ S ′ performs the sequence T * =⇒ S * * starting in T instead of T * .(3) By Definition 5.1, inputs or outputs cannot guard a branch of a choice nor can inputs or outputs guard the subterm of a conditional.Then T * contains two unguarded subterms c?x.T in and c!q.T out that are reduced in the step T * −→ T .Because of Definition 5.1 and since T * =⇒ S * * reduces only choices, then S * * contains two unguarded subterms c?[x].P in and c![q] Moreover, (σ; ϕ; P ) ≡ (σ ′ ; ϕ; Q) if P ≡ Q and σ = σ ′ or if (σ ′ ; ϕ; Q) is obtained from (σ; ϕ; P ) by alpha conversion on the qubit names in σ.Finally, Rule (R-Cond CQS ) unguards the continuation P of a conditional if its condition is satisfied, which checks equality of two binary numbers b and b ′ .