Intrinsic randomness under general quantum measurements

Quantum measurements can produce randomness arising from the uncertainty principle. When measuring a state with von Neumann measurements, the intrinsic randomness can be quantified by the quantum coherence of the state on the measurement basis. Unlike projection measurements, there are additional and possibly hidden degrees of freedom in apparatus for generic measurements. We propose an adversary scenario for general measurements with arbitrary input states, based on which, we characterize the intrinsic randomness. Interestingly, we discover that under certain measurements, such as the symmetric and information-complete measurement, all states have nonzero randomness, inspiring a new design of source-independent random number generators without state characterization. Furthermore, our results show that intrinsic randomness can quantify coherence under general measurements, which generalizes the result in the standard resource theory of state coherence.

Quantum measurements can produce randomness arising from the uncertainty principle.When measuring a state with von Neumann measurements, the intrinsic randomness can be quantified by the quantum coherence of the state on the measurement basis.Unlike projection measurements, there are additional and possibly hidden degrees of freedom in apparatus for generic measurements.We propose an adversary scenario for general measurements with arbitrary input states, based on which, we characterize the intrinsic randomness.Interestingly, we discover that under certain measurements, such as the symmetric and information-complete measurement, all states have nonzero randomness, inspiring a new design of source-independent random number generators without state characterization.Furthermore, our results show that intrinsic randomness can quantify coherence under general measurements, which generalizes the result in the standard resource theory of state coherence.
Randomness is an essential resource in cryptography and scientific simulation.Due to its deterministic nature, Newtonian physics fails to provide intrinsically unpredictable randomness.Without such a resource, cryptosystems fail to provide information-theoretic security.Fortunately, the uncertainty principle in quantum physics offers means to generate intrinsic randomness [1].Thanks to this quantum feature, quantum random number generators (QRNGs) lay down a solid foundation for the security of cryptography systems [2,3].
There are various ways to construct a QRNG, typically composed of a source and a detector.The source is characterized by a quantum state [4,5], while the detector is calibrated by a quantum measurement [6,7].After obtaining outcomes from the quantum measurement, the legitimate user, Alice, needs to analyse the amount of randomness from the raw data.This analysis can be put in an adversary scenario, as shown in Figure 1.The adversary, Eve, might have a certain correlation with the system.Such correlation could leak the information of measurement outcomes to Eve.To remove the information leakage, we can divide the entropy of outcomes into two parts: intrinsic randomness, about which Eve has no information, and extrinsic randomness, which Eve might know.The essential task in randomness analysis is to quantify the intrinsic randomness given an input state and a measurement.Note that in the (semi-)device-independent scenarios, Alice might skip some of these steps.For example, in source-independent schemes [8,9], the source is assumed to be uncalibrated or even untrusted.
As for the intrinsic randomness quantification, let us start with a well-studied special case with the detection calibrated as a von Neumann measurement, {|i i|}.If the input is in a superposition state, |ψ = i a i |i with normalized complex coefficients a i ∈ C and i |a i | 2 = 1, the measurement outcome is intrinsically random and * xma@tsinghua.edu.cn the probability of obtaining outcome i is |a i | 2 according to Born's rule [1].In this case, intrinsic randomness of the outcomes arises from breaking superposition [10] and is given by the Shannon entropy of the probability distribution, {|a i | 2 }.In resource theory, superposition is quantified by quantum coherence with respect to the measurement basis, {|i } [11,12].In fact, for a generic input state described by a density matrix, the link between output intrinsic randomness and state coherence has been established [13][14][15].A projection measurement is an idealized model for detection devices.In reality, noise is inevitable, or equivalently, part of instrument information is missing from the user's point of view.Then, the detection is generally characterized by a positive-operator-valued measure (POVM).How to quantify intrinsic randomness of the outcomes from a generic measurement is an important yet unsettled problem.Given a set of POVM elements, as many degrees of freedom in measurement instruments are hidden from Alice, there is an infinite number of ways to construct the detection instrument [16][17][18].This hidden information makes it very challenging to characterize the amount of information leaked to Eve.In the literature, there have been some attempts on this topic [19][20][21].For instance, one can express a generic measurement as a mixture of projection measurements followed by classical postprocessing [20].Unfortunately, this mixing technique is only feasible for measurements with two outcomes in a qubit system while failing in general cases [22].
Following the spirit of studying randomness for projection measurements from the perspective of coherence, we find that the existing coherence measures under POVMs cannot properly quantify intrinsic randomness [23][24][25][26].Let us illustrate this with an example.Consider the twooutcome POVM M = {1/2, 1/2}, which is free in the resource theory of measurement informativeness [27].The measurement outcome is independent of input states and can be seen as a classical random variable taking values 0 and 1 with an equal probability, which we expect to be of a classical nature.However, all states have nonzero coherence in the definition given by the direct application of conventional Naimark extension [24].
In this work, we provide a generic adversary scenario where the detection is correlated with Eve as shown in Figure 1.We take all the hidden variables or missing information as an ancillary system into consideration, where the POVM can be viewed as a part of projection on a larger system.This is a generalized version of Naimark extension, with the difference that the ancillary state is not necessarily pure as in the conventional one [17,28].Then, we can apply the results of intrinsic randomness quantification for projection measurements.As the Naimark extension is not unique, we need to minimize over all possible extensions in the randomness analysis.
For a special type of measurements, extremal POVM [29], we show that for all Naimark extensions with possibly mixed ancillary states, the randomness function under an extremal POVM is equal and thus gives the intrinsic randomness.Surprisingly, for some extremal measurements, such as the symmetric and information-complete (SIC) measurement [30,31], their outcomes have nonzero randomness for any input states.Then, we can design a new source-independent QRNG using these measurements.Moving on to a general POVM, the mixed ancillary state in the Naimark extension is formidable.We make an additional assumption that Eve performs a measurement on her local system and the ancillary state becomes a particular mixture of pure states, from which a convex-roof construction of the intrinsic randomness is obtained.
Moreover, we regard the randomness quantification as a state coherence measure under POVMs.Following a standard resource-theoretic approach, we define a set of incoherent states and incoherent operations for a general measurement.In our coherence measure, for POVM {1/2, 1/2}, all states are incoherent.
Randomness characterization for general POVMs.-For a d-dimensional Hilbert space H = C d , a POVM on H is a set of positive semidefinite Hermitian operators POVMs are the same, ∀i, M i = N i , we denote by M = N.Each element can be expressed as M i = A i A † i , where A i is called a POVM operator and generally not a square matrix.When measuring a state ρ, the probability of obtaining the outcome i is given by tr(M i ρ) and the corresponding post-measurement state is A i ρA † i / tr(M i ρ).The set of operators {A i } uniquely determines the implementation of the measurement -instrument.On the other hand, a POVM generally corresponds to many possible implementations or different sets of operators, {A i }.
The projection measurement, also called projectionvalued measure (PVM), is a special case of a POVM when M i are projection operators, M 2 i = M i , and M i = A i .The post-measurement states of PVMs are unique, thus can be regarded as basic building blocks in the implementation of POVMs.As a special case, when every PVM element is rank-1, we call it von Neumann measurement.
As the first step of randomness evaluation, Alice characterizes the source in a QRNG to be state ρ A and calibrates the detection device to be measurement M. By introducing an ancillary system Q, we can extend M to a PVM, P. In the conventional Naimark extension, the ancillary state of Q is assumed to be pure.Here, we generalize it for a mixed state σ Q .In the adversary picture, both the source and the measurement could be correlated with Eve.In the worst-case scenario, Eve holds the purification of the source state ρ A and the ancillary state σ Q , as shown in Figure 2. The measurement extension requires M, P and σ Q to satisfy the consistency condition [32], where ∀i, That is, ∀ρ A , i, tr M i ρ A = tr P i (ρ A ⊗ σ Q ) .For simplicity, we shall omit the superscript A and Q when there is no confusion in the following discussions and denote the states ρ and σ as Alice's state and the ancillary state, respectively.Once Eve gives the measurement device to the user, she cannot access the apparatus anymore.Hence, there is a no-signalling relation between the input state and Eve's system.In general, any implementation of a measurement can be treated as a part of a PVM on a larger system.Then, we can quantify intrinsic randomness of POVM outcomes via its extension, where the constraint is given by the consistency condition in Eq. (1).For the special case of von Neumann measurements, the randomness quantification R(̺, P) is well studied in the literature under different adversary scenarios [15,33].As the starting point of our randomness quantification of POVMs, we generalize the results to the general PVM case and give two widely used mea- The adversary scenario for a generalized Naimark extension: a PVM on the joint system AQ.From Alice's perspective, the measuring process is described by POVM M, depicted as the dashed box.Alice inputs state ρ A and obtains classical outputs from the box.The ancillary system is generally in a mixed state σ Q .If σ Q is pure, it becomes the conventional Naimark extension.Both the source and the ancillary system could be entangled with Eve.There is no-signalling from input A to Eve's purification F .

