{'fraction_non_alphanumeric': 0.04906002265005663, 'fraction_numerical': 0.010917327293318234, 'mean_word_length': 4.132759823296908, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 11, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Limitations on post-processing assisted quantum programming

A quantum multimeter is a programmable device that can implement measurements of different observables depending on the programming quantum state inserted into it. The advantage of this arrangement over a single purpose device is in its versatility: one can realize various measurements simply by changing the programming state. The classical manipulation of measurement output data is known as post-processing. In this work we study the post-processing assisted quantum programming, which is a protocol where quantum programming and classical post-processing are combined. We provide examples showing that these two processes combined can be more efficient than either of them used separately. Furthermore, we derive an inequality relating the programming resources to their corresponding programmed observables, thereby enabling us to study the limitations on post-processing assisted quantum programming.


Introduction
A programmable device can operate in different ways depending on the instructions inserted into it. A quantum device may take these instructions not only in the form of classical data, but also in the form of a quantum state [1]. If distinct programs correspond to distinguishable quantum states, then the situation is no different from classical programming. Yet the setting changes when the instructions correspond to non-orthogonal pure quantum states; this may allow one to do something that is not possible with classical programming. Using quantum resources instead of their classical counterparts in programming a device may have advantages, as in the case of a semiquantum Bell scenario [2].
Any quantum measurement can be viewed as a process where the system of interest is brought into contact with an initially uncorrelated apparatus and, after an interaction, the value of the measured quantity is read from the apparatus' pointer scale [3]. A quantum measurement set-up may be used as a programmable device by considering the state of the apparatus as a program [4]. This kind of a quantum multimeter can implement measurements of different observables even if the other parts of the device, except the programming state, are kept fixed. However, it is known that for two different sharp quantum observables the corresponding programming states must be orthogonal [5,6] and hence, in this case, there is no quantum advantage over classical programming.
In another related scenario an experimenter does not change any part of a measurement device, but is allowed to perform classical operations to post-process the measurement data. In this way one can implement sets of quantum observables that are jointly measurable [7]. The limitation in the case of sharp observables is that only commuting sharp observables are jointly measurable [8].
Interestingly, it was observed in [4] that by allowing both quantum programming and classical post-processing it is possible to overcome the limitations that each procedure possesses when performed separately. Indeed, it was demonstrated that there exists a programmable device that implements, after post-processing, non-commuting sharp qubit observables by using non-orthogonal programming states.
In this work we generalize the multimeter presented in [4] and show that a similar defeat of the limitations is possible in all finite dimensions. This generalization is achieved by studying the programmability of covariant observables. We then continue by deriving an inequality between the programming resources -both classical and quantumand the corresponding programmed observables. This result reveals the true underlying limitations of post-processing assisted quantum programming of observables.

Preliminaries
In this preliminary section we fix the notation and recall some basic concepts used throughout this work. We denote a complex separable Hilbert space by H, of either finite or countably infinite dimension. The set of bounded linear operators on H is denoted by L(H), the set of trace class operators by T (H) and the set of projections by P(H).

2.2.
Observables and post-processing. Let Ω n = {x 1 , x 2 , . . . , x n } be a non-empty finite set. We say that a map E : Ω n → L(H) is an n-valued quantum observable whenever E(x) ≥ 0 for all x ⊂ Ω n and i E(x i ) = ½ H , that is whenever E is a positive operator-valued measure (POVM). The non-zero operators E(x) ≥ 0, x ⊂ Ω in the range of an observable are called effects. Furthermore, we call an observable A : Ω n → L(H) sharp, or a projection-valued measure (PVM), if all the effects of A are projections: A(x) 2 = A(x) for every x ⊂ Ω n . We often shorten the notation by writing The observables on (H, Ω n ) form a convex set which is denoted by O(H, Ω n ). We say that the conditional probability λ : is a probability measure for every x i ∈ Ω n and F(y) = i λ(x i |y)E(x i ) for all y ⊂ Ω m ; in such a case we briefly write F = λ ⋆ E.
We call the extremal elements of a set of observables are called extremal observables. It is known, that the only to produce extremal observables from another observable by means of post-processing is by merging together effects of the other observable. In other words, if E ∈ O(H, Ω n ) is an observable that can be post-processed into an extremal observable F ∈ O(H, Ω m ) with λ : (Ω n , Ω m ) → [0, 1], then λ(x i |y) ∈ {0, 1} for all x i ∈ Ω n and y ⊂ Ω m [9].

Measurements and programmable multimeters.
A measurement set-up is mathematically given by a 4-tuple K, Z, V, ξ , where K is the Hilbert space associated with the measurement apparatus, Z : Ω n → L(K) is the pointer observable, V : T (H⊗K) → T (H⊗K) is a quantum channel describing the measurement interaction and ξ ∈ S(K) is the initial probe state [10]. The observable on H measured in this process is given by In the case such as given above, we say that the observable E is realized by the measurement K, Z, V, ξ . From Eq. (1) it is readily concluded that measurements may be altered to realise different observables by changing the initial probe state.
We will call such an action quantum programming and the programmable device, mathematically described by a triplet K, Z, V , a quantum multimeter [5,6,11,12]. Any initial state of the probe then acts as a programming instruction for the multimeter and is thus called a programming state.
The programming states of any two unequal sharp observables are necessarily orthogonal regardless of the multimeter; see [6] and Ex. 1. More generally, this orthogonality persists whenever the two programmed observables can be post-processed into different sharp observables via some fixed post-processing. Interestingly, this orthogonality need no longer hold if the post-processings are allowed to be different [4,6], as we shall demonstrate shortly. Therefore, one can introduce postprocessing as an additional programming resource, that is the programmed observable depends, not only on the state ξ i ∈ S(K), but also on the postprocessing λ j : (Ω n , Ω m ) → [0, 1]. To emphasize the difference to mere state dependent programming we will call this scenario post-processing assisted quantum programming.

Programming of covariant observables
In this section we use the framework of covariant observables to generalize the multimeter presented in [4]. The main conclusion is that with post-processing assisted programming it is possible to realize different sharp observables with non-orthogonal programming states.
3.1. Structure and programming of covariant observables. We begin by recalling some basic facts about covariant observables [13,14]. Let H be a finite d-dimensional Hilbert space. Let G be a finite group with #G elements and U : G → U(H) its irreducible projective representation. For each ξ ∈ S(H), we define a mapping E ξ : G → L(H) by formula The operators E ξ (g) are positive and it is a direct consequence of Schur's lemma that g E ξ (g) = c½ for some constant c. By calculating the traces of both sides we see that c = 1 and hence E ξ is an observable. The structure of an observable E ξ is completely determined by the state ξ, which is called the seed operator for E ξ . In the case of a pure state ξ = P ψ , we also denote E ξ = E ψ . Figure 1. A programmable quantum multimeter that can be used to realize all observables E ξ (g) = d #G U(g) ξ U(g) * , ξ ∈ S(H), corresponding to the same irreducible projective representation U with the programming states η ⊗ ξ T .
We recall from [5] that all observables E ξ of the form of Eq. (3) can be programmed with a single multimeter. Namely, fix an orthonormal basis {φ ℓ } d ℓ=1 of H. For each g ∈ G, we define a unit vector u(g) ∈ H ⊗ H by for all ̺, where the transpose ξ T is defined with respect to the orthonormal basis {φ ℓ } d ℓ=1 . Since any ξ defines a normalized POVM via Eq. 3, this also shows that g Z(g) = ½, hence Z is an observable on H ⊗ H. Fig. 1). Interestingly, this result implies that if two unequal covariant observables, that have the same irreducible representation but different seeds ξ 1 and ξ 2 , are either sharp or can be made into unequal sharp observables with a fixed postprocessing, then ξ 1 and ξ 2 are necessarily orthogonal.

