 # Generating Randomness from a Computable, Non-random Sequence of Qubits

Nies and Scholz introduced the notion of a state to describe an infinite sequence of qubits and defined quantum-Martin-Lof randomness for states, analogously to the well known concept of Martin-Löf randomness for elements of Cantor space (the space of infinite sequences of bits). We formalize how 'measurement' of a state in a basis induces a probability measure on Cantor space. A state is 'measurement random' (mR) if the measure induced by it, under any computable basis, assigns probability one to the set of Martin-Löf randoms. Equivalently, a state is mR if and only if measuring it in any computable basis yields a Martin-Löf random with probability one. While quantum-Martin-Löf random states are mR, the converse fails: there is a mR state, x which is not quantum-Martin-Löf random. In fact, something stronger is true. While x is computable and can be easily constructed, measuring it in any computable basis yields an arithmetically random sequence with probability one. I.e., classical arithmetic randomness can be generated from a computable, non-quantum random sequence of qubits.

## Authors

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Martin-Löf randomness for infinite sequences of bits, a central concept in algorithmic randomness, has recently been generalized to infinite sequences of qubits . As is standard in the literature in algorithmic randomness and mathematical logic, let denote the collection of infinite sequences of bits, let denote the set of bit strings of length , and let . is said to be Martin-Löf random (MLR) if it is not in any effectively null set with respect to the uniform measure on . Nies and Scholz introduced the notion of a state to describe an infinite sequence of qubits  and then defined quantum-Martin-Löf randomness for states. We quickly sketch those parts of their work most relevant to the arguments in this paper. All definitions in the introduction section are from  or . See  and  for a detailed introduction to Martin-Löf randomness and computability theory.

###### Definition 1.1.

A state, is an infinite sequence of density matrices such that and , .

Here, denotes the partial trace which ‘traces out’ the last qubit from . is a infinite sequence of qubits whose first qubits are given by . For this notion to be meaningful, is required to be coherent in the following sense; for all , , when ‘restricted’ via the partial trace to it’s first qubits, has the same measurement statistics as the state on qubits given by . We now sketch a few notions from computability theory pertinent to us. Let . We define an

-computable function to be a total function that can be realized by a Turing machine with

as an oracle. By ‘computable’, we will refer to -computable. The concept of an -computable sequence of natural numbers will come up frequently in our discussion.

###### Definition 1.2.

A sequence is said to be -computable if there is a -computable function such that

###### Definition 1.3.

A special projection is a hermitian projection matrix with complex algebraic entries.

Since the algebraic complex numbers have a computable presentation (see ), we may identify a special projection with a natural number and hence talk about computable sequences of special projections. Let

denote the two by two identity matrix.

###### Definition 1.4.

A quantum set (or q- set for short) G is a computable sequence of special projections such that is by and range range .

While a by special projection may be thought of as a computable projective measurement on a system of qubits, a q- class corresponds to a computable sequence of projective measurements on longer and longer systems of qubits and mirrors the concept of a class in computability theory. One of the many equivalent ways of defining a class is as follows. If , let be the set of all such that the initial segment of of length is in .

###### Definition 1.5.

A class is any set of the form,

 S=⋃i∈N⟦Ai⟧

where