sures,
where S(̺) = − tr(̺ log ̺) represents the von Neumann entropy function, ̺ = j q j |ψ j ψ j | is a state decomposition, and ∆ P (̺) = m i=1 P i ̺P i is the block-dephasing operation.The difference between R c and R q lies in whether Eve performs measurements on each copy of system E in Figure 2 and the two functions coincide when ̺ is pure.Technical details here and below are presented in Supplemental Material [34].
Since a classical mixture of quantum states should not increase the output intrinsic randomness on average, the randomness function R(̺, P) satisfies the convexity condition, for arbitrary coefficients j r j = 1 and r j ≥ 0. A state, ̺ = j r j ̺ j ≡ ⊕ j r j ̺ j , is block-diagonal with respect to P, when ∀j = j ′ and ∀P i ∈ P, there is tr Intuitively, different block subspaces should have no interference with each other when measuring.This indicates that the randomness function should also satisfy the additivity condition for the block-diagonal states, Note that, the two aforementioned randomness functions for PVMs meet these criteria.With the convexity condition on the randomness function, we can see that the randomness defined in Eq. ( 2) satisfies the convexity condition for both ρ and M. From the resource theory point of view, these two conditions stem from the convexity [12] and the additivity on block-diagonal states [35] of coherence measures.
Let us check out a special case where the POVM is extremal, which cannot be decomposed into a linear mixture of other POVMs [29].This is an analog to a pure state, which is often considered to be decoupled from the environment.An extremal POVM can also be treated as a measurement decoupled from the environment.In the adversary scenario, there is no hidden variable for a pure state or an extremal POVM.That is, in Figure 2, system F is trivial.To put this intuition in a rigorous manner, we show that for an extremal POVM, the intrinsic randomness is independent of the extension {P, σ}.
Theorem 1.For an extremal POVM M and a fixed input state ρ, all the generalized Naimark extensions give the same amount of randomness.
Then, we can skip the minimization problem in Eq. ( 2) and employ any extension for the randomness function.
In practice, we can take a canonical extension of M [17], A general POVM can be decomposed to extremal ones, just like that a mixed state can be decomposed to pure states.The decomposition of a POVM is generally not unique, which is controlled by a hidden variable from Alice's point of view.In the generalized Naimark extension as shown in Figure 2, the following Proposition connects the decomposition of the POVM with that of the ancillary state.
Proposition 1 (Correspondence between ancillary state and measurement decomposition).In a generalized Naimark extension of a POVM, M, if the ancillary state has a pure state decomposition, σ = j r j |ϕ j ϕ j | with r j = 1 and r j > 0, then there exists a measurement decomposition M = j r j N j , and vice versa.
If Eve performs a local measurement on her system F , without loss of generality, the measurement can be restricted to be rank-1.Otherwise, the measurement can be viewed as a rank-1 measurement followed by coarse graining.Then, the ancillary state is chosen from a pure state ensemble and the POVM degenerates into a mixture of corresponding POVMs according to Proposition 1.The intrinsic randomness of Alice's outcomes is a weighted average of the randomness for each pure input ancillary state.So, the minimization problem of Eq. ( 2) becomes minimizing the value j r j R(ρ ⊗ |ϕ j ϕ j | , P) over all possible Naimark extensions and pure state decompositions of the ancillary state.
Denote the solution to the minimization problem after Eve's measurement to be P * and σ * = j r * j ϕ * j ϕ * j .We show that the corresponding measurement decomposition, M = j r * j N * j , is extremal -indicating that {N * j } are all extremal.The intrinsic randomness for the POVM outcomes is given by j r * j R(ρ, N * j ).As a result, we can minimize over all possible extremal decompositions for the POVM to evaluate Eq. ( 2) and give a convex-roof construction of intrinsic randomness, as presented in the following theorem.
Theorem 2. When Eve performs a measurement on her system F , the intrinsic randomness of POVM outcomes is given by, where the decomposed POVMs {N j } are all extremal and the randomness function R(ρ, N j ) is given by Eq. ( 6).
Similar to the case of pure states, when a POVM M is extremal, there is R(ρ, M) = R cf (ρ, M).
After quantifying randomness for the measurement outcomes with respect to a given POVM, it is interesting to consider the set of states that have no randomness, called non-random state.For the special case of a von Neumann measurement, a non-random state is diagonal in the measurement basis [12,13].For a general PVM, a non-random state has a pure-state decomposition such that each decomposed state is a +1 eigenstate of a measurement projector.Here, we give necessary and sufficient conditions for the non-random states under a generic measurement in the following two corollaries.
Corollary 1 (Necessary and sufficient condition for non-random states).Given a POVM M, a state ρ is non-random, R cf (ρ, M) = 0, iff the measurement has an extremal decomposition, M = j r j N j , satisfying one of the following two equivalent conditions, 2. for each N j , the state has a corresponding spectral decomposition, ρ = k q j k ψ j k ψ j k , such that ∀k, For the special case of pure state |ψ , we can derive the necessary and sufficient condition for the general randomness quantification given in Eq. ( 2).
For extremal POVMs, according to Corollary 1, the necessary and sufficient condition for zero randomness is that ρ has a corresponding spectral decomposition, k q k |ψ k ψ k |, such that each term |ψ k is a +1 eigenstate of some element.Intriguingly, there exist particular extremal POVMs, all measurement elements do not have +1 eigenvalue.For example, the SIC measurement is extremal and composed of d 2 rank-1 operators, {|φ i φ i | /d}, with normalized vectors |φ i satisfying, ∀i = j, | φ j |φ i | 2 = 1 d+1 .Each POVM element only has 0 or 1/d as eigenvalues.Hence, there is no nonrandom states for the SIC measurement.
Observation 1.For some POVMs, such as SIC measurements, there does not exist a non-random state.
This observation can help us design sourceindependent QRNGs.Given a calibrated measurement, if Alice figures that non-random states do not exist, she can be sure that there is positive amount of randomness in the outcomes even without any source characterization.In this case, the lower bound of outcome randomness is given by where the randomness function R(ρ, M) is given in Eq. ( 2).This kind of source-independent QRNG designs is stronger than the existing ones [8,9], where at least partial source tomography is required.This observation can also help us design other device-independent QRNGs [36].
Theorem 3.For a SIC measurement M, a lower bound of intrinsic randomness is given by, where d is the dimension of the corresponding space.
It is worth mentioning that for a SIC measurement with an arbitrary input state, the min-entropy given by the guessing probability is lower bounded by 2 log d − 1 [37].This min-entropy based work only considers the case where Eve does not know the ancillary state of detection devices.
Intrinsic randomness as a POVM coherence measure.-There is a close relation between randomness and coherence for PVMs.In Supplemental Material, we show that for a general PVM, the intrinsic randomness of the outcomes can identify the quantum coherence of the input state with respect to the PVM.Following this spirit, it is natural to regard the intrinsic randomness R in Eq. ( 2) as a coherence measure for a general POVM.Define the set of non-random states to be the set of POVMincoherent states, POVM-incoherent states which can be empty, incoherent operations always exist for any POVM.For example, the identity map is a trivial POVM-incoherent operation.
Here, we give a definition of the POVM-incoherent operations.
Definition 1.For POVM M, operation Λ is called incoherent, if for any generalized Naimark extension {P, σ} on a larger space H ′ , Λ has a corresponding extended operation Λ ′ on H ′ that satisfies the following two conditions,  M) with λ j > 0 and j λ j = 1.Besides, in the special case of PVMs, the definitions for coherence measures, incoherent states, and incoherent operations are identical with their corresponding part in the block-coherence theory.
Note that the coherence measures R cf derived from two randomness functions given in Eq. (3), R cf c and R cf q , can both be efficiently evaluated, see, Supplemental Material [34].For pure input states, R cf c = R cf q and hence can be briefly written as R cf .As an example, we calculate the coherence measure R cf of the qubit state |0 with respect to three POVMs, M µ vn , M µ mub , and M µ sic .When µ = 0, these three POVMs are where There are similar definitions and results for M µ mub and M µ sic .The state coherence under these three POVMs are compared in Figure 3.We can see R cf (|0 , M µ sic ) maintains larger than 1 even with strong deterministic noise, while R cf (ρ, M µ mub ) ≤ 1 and R cf (ρ, M µ vn ) ≤ 1 hold for arbitrary states.This demonstrates the advantage of the SIC measurement in design of QRNG.
Discussion.-In this work, we characterize intrinsic randomness for general states under general measurements.We conjecture that the solution to the minimization problem in Eq. ( 2) is a fixed Naimark extension in a finite-dimensional space, independent of the state ρ.
Our results also shed light on the information-theoretic analysis of quantum measurement processes [38][39][40].In quantum mechanics, we know that any measurement that extracts information out of a state would inevitably introduce disturbance.The global information balance relation claims that there is a gap between the introduced disturbance and the information gain, as information leakage [38].The relation between intrinsic randomness and the information gain is left for future research.