3.2.
Obtaining sharp observables from cyclic subgroups. As in the previous subsection, U is an irreducible projective representation of G of degree d. We make an additional assumption that G has a cyclic subgroup H = h of order #G/d. This is obviously a restrictive assumption and allows only to use specific groups. However, we will later demonstrate by examples that there are useful instances of this type.
Our aim is to find sharp observables as post-processings of covariant observables. The method proceeds as follows: We fix an eigenvector ψ of the unitary operator U(h). For any g ∈ H, the vector ψ is also an eigenvector of U(g) and hence It follows that For a different left coset g ′ H = H we get We conclude that by dividing G into the left cosets of H and forming the respective post-processing of E ψ , we obtain a sharp observable with d outcomes. Different eigenvectors of the unitary operator U(h) may lead to different sharp observables. However, since the applied post-processing is determined by the subgroup H and is therefore the same for all those sharp observables, these programming vectors are necessarily orthogonal.
The described method above becomes more effective when G has several cyclic subgroups H 1 = h 1 , . . . , H n = h n of the same order. Further, we impose that any two operators U(h j ) and U(h k ) do not commute when j = k, so that it is guaranteed that we can choose non-orthogonal (and non-parallel) eigenvectors ψ 1 , . . . , ψ n of U(h 1 ), . . . , U(h n ), respectively. From a practical point of view, it is easier to start with a group that has several cyclic subgroups of the same order and then check if there exists an irreducible projective representation with the desired degree.