1. The indices of form a computable sequence. (Being a finite set, each has a natural number coding it.

A class, S is coded (non-uniquely) by the index of the total computable function generating the sequence occurring in (2) in the definition of . Hence, the notion of a computable sequence of classes makes sense (see , section 3.2). One sees that the special projections in the definition of the q-, play the role of the s which generate a the class, . The following notion is a quantum analog of the uniform measure of which equals , where refers to the cardinality. (The uniform measure on is the measure induced by letting the measure of to be for each . Here, if .)

###### Definition 1.6.

If is a q- class, define where, is the rank of .

Informally, a q- class, may be thought of as an observable whose expected value, when ‘measured’ on a state is tr . The positive-semidefiniteness of density matrices, the coherence of the components of and condition (3) in definition 1.5 ensure that is non decreasing in . As for all , tr exists.

###### Definition 1.7.

A classical Martin-Löf test (MLT) is a computable sequence, of classes such that the uniform measure of is less than or equal to for all m.

###### Definition 1.8.

A quantum Martin-Löf test (q-MLT) is a computable sequence, of q- classes such that is less than or equal to for all m.

Having established the necessary prerequisites, we can define a quantum Martin-Löf random (q-MLR) state. Roughly speaking, a state is q-MLR if it cannot be ‘detected by projective measurements of arbitrarily small rank’.

###### Definition 1.9.

is q-MLR if for any q-MLT , inf.

###### Definition 1.10.

is said to fail the q-MLT , at order , if inf.

## 2 Measuring a state induces a measure on 2ω

To fix notation, let denote the th bit of an , let stand for the probability of the event .

###### Definition 2.1.

An A-computable measurement system (or just ‘measurement system’ for short) is a sequence of orthonormal bases for such that each is complex algebraic and the sequence is A-computable.

Let be a state and be a measurement system. We now work towards formalizing a notion of qubitwise measurement of in the bases in . A (probability) premeasure , (also called a measure representation ), is a function from the set of all finite bit strings to satisfying , . induces a measure on which is seen to be unique by Carathéodory’s extension theorem (See 6.12.1 in ). Flipping a sided fair coin repeatedly induces a probability measure (which happens to be the uniform measure) on

as follows. Let the random variable

denote the outcome of the the th coin flip. The sequence induces a premeasure, , on which extends to the uniform measure on . Here, is the probability that for all . Similarly the act of measuring qubit by qubit in induces a premeasure on which extends to a probability measure (denoted ) on as follows. Let the random variable be the valued outcome of the measurement of the th qubit of . Let be the premeasure induced by the sequence on . extends to on . For any , is the probability that where is the element of obtained in the limit by the qubit by qubit measurement of in . The most conspicuous difference between the two situations is that while the are independent, need not be independent as the elements of can be entangled. We now formalize the above. The following calculations follow from standard results mentioned, for example, in .

We now define and , the induced premeasure. Measure by the measurement operators and define if was obtained by the above measurement. Let be the density matrix corresponding to the post-measurement state of given that yields if measured in the system

 (|b1i⟩⟨b1i|⊗I)i∈{0,1}.

I.e,

To define , measure by the measurement operators

 (I⊗|b2i⟩⟨b2i|)i∈{0,1},

and set if is obtained. We use instead of to define to account for the previous measurement of the first qubit. is defined similarly. By the above,

 p(ij):=p(X(1)=i,X(2)=j)=p(X(1)=i)p(X(2)=j|X(1)=i)=
 p(X(1)=i)tr[I⊗|b2j⟩⟨b2j|((|b1i⟩⟨b1i|⊗I)ρ2(|b1i⟩⟨b1i|⊗I)tr((|b1i⟩⟨b1i|⊗I)ρ2))].

Since , . So,

 p(ij)=tr[ρ2(|b1ib2j⟩⟨b1ib2j|)].

Given , similar calculations show that

 p(τ):=p(X(1)=τ(1),…,X(n)=τ(n))=tr[ρn(|n⨂i=1biτ(i)⟩⟨n⨂i=1biτ(i)∣∣]. (2.1)

This defines . The following lemma shows that is a premeasure. Define to be the unique probability measure induced by it.

,

###### Proof.

Noting that for ,

and letting , the right hand side is

 =tr[(A⊗|bn+10⟩⟨bn+10|)ρn+1+(A⊗|bn+11⟩⟨bn+11|)ρn+1]
 =tr[(A⊗(|bn+10⟩⟨bn+10|+|bn+11⟩⟨bn+11|))ρn+1]=tr[(A⊗I)ρn+1]=tr[Aρn]=p(τ)

###### Remark 2.3.

If is -computable and is -computable, then the sequence is -computable.

Here, is obtained by putting on the even bits and

on the odd bits

.

## 3 Measurement Randomness

Let be the set of MLR bitstrings. If is a state and a measurement system, is the probability of getting a MLR bitstring by a qubit-wise measurement of as described in the previous section.

###### Definition 3.1.

is measurement random (mR) if for any computable measurement system, B,

###### Theorem 3.2.

All q-MLR states are also mR states.

###### Proof.

Let be q-MLR. Suppose towards a contradiction that there is a and a computable such that . Let be the universal MLT  and let for all ,

 Sm=⋃m≤i⟦Ami⟧, (3.1)

where the s satisfy the conditions of Definition 1.5. By the definition of a MLT, for all and all , we can write for some . Now define a q-MLT as follows. For all and , let for convenience and define the special projection:

 pmi=∑a≤km,i(|i⨂q=1bqτa(q)⟩⟨i⨂q=1bqτa(q)∣∣). (3.2)

Letting , we see that is a q-MLT (For each , the sequence is computable since and are computable. Condition 3 in Definition 1.5 implies that for all , rangerange. So, is a q- class for all . for all implies that for all . Since is a MLT, is a computable sequence.) For all m, holds by the definition of a universal MLT. Hence, since 3.1 is an increasing union and as , for all there exists an such that

 μBρ(⟦Ami(m)⟧)>δ. (3.3)

Fix such an and corresponding and let for some as in 3.2. By 2.1 and 3.3, we have that

 δ<∑a≤kp(τa)=∑a≤km,itr[ρi(|i⨂q=1bqτa(q)⟩⟨i⨂q=1bqτa(q)∣∣)]=tr[ρi∑a≤km,i(|i⨂q=1bqτa(q)⟩⟨i⨂q=1bqτa(q)∣∣)] (3.4)

So, by 3.2 and 3.4, we see that for all there is an such that,

 δ

So, inf, contradicting that is q-MLR. ∎

###### Definition 3.3.

is computable if the sequence is computable.

###### Theorem 3.4.

There is a computable state which is not q-MLR but is mR.

###### Proof.

All matrices in this proof are in the standard basis. Let and for , . where is a by matrix with along the diagonal and many s on the extreme ends of the anti-diagonal. Formally, define to be the symmetric matrix such that: For , if or and otherwise. For , if and otherwise. For example, and so,

 d3=⎡⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ⎢⎣2−30000002−302−300002−30002−3000000002−3000000002−3000000002−30002−300002−302−30000002−3⎤⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥ ⎥⎦

Clearly, is a density matrix. The theorem will be proved via the following lemmas.

is not q-MLR.

###### Proof.

It is easy to see that zero has multiplicity

as an eigenvalue of

. Hence, letting , the eigenpairs of can be listed as where if and is a orthonormal basis of .

Fix a . By properties of the Kronecker product,

has a orthonormal basis of eigenvectors:

 {N⨂n=5vnl(n):(l(n))Nn=5 is a sequence such % that for all n,l(n)≤2n},

and has eigenvalue . Letting be those elements of the above eigenbasis having non-zero eigenvalues, we have that

 MN={N⨂n=5vnl(n):(l(n))Nn=5 is a sequence % such that for all n,l(n)≤qn}.

By the definition of ,

 |MN|=N∏n=52n−⌊2n/n⌋≤N∏n=52n−(2n/n)+1=N∏n=52n(1−n−1+2−n)=N∏n=52nN∏n=5(1−n−1+2−n).

Noting that , define a q-MLT as follows. Given , we describe the construction of . Find such that . Let and let

 pγ(N)=∑v∈MN|v⟩⟨v|.

is a special projection on having rank equal to . Let for and

 pk:=pγ(N)⊗k−γ(N)⨂i=1I

for . Using that is computable, it is easy to see that is a q- class. Let . is a q-MLT since the choice of implies that and as can be computed from . demonstrates that is not q-MLR as follows. Fix arbitrarily and let be as above. Recalling that is the set consisting of all eigenvectors of with non-zero eigenvalue, we have that,

 ρ(Tm)≥tr(ργ(N)pγ(N))=tr(SNpγ(N))=tr(SN)=1.

Since was arbitrary, . ∎

The following technical lemma, although seems unmotivated at this juncture, is crucial at a later point in the proof.

###### Lemma 3.6.

Let

be a set of unit column vectors in

. Let be their Kronecker product. If , then for all , we have that

 |vk||v2n−k+1|=n∏i=1|ai||bi|.
###### Proof.

For natural numbers and , let denote the remainder obtained by dividing by . We use the following convention for the Kronecker product :

 [a1b1]⊗[a2b2]=⎡⎢ ⎢ ⎢⎣a1a2b1a2a1b2b1b2⎤⎥ ⎥ ⎥⎦.

So, and . For any , has the form , for some and has the form , for some . Note that if and only if is odd if and only if . Similarly, we have the following. if and only if if and only if . if and only if if and only if . In general, for , for all ,

 cki=ai⟺[k]2i∈{1,…,2i−1}⟺eki=bi.

This proves the lemma. Intuitively, this happens for the following reason. Imagine moving from to (by incrementing ) and keeping track of the values of as you move along the s. Also, imagine moving from to and keeping track of the values of as you move along the s. Both motions are in opposite directions since as is incremented, the first motion is from lower to higher indices and the second is from higher to lower indices. Consider the behavior of as is incremented. At the ‘start’ point, , . Now, as you move (i.e as you increment ), alternates between and equalling it’s starting value, at odd s and alternates between and equalling it’s starting value for odd s. Now, take any . alternates between and in blocks of length . when is in the first block, (i.e, when ) and when is in the second block, (i.e, when ) and so on. Similarly, alternates between and in blocks of length . ∎

###### Lemma 3.7.

Let and let be such that for all i, is unit column vector in and let . Then,

###### Proof.

Fix and as in the statement and write as a block matrix with each block of size by .

 dn=[ABBTA].

Letting , in block form, . Let . It is easily checked that

 ⟨W|dn|W⟩=2−n+a∗nbnV†BV+anb∗nV†BTV.

By the form of B we get,

 V†BV=2−n[v∗1,v∗2,…,v∗2n−1][v2n−1,v2n−1−1,…,v2n−1−rn+1,0,…,0]T.
 =2−nrn∑k=1v∗kv2n−1−k+1.

By the previous lemma,

 |V†BV|≤2−nrn∑k=1|vk||v2n−1−k+1|=2−nrnn−1∏i=1|ai||bi|=2−nrnn−1∏i=1|ai|√1−|ai|2.

Since has a maximum value of and recalling definition of ,

 |V†BV|≤2−n12n−12nn=21−nn.

Similarly, Noting that ,

 |⟨W|dn|W⟩|≤2−n+|a∗nbnV†BV|+|anb∗nV†BTV|≤2−n+21−nn,

and

 |⟨W|dn|W⟩|≥2−n−|a∗nbnV†BV|−|anb∗nV†BTV|≥2−n−21−nn.

###### Lemma 3.8.

is mR.

If is any measure on , we can define Martin-Löf randomness with respect to exactly as we defined it for the uniform measure. Denote by , the set of bitstrings Martin-Löf random with respect to .

###### Proof.

We use ideas similar to Theorem 196(a) in . For convenience, for all , define

 βi:=i−1∑q=5q.

Let be any computable measurement system. We show that . Since , this implies that . Denote by for convenience. Let denote the uniform measure. We will abuse notation by writing instead of the more cumbersome for . Let . Write as a concatenation of finite bitstrings : where for all . Let be the concatenation upto . Let be such that for all ,

 μi(τ):=tr[di(|i⨂q=1bq+βiτ(q)⟩⟨i⨂q=1bq+βiτ(q)|)].

By 2.1 and by the form of we see that,

 μ(Sn)=n∏i=5μi(σi).

Note that is computable  since and are. Since , by the Levin-Schnorr theorem (Theorem 90, section 5.6 in ) there is a such that

 ∀n,−log(μ(Sn))−C1≤KM(Sn).

By Theorem 89, section 5.6 in  fix a such that

 ∀n,KM(Sn)≤−log(λ(Sn))+C2.

By these inequalities and taking exponents, we see that there is a constant such that

 ∀n,μ(Sn)≥αλ(Sn).

Letting and in the above,

 ∀n,n∏i=5ri≥αn∏i=5ri+δi. (3.5)

Let be a probability measure on such that for all . In particular, this implies that

 ∀n,μ′(Sn)=n∏i=5ri−δi.

Note that