Supplemental Material: Intrinsic randomness under general quantum measurements
In this supplemental material, we complement the main text with technical details.In Section A, we derive the intrinsic randomness for general PVMs and its some useful properties.In Section B, we present the generalized Naimark extension from the perspective of preprocessing and prove Proposition 1.In Section C, we review the definition and a property of extremal POVM and prove Theorem 1.In Section D, we prove Theorem 2, Corollary 1, Corollary 2, and Theorem 3, and present a numerical approach for the intrinsic randomness function.where p i = tr(P i ρ) is the probability obtaining output i and ρ E i = 1 pi tr A |Ψ Ψ| AE (P A i ⊗ 1 E ) .As Alice's measurement should not change the state of Eve's system, we have The intrinsic randomness of Alice's measurement result, defined by the quantum entropy conditioned on Eve, where H({p i }) = − i p i log p i is the Shannon entropy function, and ρ denotes Alice's initial state.The fourth equality is due to the fact that ρ E i is a pure state.The result is consistent with Eq. (A2).Similar to the case of a von Neumann measurement, the difference between two randomness function is quantified by the discord between A ′ and E [15], where {q E j } is a probability distribution given by measurement on system E. The equality holds since the measurement on E corresponds to a decomposition ρ A = j q E j |ψ j ψ j | and S(A ′ |{q E j }) ρA ′ E = j q E j S(∆ P (|ψ j ψ j |)).It is straightforward to check that both randomness functions, Eq. (A5) and (A8), satisfy the convexity condition,