Examples.
Quaternion group. The quaternionic group Q 8 consists of 8 elements ±1, ±i, ±j, ±k satisfying the equations and −1q = q(−1) = −q for each q ∈ Q 8 . There are three cyclic subgroups of order 4: i , j and k . The previously described construction works for an irreducible projective representation of degree 8/4 = 2. We thus choose the following irreducible representation of Q 8 : We get three different sharp observables, the programming vectors ψ 1 , ψ 2 , ψ 3 being eigenvectors of U(i), U(j), U(k), respectively. They can be chosen such that the corresponding one-dimensional projections are: The sharp observables obtained by this post-processing assisted programming are hence the complementary qubit observables consisting of the projections 1 2 (½ ± σ x ), 1 2 (½ ± σ y ) and 1 2 (½ ± σ z ), respectively. We have thus reproduced the result first presented in [4].
Finite phase space. Let d be a prime and let Z d be the cyclic group of integers modulo d. The product group Z d × Z d can be consider as a finite phase space [15]. It has d + 1 cyclic subgroups of order d; the generating elements of these cyclic subgroups can be chosen to be (0, 1) and (1, 0), (1, 1), . . . , (1, d − 1).
The previously described construction works for an irreducible projective representation of degree d 2 /d = d. We fix an orthonormal basis {ϕ k } k∈Z d of a d-dimensional Hilbert space H. We denote ω = e 2πi/d and define the following projective unitary representation U of Z d × Z d in H: The programming vectors ψ 0 , ψ 1 , . . . , ψ d−1 are eigenvectors of the operators U(0, 1) and U(1, k), k = 0, . . . , d − 1, respectively. They can be chosen to be: where c (k) j = ω 1 2 jk(j−1)−j , j, k = 0, . . . , d − 1. In particular, we have | ψ j | ψ k | = 1/ √ d for j = k. It follows from Sec. 3.2 that each of these eigenvectors will lead to a sharp observable via appropriate postprocessing.

Limitations on quantum programming
Not much is known about the mutual dependencies of the programming states of general quantum observables, except those of sharp observables. Such scenarios are important since often the implemented observables differ from sharp ones. On the other hand, to our best knowledge the dependencies of post-processings and the programmed observables in post-processing assisted quantum programming have not been studied before. In this section we address these issues by introducing an inequality between measures of "closeness" of the programming resources and the corresponding programmed observables. We note that similar analysis was recently made for programming of quantum channels in [16].