(A10)
As for the additivity condition for block-diagonal states, it is less obvious.Definition 2 (Block-diagonal state with respect to P).A state is called block-diagonal with respect to P, denoted by ρ = j r j ρ j ≡ ⊕ j r j ρ j with r j = 1 and r j ≥ 0, ∀j, if ∀P i , j = k, For the case of R q , first, from the definition in Eq. (A11), ρ 1 and ρ 2 have different orthogonal supports, where h(r) = −r log r − (1 − r) log(1 − r) is the binary entropy function.Second, the dephasing state is given by, From the definition in Eq. (A11), we can see that ∆ P (ρ 1 ) and ∆ P (ρ 2 ) have orthogonal supports, and hence, By substituting Eq. ( A21) and (A23) into the fifth equality of Eq. (A8), we can prove the claim.
Lemma 2 (Randomness-invariant unitary).For two PVMs connected by a unitary operator U , if for any pure state |ψ in the support of an input state ρ, ∀i, then the randomness of ρ with respect to these two PVMs are the same, Proof.According to the unitary invariance of the randomness functions, we always have R(ρ, U † PU ) = R(U ρU † , P) and need to prove R(ρ, P) = R(U ρU † , P).
(ii) Consider the case R = R q and suppose ρ = j λ j |ψ j ψ j | is the spectral decomposition, its purification can be taken as Ψ AE = j √ λ j |ψ j A |j E .Denote σ = U ρU † and (U A ⊗ 1 E ) Ψ AE is its purification.Write the two classical-quantum states after Alice's measurement as given in Eq. (A6), where from Eq. (A24), p i and the classical measurement outcome system A ′ are the same in the two equations, For any two different eigenstates |ψ j and |ψ j ′ , consider a pure state |ψ = a |ψ j + b |ψ j ′ , with |a| 2 + |b| 2 = 1.According to Eq. (A24), where p ij = ψ j | P i |ψ j and p ij ′ = ψ j ′ | P i |ψ j ′ .Since a, b are arbitrary, it can be obtained Combined with the fact Appendix B: Generalized Naimark extension Lemma 3 (Consistency condition).A Naimark extension should satisfy the consistency condition, ∀ρ A , tr M i ρ A = tr P i (ρ A ⊗ σ Q ) , which is equivalent to, which concludes Eq. (B1).
Consider a Naimark extension for a POVM, as shown in Figure 1(a).One can also view the extended PVM as a unitary followed by a von Neumann measurement, also called rank-1 PVM -a set of rank-1 projectors, as shown in Figure 1(b).Now, the extended PVM P = {P 1 , • • • , P m } can be written as where system A ′ is generally different from A. The unitary operation is sometimes called preprocessing [38,42].Equivalent extension: a joint preprocessing unitary operation on system AQ followed by a rank-1 PVM on some subsystem.
Lemma 4 (Equivalence between two forms of Naimark extensions).For any generalized Naimark extension of a POVM, { P, σ Q }, we can find an equivalent extension, {P, σ Q }, in the form of Eq. (B3), as shown in Figure 1.That is, ∀i, ρ A , where we ignore a trivial zero subspace.
From Eq. (B3), we can see that all the PVM elements, P i , in this extension have the same ranks.The key point to prove the equivalence between the two forms of extensions, Figure 1(a) and (b), is to show that any extension is equivalent to an extension with same rank PVM elements.
Proof.For an extended PVM P = { P1 , • • • , Pm }, denote the maximum rank of the elements as r, and assume s is an integer satisfying (s − 1)d < r ≤ sd.Consider a larger space H ′ with dimension msd and embed H AQ into H ′ .For each rank( Pi ) < sd, we can further extend Pi to rank-sd by adding additional rank-1 projectors {|ϕ ϕ|}, where {|ϕ } are normalized basis states chosen from the complement space of H AQ , H ′ ⊖ H AQ .In the end, we can have a set of m new extended PVM elements, P = {P 1 , • • • , P m }, whose ranks are sd in H ′ and dim(H ′ ) = msd.Note that these newly added complement projectors, {|ϕ ϕ|}, are orthogonal to the state space D(H A ) ⊗ σ Q , so, they have no influence on the measurement outcomes.Now, all the elements have the same ranks, the extended PVM is unitarily equivalent to {|1 1| ⊗ 1, • • • , |m m| ⊗ 1}, i.e., P i = U † (|i i| ⊗ 1)U , as given in Eq. (B3).Now, we can introduce canonical Naimark extension, where systems A and A ′ are the same in Figure 1(b) and the dimension of the ancillary system is the same as the number of POVM elements.
an orthonormal basis of ancillary space H Q .The ancillary state is |1 1|.Then, each P i has the form of with U being a suitable unitary operator to satisfy the consistency condition Proposition 1 (Correspondence between ancillary state and measurement decomposition).In a generalized Naimark extension of a POVM, M, if the ancillary state has a pure state decomposition, σ = j r j |ϕ j ϕ j | with r j = 1 and r j > 0, then there exists a measurement decomposition M = j r j N j , and vice versa.
Proof.Denote a generalized Naimark extension to be {P, σ}.
⇒: The ancillary state has decomposition of σ = j r j |ϕ j ϕ j |.Then, the consistency condition becomes, and hence, Here, N j = {N j 1 , • • • , N j m } forms a POVM on system A for each j.Thus, this gives a decomposition of POVM M = j r j N j .Note that each N j has an extended PVM of P, independent of j.
⇐: The POVM has decomposition of M = l j=1 r j N j .According to the canonical Naimark extension, for each POVM N j , there exists an ancillary system Q 1 with an orthonormal basis {|1 , • • • , |m } and a unitary operator U AQ1 j on global system H A ⊗ H Q1 such that Add another ancillary system Q 2 with an orthonormal basis {|ϕ 1 , • • • , |ϕ l } and Q 1 Q 2 forms the total ancillary system Q in Figure 1(b).Let the input ancillary state be σ , which is in a form of pure state decomposition.The unitary operator and the extended PVM are We need to show the consistency condition, Here, we need to emphasize that the correspondence between the state and measurement decomposition is not unique in general.That is, different |ϕ j ϕ j | might correspond to the same N j .

Appendix C: Extremal POVM and its randomness
The POVM set is convex and some of the POVMs can be treated as a mixture of others, which is equivalent to the existence of a hidden variable in some sense.Those indecomposable POVMs are extreme points of the convex set and play a similar role as pure states [29,43].Similar to the case for mixed states, general POVMs can be decomposed into a mixture of extremal ones.Here, we introduce the definition and some important properties of extremal POVMs.Denote the set of POVMs with at most m outcomes and the one with discrete outcomes as P(m) and P, respectively.For m ≤ n, P(m) ⊆ P(n) ⊆ P, since one can let the n − m additional elements be 0. The sets P(m) and P are both convex.Clearly, the extremal points in P(m) are also extremal in P and the extremal points of P are called extremal POVMs [29,44].
As an example, a PVM is extremal.Next we give a property of extremal POVMs.
Proof.Assume elements of the extremal POVM M are linearly dependent, where not all the coefficients a i 's are 0. Without loss of generality, we can assume a 1 ≥ • • • ≥ a n .Each element M i is nonzero positive semidefinite operator, so a 1 > 0, a m < 0. Define two new POVMs M ′ and M ′′ with, ∀i ∈ [m] = {1, • • • , m}, where M ′ 1 = 0 and M ′′ m = 0. Hence, M ′ = M and M ′′ = M.Meanwhile, This contradicts to Definition 4. Next, we prove in the case of rank-1 POVM, the reverse is also true.Assume M is not extremal and then it can be decomposed to, and hence, which contradicts to the linear independence of M i .
From the Lemma, we can see that the symmetric and information-complete (SIC) POVM is extremal, which is composed of d 2 rank-1 operators, |φ i φ i | /d, with normalized vectors |φ i satisfying [30,31], ∀i = j, | φ j |φ i | 2 = 1 d+1 .Next, we study the intrinsic randomness for extremal POVMs and give a proof of Theorem 1. where The coefficients a, b are arbitrary, thus, W i = 0.For any pure states |ψ 1 and |ψ 2 , we have and according to additivity condition of the randomness functions in Lemma 1, Combine this equation with Lemma 6, then the randomness for extremal POVM is given by a canonical Naimark extension Appendix D: Intrinsic randomness for general POVM Here, we prove Theorem 2, Corollary 1, Corollary 2 and Theorem 3.