4.1.
Inequality for programming of observables. A commonly used measure of distinguishability of quantum states is fidelity F . There are many equivalent ways to express fidelity, two of which we will recall next for the later use. Firstly, the theory of Uhlmann states that where the maximum is taken over all purifications ϕ i of ̺ i , i = 1, 2 [17]. Secondly, fidelity may also be recast as for all ̺ 1 , ̺ 2 ∈ S(H), where the minimum is taken over all observables E : Ω n → L(H) [17]. The latter formulation is closely related to so-called Bhattacharyya coefficient B that quantifies the divergence between two (discrete) probability measures: B(p, q) := i p(i)q(i), where p, q : Ω n → [0, 1], n i=1 p(i) = n i=1 q(i) = 1. From this point onwards we will use the shorthand notion p E ̺ (x) = tr [E(x) ̺] and write p E ϕ if ̺ = P ϕ . With these tools and definitions we are ready to formulate the results of this subsection. Proposition 1. Suppose two observables E 1 and E 2 ∈ O(H, Ω n ) can be programmed with states ξ 1 and ξ 2 , respectively. Then for all ̺ 1 , ̺ 2 ∈ S(H).
Proof. Fix states ̺ 1 , ̺ 2 ∈ S(H) and let ϕ 1 , ϕ 2 ∈ H ′ ⊗ H be any purifications of them, respectively. Furthermore, let φ 1 , φ 2 ∈ K ⊗ K ′ be the any purifications of the programming states ξ 1 , ξ 2 , respectively. Then in the total Hilbert space H ′ ⊗ H ⊗ K ⊗ K ′ we have Since max we conclude the proof by taking the maxima over all the possible purifications in the above inequality.
Motivated by the previous proposition, we may define a quantity F (̺ 1 ,̺ 2 ) which sets the relation F (ξ 1 , ξ 2 ) ≤ B(E 1 , E 2 ) between the programmed observables E i and the programming states ξ i , i = 1, 2. We wish to point out that due to the double infima taken over the state space B(E 1 , E 2 ) is always well defined, although can be indefinite in general as the denominator may vanish. Below we have listed some of its properties.
The quantity B(E 1 , E 2 ) satisfies the following properties: Proof. The first and the fourth properties follow trivially from the symmetry and unitary invariance of the fidelity of quantum states. The second one can be proved by noticing that inf ̺ 1 ,̺ 2 1, for all ̺ ∈ S(H), where the latter limit follows immediately from the Cauchy-Schwarz inequality.
To prove (B3), we first suppose that B(E 1 , E 2 ) = 1, whilst supposing that E 1 = E 2 . Then there exists a state ̺ such that Hence, We next prove (B5). Suppose there exists a Hilbert space K ′ where all B ∈ L(H) and some fixed unitary U on H ⊗ K ′ and fixed state η ∈ S(K ′ ). Then Therefore where we have used the properties (B4) and the monotonicity of the fidelity, F (̺ 1 , ̺ 2 ) ≤ F (C(̺ 1 ), C(̺ 2 )) for all channels C : T (H) → T (H ′′ ). Finally, we prove (B6). Fix any post-processing λ : (Ω n , Ω m ) → [0, 1]. Since i λ(i|j) = 1 for all j we have where the inequality follows from the Cauchy-Schwarz inequality.
For B(E 1 , E 2 ) to be a satisfactory upper bound for the fidelity of the programming states, we should be able to bind it to some known results on the programmability of quantum observables. The following example establishes such a connection.