Non-random states
Corollary 1 (Necessary and sufficient condition for non-random states).Given a POVM M, a state ρ is non-random, R cf (ρ, M) = 0, iff the measurement has an extremal decomposition, M = j r j N j , satisfying one of the following two equivalent conditions, 1. ∀j, i = i ′ , N j i ρN j i ′ = 0; 2. for each N j , the state has a corresponding spectral decomposition, ρ = k q j k ψ j k ψ j k , such that ∀k, N j i ψ j k = ψ j k for some element N j i .
Proof.We first prove that item 2 is a sufficient and necessary condition for R cf (ρ, M) = 0. Sufficiency (⇒): For each extremal POVM N j , there exists a Naimark extension {P j , |ϕ j ϕ j |}.According to the condition, for ∀k, we can find a POVM element N j i such that It follows that P j i ψ j k ϕ j = ψ j k ϕ j , and moreover, R cf (ρ, M) = j r j R(ρ, N j ) = 0. Necessity (⇐): If R cf (ρ, M) = 0, there exists an extremal decomposition M = j r j N j , such that ∀j, R(ρ, N j ) = R(ρ ⊗ |ϕ j ϕ j | , P j ) = 0. Therefore, ρ ⊗ |ϕ j ϕ j | does not change after the associated block-dephasing operation.We write the dephased state into its spectral decomposition, The eigenstate of ρ ⊗ |ϕ j ϕ j | must be product state.Thus, u j k = ψ j k ϕ j is also an eigenstate of some PVM element P j i .From Eq. (D11), we can obtain N j i ψ j k = ψ j k .The sufficiency and necessity of item 1 can be deduced from the fact that N j i ρN j i ′ = 0, i = i ′ is sufficient and necessary conditions for R(ρ ⊗ |ϕ j ϕ j | , P j ) = 0 [24].
To prove Corollary 2, we need the following definition and two lemmas.
Definition 5 (Grouping/Coarse graining process [45]).Give two POVMs Concretely, the element of two POVMs have the relation where f −1 represents the inverse mapping.
Therefore, M = j r j N j , in addition, for each N j and each |ψ k , there exists a related N j i such that N j i |ψ k = |ψ k .Lemma 8.If R(ρ, M) = 0, then [ρ, M i ] = ρM i − M i ρ = 0, ∀i.
Proof.Since R(ρ, M) = 0, there exists a Naimark extension {P, σ} such that the global input state has a spectral decomposition where ∀i, P i |u k = |u k , or P i |u k = 0.In either case, we can obtain P i (ρ ⊗ σ) = (ρ ⊗ σ)P i .Take partial trace tr Q on both sides of the equality, Combined with the consistency condition, there is M i ρ = ρM i .Now, we give proof of Corollary 2.
Proof.From Lemma 8, the sufficiency is apparent.The two randomness functions have the relation R(ρ, M) ≤ R cf (ρ, M), therefore, the necessity can be directly obtained by Corollary 1 and Lemma 7. To tackle the second problem that the dimension of {r j } is not fixed, we can apply Carathéodory's theorem for convex hulls.Suppose M is a POVM acting on a d-dimensional Hilbert space with m elements.After considering the positive-semidefinite property and completeness, it can be parameterized by (md 2 − 1) real parameters.Then, according to Carathéodory's theorem, the optimal value to Eq. (D27) can be attained by a probability distribution {r j } with at most md 2 terms.Consequently, we can restrict the dimension of {r j } to be md 2 in Eq. (D27) without loss of generality.
With the above results, the global optimum to Eq. (D27) can now be efficiently solved numerically.In particular, for a fixed probability distribution {r j }, the problem becomes a semi-definite programming optimization in the arguments {N j }.