4.2.
Inequality for post-processing assisted programming of observables. As noted in Sect. 3, post-processing can be an advantageous resource in quantum programming. In [6] it was left as an open question whether it is possible to realize all observables if in addition to programming we allow for post-processing. Using the tools developed above we provide a negative answer to this question.
Following the above considerations, we define the "closeness" of two post-processings λ 1 and λ 2 : however, F (λ 1 , λ 2 ) can be more easily calculated using the following lemma.
It follows from the previous proposition that . Suppose now that it is possible to realize two different sharp observables via post-processing assisted programming. From Ex. 1 it can be concluded then that either F (ξ 1 , ξ 2 ) = 0 or F (λ 1 , λ 2 ) = 0. Assume that the Hilbert space K of the multimeter K, Z, V is separable and the pointer observable Z is m-valued. Then one can use post-processing assisted programming to realize at most dim(K) · Bin m, n sharp observables with n-outcomes with K, Z, V . Here Bin m, n is the binomial coefficient Bin m, n = m! n!(m−n)! which characterizes the size of the set {λ i : (Ω n , Ω m ) → [0, 1] | F (λ i , λ j ) = 0}. This proves that, with the above assumptions, even post-processing assisted programming cannot universally realize all quantum observables comprising an uncountable set.
We end the section by pointing out that the trade-off between the fidelities F (ξ 1 , ξ 2 ) and F (λ 1 , λ 2 ) when programming sharp observables is more subtle than what is captured by F (ξ 1 , ξ 2 )F (λ 1 , λ 2 ) = 0. Let us recall, that in the quaternion example of Sect. 3 we considered the postprocessing assisted programming of three sharp spin-observables where, in particular, the programming states P ψ i satisfy F (P ψ i , P ψ j ) = 1/ √ 2, i = j. It turns out that the choice of states P ψ i , i = 1, 2, 3, is optimal in the following sense.
where p ± and q ± : Ω m → [0, 1] are some probability measures. Defining a merging type post-processing λ : (Ω m , Ω) → [0, 1] according to the previous table we have for all states ̺ 1 , ̺ 2 satisfying F (̺ 1 , ̺ 2 ) = 0. By choosing these states appropriately, we get the following inequality For example, the first term follows from choosing ̺ i = A i (+), i = 1, 2. By maximizing the right-hand-side over p ± and q ± we get a universally valid upper bound for programming states ξ 1 and ξ 2 in post-processing assisted quantum programming, plotted in Fig. 2 as a function of a 1 · a 2 . For the orthogonal spin directions, a 1 · a 2 = 0, the upper bound reaches its minimum 1/ √ 2.

Summary and outlook
The upside of designing a programmable device instead of a single purpose machine is, that it is more economical on resources. Accordingly, programmable multimeters have applications in schemes where one wants to change measurements on the fly, such as in quantum-state discrimination, in quantum cryptography and eavesdropping, and in measurement based quantum computation, to name a few. Although the exact universality of a programmable multimeter is known to be unachievable, it is obviously desirable to have one that is as optimal as possible (for a given task).
Related to the above, we showed that it is advantageous to include classical post-processing as a part of quantum programming scenarios. In addition, we revealed a relation between the programmed observables and the corresponding programming and post-processing resources. This relation allowed us to prove that even post-processing assisted programming cannot universally realize all quantum observables. We believe that our survey establishes a mathematical basis for further investigation of advantages and limitations of the three processes: classical post-processing, quantum programming and the combined protocol of post-processing assisted programming.
We will finish with a short discussion about one concrete application of post-processing assisted programming. In Ref. [11] the question "What is the form of the optimal multimeter to approximate within a fixed error all observables in a given Hilbert space?" was asked, however, in lack of a proper distance measure of observables the authors left this question open. Consequently, a programming scenario providing a partial answer to this question was proposed in Ref. [5], and it was soon shown to be the optimal one in Ref. [18]. This scenario, however, only concentrates on approximating observables with fixed number of outcomes and therefore does not answer the original problem in its full generality. In vague terms, one can attempt to solve the problem by programming an optimal set of observables, the elements of which could then be classically post-processed to approximate any observable. We believe that the distance measure of observables B(E 1 , E 2 ) we have introduced can serve as a good candidate for answering such optimality questions, in particular due to its direct relation with the corresponding programming and post-processing resources. However, to answer the above optimality question in the fully general setting will likely require an intricate interplay between programming and post-processing -the details of which are beyond the scope of this work -and the question of Ref. [11] is hence left open for future investigation.