FIG. 1 .
FIG.1.Illustration of a typical QRNG.The source sends quantum signals in the state of ρ to the measurement device, which outputs a sequence of random numbers.Eve could have a certain correlation with the devices, where she could possess the purification of ρ on the source side and know the construction of the detection on the measurement side.Eve might even have entanglement with the internal apparatus.

) Corollary 2 FIG. 3 .
FIG. 3. Comparison among coherence measures of the qubit state |0 with respect to three specific POVMs.
P where I P is the set of incoherent states of P, and K ′ i 's are the Kraus operators of Λ ′ .Under this definition, the coherence measures C defined by R and R cf both satisfy the following essential criteria.(i) Nonnegativity: C(ρ, M) ≥ 0, and C(δ, M) = 0 iff δ ∈ I M ; (ii) Monotonicity: for any POVM-incoherent operation Λ, C(Λ(ρ), M) ≤ C(ρ, M); (iii) Strong monotonicity: for any POVM-incoherent operation Λ with Kraus operators

)
For a block-diagonal state, each PVM element projects diagonal decomposed state ρ j into density operators with different orthogonal supports.From the definition, we can show that the diagonal decomposed states are orthogonal, ∀j = k, tr(ρ j ρ k ) = 0. Consider the spectral decomposition of ρ j = a λ a |α a α a | and ρ k = b µ b |β b β b |, where λ a > 0 and µ b > 0, by Eq. (A11), tr(P i ρ j P i ρ k ) = tr P i a λ a |α a α a | P i b µ b |β b β b | = a,b λ a µ b tr(P i |α a α a | P i |β b β b |) = a,b λ a µ b | α a | P i |β b | 2

FIG. 1 .
FIG. 1. Two equivalent pictures of the adversary scenario.(a) Naimark extension: a PVM on the joint system AQ.(b)Equivalent extension: a joint preprocessing unitary operation on system AQ followed by a rank-1 PVM on some subsystem.