Quantum Random Numbers generated by the Cloud Superconducting Quantum Computer

06/11/2019
by   Kentaro Tamura, et al.
Keio University
0

A cloud quantum computer is similar to a random number generator in that its physical mechanism is inaccessible to the users. In this respect, a cloud quantum computer is a black box. In both devices, the users decide the device condition from the output. A framework to achieve this exists in the field of random number generation in the form of statistical tests for random number generators. In the present study, we generated random numbers on the 20-qubit cloud quantum computer and evaluated the condition and stability of its qubits using statistical tests for random number generators. As a result, we observed that the qubits varied in bias and stability. Statistical tests for random number generators may provide a simple indicator of qubit condition and stability, enabling users to decide for themselves which qubits inside a cloud quantum computer to use.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

04/03/2020

Detecting Temporal Correlation via Quantum Random Number Generation

All computing devices, including quantum computers, must exhibit that fo...
10/20/2018

Testing Randomness in Quantum Mechanics

Pseudo-random number generators are widely used in many branches of scie...
08/22/2020

The Effects of Quantum Randomness on a System Exhibiting Computational Creativity

We present experimental results on the effects of using quantum or 'trul...
05/07/2019

Machine Learning Cryptanalysis of a Quantum Random Number Generator

Random number generators (RNGs) that are crucial for cryptographic appli...
05/28/2021

18.8 Gbps real-time quantum random number generator with a photonic integrated chip

Quantum random number generators (QRNGs) can produce true random numbers...
10/10/2019

On the Effects of Pseudo and Quantum Random Number Generators in Soft Computing

In this work, we argue that the implications of Pseudo and Quantum Rando...
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

Given a coin with an unknown probability distribution, there are two approaches to decide whether the coin is fair 

Tamura . The first approach is to examine the coin itself; one expects an evenly shaped coin to yield fair results. The second approach is to actually toss the coin a number of times to see if the output is sound. In this approach, the coin is treated as a black box. A random number generator is similar to a coin in that it is expected to produce unbiased and independent 0s and 1s. Unlike a coin, however, the physical mechanism of a random number generator is often inaccessible to its users. Therefore, users rely on statistical tests to decide the fairness of the device from its output.

Random number generators play an important role in cryptography, particularly in the context of key generation. For example, the security of the RSA cryptosystem is based on keys that are determined by random choices of two large prime numbers rsa . If the choices of prime numbers are not random, an adversary could predict future keys and hence compromise the security of the system. Randomness in cryptography derives from what is called the seed. The seed is provided by physical random number generators seed1 ; seed2 . It is required that the physical mechanism of the physical random number generator remains a black box for the seed to be unpredictable. Given that the measurement outcomes are theoretically unpredictable in quantum mechanics, random number generators based on quantum phenomena are a promising source of unpredictability bell ; qrng ; Herrero-Collantes2016 .

Cloud quantum computers are quantum computers that are accessed online cloud ; news ; news2 ; nmrcloud ; opticalcloud ; QCReview . In order to use a cloud quantum computer, users are required to send programs specifying the quantum circuit to be executed and the number of times the circuit should be run software . When his/her turn arrives, the quantum computer executes the program and returns the results preskill . A similarity between random number generators and cloud quantum computers is that the users do not have direct access to the physical mechanism of the device. So, as far as the users are concerned, both random number generators and cloud quantum computers are black boxes. In the field of random number generation, much research has been done on how to characterize the device from its output. This lead to the creation of statistical tests for random number generators. The present study aims to introduce the idea of statistical tests for random number generators to the field of cloud quantum computing. This aim is supported by three points. Firstly, the cloud quantum computer is a black box to its users, which is also the case with random number generators. Secondly, quantum computers become random number generators when given certain programs. Finally, the cloud quantum computer lacks a simple benchmark that would enable its users to decide the condition of the device.

The rest of this article is organized as follows. In Section 2, the min-entropy, which is a measure of uniformity often employed in the field of cryptography, is introduced. Section 3 generally explains statistical tests for random number generators. Section 4 deals with a group of statistical tests called the NIST SP 800-22. In Section 5, we present the result of statistical analysis of random number samples obtained from the cloud quantum computer, IBM 20Q Poughkeepsie. This Section includes the test results of the 8 statistical tests from the NIST SP 800-22. Finally, Section 6 is devoted to the conclusion.

2 Min-entropy

Among various entropy measures for uniformity, the min-entropy is often used in the context of cryptography. The min-entropy for a random variable

is defined as follows: H_∞(X) = -log_2( x ∈{0, 1}maxPr[X = x] ). On the other hand, Shannon’s entropy, which is also a measure for uniformity, is defined as follows: H_sh(X) = -x ∈{0, 1}∑ Pr[X = x]log_2 Pr[X = x]. Both measures (2) and (2) take values ranging from 0 to 1 for a random variable on . The reason why the min-entropy is more appropriate in the context of cryptography is that it is more sensitive than Shannon’s entropy. This is apparent from Fig. 1. Figure 1 contrasts the min-entropy and Shannon’s entropy corresponding to the probability of yielding 1. The min-entropy provides a clearer distinction of probability distributions close to uniform compared to Shannon’s entropy.

Figure 1: Relation between Shannon’s entropy and min-entropy.

The min-entropy is also indicates the probability that an adversary with knowledge of the probability distribution of predicts the outcome of correctly fpga . Here, the adversary predicts the value that appears with the highest probability. For this reason, the min-entropy considers the maximum probability of .

3 Statistical Tests for Random Number Generators

Statistical tests for random number generators are necessary to confirm that a random number generator is suitable for use in encryption processes stat review . Random number generators used in this context are required to have unpredictability. This means that given any subset of a sequence produced by the device, no adversary can predict the rest of the sequence including the output from the past of future. Random number generators with unpredictability should produce unbiased and independent bits. Statistical tests aim to detect random number generators with bias and/or patterns, which makes them predictable devices.

When subjected to statistical tests, a random number generator is considered a black box. This means that the only information available is its output. Under the null hypothesis that the generator is unbiased and independent, one expects its output to have certain characteristics. The characteristics of the output is quantified by the test statistic, whose probability distribution is known. From the test statistic, the probability that a true random number generator produces an output with a worse test statistic value is calculated. This is called the p-value. If this probability is below the level of significance

, the generator fails the test and the null hypothesis that the generator is unbiased and independent is rejected. Since statistical tests for random number generators merely rule out significantly biased and/or correlated generators, these tests do not verify that a device is the ideal random number generator. Nevertheless, a generator that passes the tests is more reliable than a generator that doesn’t. This is why statistical tests are usually organized in the form of test suites, so as to be comprehensive. Some well known test suites are the NIST SP 800-22 nist , TestU01 TestU01 , and the Dieharder test.

4 Nist Sp 800-22

The NIST SP 800-22 is a series of statistical tests for cryptographic random number generators provided by the National Institute of Standards and Technology nist . Random number generators for cryptographic purposes are required to have unpredictability, which is not strictly necessary in other applications such as simulation and modeling, but is a crucial element of randomness. The test suite contains 16 tests, each test with a different test statistic to characterize deviations of binary sequences from randomness. The entire testing procedure of the NIST SP 800-22 is divided into 3 steps. The first step is to subject all samples to the 16 tests. For each sample, each test returns the probability that the sample is obtained from an unbiased and independent RNG. This probability, which is called the p-value, is then compared to the level of significance . If the p-value is under the level of significance, the sample fails the test. The second step involves the proportion of passed samples for each test. Under the level of significance

, 1% of samples obtained from an unbiased and independent RNG is expected to fail each test. If the proportion of passed samples is too high or too low, the RNG fails the test. Finally, p-value uniformity is checked for each test. Suppose one tested 100 binary samples. This yields 100 p-values per test. If the samples are independent, the p-values should be uniformly distributed for all tests. The distribution of p-values is checked via the chi-squared test.

In the following sections, 8 tests from the NIST SP 800-22 are explained. The input sequence will be denoted , and the th element .

Test # Test name Minimum length
1 Frequency
2 Frequency within a block
3 Runs
4 Longest run of ones
Binary matrix rank
5 DFT
Non-overlapping T. M.
Overlapping T. M.
Maurer’s Universal
Linear complexity
Serial
6 Approximate entropy
7 Cumulative sums (forward)
8 Cumulative sums (backward)
Random excursions
Random excursions variant
Table 1: The minimum length required for each test in order to obtain meaningful results. The tests not employed in the present study are shaded in grey. Note that the tests will be referred to by their test # in the results section.

4.1 Frequency Test

The frequency test aims to test whether a sequence contains a reasonable proportion of 0s and 1s. If the probability of obtaining the sequence from an independent and unbiased random number generator is lower than 1 %, it follows that the random number generator is not independent and unbiased. The minimum length required for this test is 100. [colback=white!5!white,colframe=black!5!black,enforce breakable,pad at break*=1mm,title=Test Description]

  1. Convert the sequence into using the formula: .

  2. Add the elements of together to obtain .

  3. Compute test statistic: .

  4. Compute p-value using complementary error function shown as erfc(z) = 2π∫_z^∞e^-u^2du.

  5. Compare p-value to 0.01. If p-value 0.01, then the sequence is random. Otherwise, the sequence is not random.

[colback=white,enforce breakable,pad at break*=1mm] Example: , length .

  1. .

  2. .

  3. .

  4. P-value .

  5. P-value the sequence is random.

This test is equivalent to testing the histogram for bias. Because the test only considers the proportion of 1s, sequences such as or would pass the test. Failing this test means that the sample is overall biased.

4.2 Frequency Test Within a Block

Firstly, the sequence is divided into blocks of size . The frequency test is then applied to the respective blocks. As a result, one obtains

p-values. The second part of this test aims to check whether the variance of the p-values is by chance or not. This is called the chi-squared (

) test. For meaningful results, a sample with a length of at least 100 is required. The following is the test description. [colback=white!5!white,colframe=black!5!black,enforce breakable,pad at break*=1mm,title=Test Description]

  1. Divide the sequence into non-overlapping blocks of size .

  2. Determine the proportion of 1s in each block using π_i = ∑j=1Mε(i-1)M+jM.

  3. Compute statistic .

  4. Compute p-value . Note that stands for the incomplete gamma function. Γ(z) &= ∫_0^∞t^z-1 e^-t
    igamc(a,x) &≡1Γ(a)∫_0^x e^-t t^(a-1)dt

  5. Compare p-value to 0.01. If p-value 0.01, then the sequence is random. Otherwise, the sequence is not random.

[colback=white,enforce breakable,pad at break*=1mm] Example: , length: .

  1. If , then and the blocks are , , . The final 0 is discarded.

  2. , , .

  3. .

  4. .

  5. P-value .

  6. P-value the sequence is random.

This test divides the sequence into blocks and checks each block for bias. Depending on the block size, samples such as or could pass the test. Failing this test means that certain sections of the sequence are biased.

4.3 Runs Test

The proportion of 0s and 1s does not suffice to identify a random sequence. A run, which is an uninterrupted sequence of identical bits, is also a factor to be taken into account. The runs test determines whether the lengths and oscillation of runs in a sequence is as expected for a random sequence. A minimum sample length of 100 is required for this test. The following is the test description. [colback=white!5!white,colframe=black!5!black,enforce breakable,pad at break*=1mm,title=Test Description]

  1. Compute proportion of ones .

  2. If the sequence passes frequency test, proceed to next step. Otherwise, the p-value of this test is 0.

  3. Compute test statistic , where stands for the XOR operation.

  4. Compute p-value .

  5. Compare p-value to 0.01. If p-value 0.01, then the sequence is random. Otherwise, the sequence is not random.

[colback=white,enforce breakable,pad at break*=1mm] Example: , length .

  1. .

  2. test is applicable.

  3. .

  4. P-value .

  5. P-value , so sequence is random.

4.4 The Longest Run of Ones Within a Block Test

This test determines whether the longest runs of ones within blocks of size M is consistent with what would be expected in a random sequence. The possible values of M for this test are limited to three values, namely, 8, 128 and 10000, depending on the size of the sequence to be tested. [colback=white!5!white,colframe=black!5!black,enforce breakable,pad at break*=1mm,title=Test Description]

  1. Divide the sequence into blocks of size M. The choices of M and N are determined in regard to the length of the sequence. N denotes the number of blocks, and the elements exceeding the number of blocks are discarded.

    Minimum length
    128 8
    6272 128
    750,000 10000
    Table 2: Choices of M for the longest runs of ones within a block test.
  2. Classify each block into the following categories regarding and the length of the longest run in each block. See Table 3.

    Classes
    2 5 11
    3 6 12
    7 13
    8 14
    15
    Table 3: Classifications of each block.
  3. Compute . Note that , and are determined by . See Tables 4 and 5.

    8 3 16
    128 5 49
    10000 6 75
    Table 4: Values of and corresponding to .
    Classes , , ,
    0.2148 0.1174 0.0882
    0.3672 0.2430 0.2092
    0.2305 0.2493 0.2483
    0.1875 0.1752 0.1933
    0.1027 0.1208
    0.1124 0.0675
    0.0727
    Table 5: Values of corresponding to and .
  4. Compute p-value .

  5. Compare p-value to 0.01. If p-value 0.01, then the sequence is random. Otherwise, the sequence is not random.

[colback=white,enforce breakable,pad at break*=1mm] Example:

  1. and . The remaining elements are discarded.

  2. The counts for the longest run of ones are , , , , , and .

  3. χ^2(obs) & = (6 - 49×0.1174)249×0.1174 + (10 - 49×0.2430)249×0.2430
    & + (10 - 49×0.2493)249×0.2493 + (7 - 49×0.1752)249×0.1752 
    & + (7 - 49×0.1027)249×0.1027 + (9 - 49×0.1124)249×0.1124
    & = 3.994459.

  4. P-value .

  5. P-value , so the sequence is random.

4.5 Discrete Fourier Transform Test

This test checks for periodic patterns in the sequence by performing a discrete Fourier transform (DFT). The minimum sample length required for this test is 1000. The following is the test description. [colback=white!5!white,colframe=black!5!black,enforce breakable,pad at break*=1mm,title=Test Description]

  1. Convert the sequence of 0s and 1s into a sequence of s and s.

  2. Apply a DFT on X: . This should yield a sequence of complex variables representing the periodic components of the sequence of bits at different frequencies.

  3. Compute , where is the first elements of . This produces a sequence of peak heights.

  4. Compute . This is the 95 % peak height threshold value. 95 % of the values obtained by the test should not exceed for a random sequence.

  5. Compute , which is the expected theoretical number of peaks that are less than .

  6. Compute , which is the actual number of peaks in that are less than .

  7. Compute .

  8. Compute p-value .

  9. Compare p-value to 0.01. If p-value 0.01, then the sequence is random. Otherwise, the sequence is not random.

This test checks for periodic features. Samples with periodic features may look like or among various other possibilities. Failing this test suggests that the sample has periodic patterns. [colback=white,enforce breakable,pad at break*=1mm] Example: , length .

  1. .

  2. .

  3. .

  4. .

  5. P-value .

  6. P-value , so the sequence is random.

4.6 Approximate Entropy Test

The approximate entropy test compares the frequency of -bit overlapping patterns with that of -bit patterns in the sequence. It checks whether the relation of two frequencies is what is expected from an unbiased and independent RNG. The level of significance is . This test can be applied to samples with lengths equal to or larger than 64. The test description is below. [colback=white!5!white,colframe=black!5!black,enforce breakable,pad at break*=1mm,title=Test Description]

  1. Append the first bits of the sequence to the end of the sequence.

  2. Divide the sequence into overlapping blocks with a length of .

  3. There are possible m-bit blocks. Count how many of each possible block there are in the sequence.

  4. Compute for each count.

  5. Compute the sum of all counts .

  6. Replace with and repeat steps 1 through 5 to obtain .

  7. Calculate test statistic .

  8. Derive p-value .

  9. Compare p-value with level of significance . If p-value , the result is pass. Otherwise, the sequence fails the test.

[colback=white,enforce breakable,pad at break*=1mm] Example: , length , .

  1. .

  2. .

  3. .

  4. .

  5. .

  6. .

  7. P-value .

  8. P-value . The sequence passes the test.

The approximate entropy test checks for correlation between the number of -bit patterns and -bit patterns in the sequence. The difference between the number of possible -bit patterns and the number of possible -bit patterns in the sequence is computed, and if this value is too small or too large, the two patterns are correlated.

4.7 Cumulative Sums Test

The cumulative sums test is basically a random walk test. It checks how far from 0 the sum of the sequence in terms of reaches. For a sequence that contains uniform and independent 0s and 1s, the sum should be close to 0. This test requires a minimum sample length of . [colback=white!5!white,colframe=black!5!black,enforce breakable,pad at break*=1mm,title=Test Description]

  1. Convert 0 to -1 and 1 to +1.

  2. In forward mode, compute the sum of the first elements of . In backward mode, compute the sum of the last elements of .

  3. Find the maximum value of the sums.

  4. Compute the following p-value.

    is the cumulative distribution function for the standard normal distribution. P-value = 1 - &∑_k = (-nz + 1)/4^(nz - 1)/4 [ Φ( (4k+1)zn ) - Φ( (4k-1)zn ) ]


    +&∑_k = (-nz - 3)/4^(nz - 1)/4 [ Φ( (4k+3)zn ) - Φ( (4k+1)zn ) ].

  5. Compare p-value to . If p-value , the result is pass. Otherwise, the sequence fails the test.

[colback=white,enforce breakable,pad at break*=1mm] Example: , length .

  1. .

  2. Forward mode: , , ,
    , ,
    , , ,
    .

  3. In forward mode, the maximum value is .

  4. P-value for both forward and backward.

  5. P-value . The sequence passes the test.

Once the p-value has been calculated for all tests and samples, the proportion of samples that passed the test is computed for each test. Let us consider a case where 1000 samples were subjected to each of the 15 tests. This results in p-values per test. For example, if out of samples passed the frequency test, the proportion of passed samples is . If the proportion of passed samples falls within the following range for all 15 tests, the samples pass the second step of the NIST SP 800-22. The acceptable range of proportion is calculated with (1-α)±3α(1-α)m, where stands for the level of significance and the sample size. It is noted that there still is a controversial topic whether the coefficient should be 3. It is suggested the coefficient should be 2.6 nist_review . In the case of the current example, (4.7) can be calculated using and as (1-0.01)±30.01(1-0.01)1000 = 0.99 ±0.0094. From the fact that is not within acceptable range, it follows that the samples fail the frequency test. The same process is done with all 16 tests and unless the samples pass all tests, the result is that the hypothesis that the RNG is unbiased and independent is rejected.

The final step of the NIST SP 800-22 is to evaluate p-value uniformity of each test. In order to perform the chi-squared () test, the p-value is divided into 10 regions: for . The test statistic is given by χ^2 = ∑_i=1^10(number of samples in i-th region-sample size/10)2sample size/10. When the number of samples in each region is 2, 8, 10, 13, 17, 17, 13, 10, 8, 2, the test statistic 4.7 is calculated as . From , the p-value is p-value = igamc( 92, χ22 ). Therefore, in the current example where , the p-value is . The level of significance for p-value uniformity is . So when the p-value is , it follows that the p-value distribution is uniform. The p-value uniformity test requires at least samples. As mentioned before, it is remarked that passing the NIST SP 800-22 does not ensure a sequence to be truly random nist_cri1 ; nist_cri2 ; nist_cri3 .

5 Quantum Random Numbers Generation on the Cloud Quantum Computer

According to quantum mechanics, the measurement outcomes of the superposition state along the computational basis ideally form a random number sequence. This means that the resulting sequences are expected to pass the statistical tests for RNGs explained previously. Here, the computational basis, and , spans the two-dimensional Hilbert space. In a a quantum computer, the desired state is generated from the initial state by applying the Hadamard gate to a single quantum bit (qubit).

Figure 2: QRNG quantum circuit using the Hadamard gate.

In the present study, the cloud superconducting quantum computer, IBM 20Q Poughkeepsie, was used. The device was given the circuit in Fig. 2 and was repeatedly instructed to execute the circuit times without interruption from 2019/05/09  11:24:27 GMT. Because the quantum computers have multiple users across the globe, interruption between jobs occur qiskit . 8192 is the maximum number of uninterrupted executions (shots) available. Running the circuit with 8192 shots yields a binary sequence with a length of 8192 per qubit. This process was automatically repeated across calibrations. The device goes through calibration once a day (see Table 6).

As a result, samples were obtained from the IBM 20Q Poughkeepsie device. Note that each qubit produced samples, each with a length of . The samples were subjected to the 8 tests from the NIST SP 800-22, which are: the frequency test, frequency within a block test, runs test, longest runs within a block test, DFT test, approximate entropy test, and cumulative sums test (forward, backward). The p-value of each test corresponding to the respective samples was computed. For each test, the proportion of passed samples was checked. The acceptable range of the proportion of passed samples for samples under the level of significance is .

Start time (GMT) End time (GMT)
1 2019/05/08  23:34:19 2019/05/09  05:10:24
2 2019/05/09  21:58:54 2019/05/10  06:23:42
3 2019/05/10  23:07:22 2019/05/11  02:48:12
4 2019/05/11  20:59:21 2019/05/11  23:33:42
5 2019/05/12  20:50:41 2019/05/12  23:24:58
Table 6: The correspondence between calibration start/end time and time of job sent. All dates and times are in GMT.

By constantly running the IBM 20Q Poughkeepsie device for 5 days, we obtained samples for each of the 20 qubits. In theory, these samples should qualify as the output of an ideal random number generator. In random number generation, the output sequences are checked for two properties: bias and patterns. When the sequences show signs of bias or patterns, the device is not in ideal condition. The same logic applies to the cloud quantum computer.

In the present section, the random number output of each qubit inside the IBM 20Q Poughkeepsie device is analyzed. For the purpose of comparison, the data plots of the 20 qubits are aligned to resemble the device topology. The device topology shown in Fig. 3 represents the pairs of qubits which can be entangled.

Figure 3: Device topology of IBM 20Q Poughkeepsie provided by Qiskit.
Figure 4: Min-enrtopy transition of qubit [0][19]. The figure has been rotated 90 degrees. The horizontal axis ranges from 2019/05/09  11:24 GMT to 2019/05/14  07:54 GMT.

The min-entropy of the 579 samples was computed for each qubit. This resulted in 579 min-entropy transition plots for 20 qubits. Figure 4 is organized to form the topology of IBM 20Q Poughkeepsie. The min-entropy takes values from 0 to 1 depending on the highest probability of the probability distribution. When the probability distribution is uniform, the min-entropy is 1. Figure 4 shows how each qubit has a unique tendency for min-entropy. Qubit [17], for example, shows a sudden drop in min-entropy at around 60 hours. A sudden drop in min-entropy suggests that the measurement results can vary depending on when the cloud quantum computer executes a circuit.

Next, the samples are checked for bias. The qubits produced 579 samples with a length of 8192, which forms a 4,743,168-bit sequence. Figure 2 demonstrates the proportion of 1s in the entire sequence output by each qubit. Under the level of significance , the proportion of 1s of a 4,743,168-bit sequence should fall between the red lines. The result is that none of the qubits produced acceptable proportions of 1s (see Fig. 5).

Figure 5: The proportion of 1s of qubit[0][19].

The problem with histograms is that they fail to detect certain anomalies. For example, a sequence consisting of all 0s for the former half and all 1s for the latter half yields a perfect histogram. However, such a sequence is clearly not random. To compensate for this flaw, we focused on the transition of the number of 1s in the sequence. Ideally, the number of 1s in a random number sequence should always be roughly half of the sequence length. The difference between the ideal number of 1s and the observed number of ones for the 4,743,168-bit sequence of each qubit is examined in Fig. 6. Note that here, too, the figures are aligned topologically. Figure 6 shows the stability of each qubit in terms of the proportion of 1s in its output; a linear plot suggests that the qubit is being stably operated.

Figure 6: The difference between the ideal and observed increase in the number of 1s of qubit [0][19]. The figure has been rotated 90 degrees.
Qubits Test #
1 2 3 4 5 6 7 8
0 0.9344 0.9862 0.9240 0.9914 0.9827 0.9793 0.9430 0.9413
1 0.4301 0.9430 0.4231 0.9775 0.9845 0.7530 0.4421 0.4525
2 0.1865 0.7271 0.1865 0.9171 0.9862 0.3523 0.1952 0.2021
3 0.0000 0.0104 0.0000 0.2798 0.9499 0.0000 0.0000 0.0000
4 0.0000 0.3109 0.0000 0.7668 0.9793 0.0155 0.0000 0.0000
5 0.8256 0.9724 0.8221 0.9793 1.0000 0.9326 0.8169 0.8359
6 0.0000 0.3731 0.0000 0.7997 0.9862 0.0155 0.0000 0.0000
7 0.0000 0.0052 0.0000 0.3368 0.9724 0.0000 0.0000 0.0000
8 0.6978 0.9568 0.6874 0.9879 0.9896 0.8428 0.7133 0.7081
9 0.3333 0.7945 0.3316 0.9326 0.9896 0.5216 0.3506 0.3541
10 0.0259 0.6183 0.0259 0.8791 0.9827 0.1623 0.0363 0.0311
11 0.3851 0.6321 0.3782 0.8307 0.9775 0.4801 0.4076 0.3955
12 0.9534 0.9914 0.9465 0.9965 0.9931 0.9810 0.9637 0.9482
13 0.5751 0.9136 0.5682 0.9516 0.9983 0.7634 0.5855 0.5872
14 0.0104 0.0345 0.0104 0.4974 0.9758 0.0138 0.0104 0.0104
15 0.7271 0.9655 0.7185 0.9775 0.9827 0.8653 0.7530 0.7513
16 0.0155 0.0674 0.0155 0.5458 0.9655 0.0242 0.0138 0.0155
17 0.7945 0.9016 0.7841 0.9551 0.9758 0.8428 0.7962 0.7910
18 0.8031 0.9396 0.7962 0.9724 0.9896 0.8636 0.8117 0.7910
19 0.0035 0.0259 0.0035 0.4456 0.9741 0.0069 0.0035 0.0052
Table 7: P-values corresponding to the proportion of passed samples for each test. The test names corresponding to the test # can be found in Table 1. The acceptable range is .

6 Conclusion

We characterized the qubits in a cloud quantum computer by using statistical tests for random number generators to provide a potential indicator of the device’s condition. The IBM 20Q Poughkeepsie device was repeatedly run for a period of 5 days, and 579 samples with a length of 8192 were obtained for each of the 20 qubits. These samples were statistically analyzed for bias and patterns. To evaluate the uniformity of each sample, the min-entropy was computed. The transition of min-entropy showed that the qubits have unique characteristics. We identify a sudden drop of min-entropy in qubit [17]. The histogram of the proportion of 1s in the -bit sequences produced by each qubit revealed that overall, none of the qubits produced acceptable proportions of 1s. However, we evaluated each qubit stability from the time-series data of the proportion of 1s, and found that qubits [0] and [12] were relatively stable. Instead of deciding whether a qubit is ideal or not under the level of significance, interpreting the p-value as an indicator of how close to ideal a qubit is provides a more flexible interpretation of the test results. Finally, 8 tests from the NIST SP 800-22 were applied to the 529 samples of the 20 qubits. None of the qubits cleared the standards of the test suite. However, the test results show that qubits [0] and [12] were the closest to ideal in terms of randomness.

As is the case with random number generators, the cloud quantum computer is a black box to its users. Therefore, the users are required to decide for themselves when to use the device and which qubits to choose. Statistical tests for random number generators are a potential candidate for a simple indicator of qubit condition and stability inside a cloud quantum computer.

Acknowledgements.
The authors thank Shumpei Uno and Rudy Raymond for valuable discussions. This work is partially supported by JSPS KAKENHI (Grant Nos. 17K05082 and 19H05156). The results presented in this paper were obtained in part using an IBM Q quantum computing system as part of the IBM Q Network. The views expressed are those of the authors and do not reflect the official policy or position of IBM or the IBM Q team.

Bibliography

  • (1) K. Tamura and Y. Shikano, in Workshop Workshop on Quantum Computing and Quantum Information, TUCS General Publication, 2019 (eds.) M. Hirvensalo and A. Yakaryılmaz, in press. http://users.utu.fi/mikhirve/workshop2019/W02.pdf
  • (2) D. Boneh, Notices Am. Math. Soc. 46, 203 (1999).
  • (3) W. Schindler and W. Killmann in Cryptographic Hardware and Embedded Systems - CHES 2002, Lecture Notes in Computer Science 2523 edited by B. S. Kaliski, K. Koç, C. Paar (Springer, Berlin, 2003) p. 431.
  • (4) K. Ugajin et al., Opt. Exp. 25, 6511 (2017).
  • (5) S. Pironio et al., Nature 464, 1021 (2010).
  • (6) X. Ma, X. Yuan, Z. Cao, B. Qi, and Z. Zhang, npj Quantum Information 2, 16021 (2016).
  • (7) M. Herrero-Collantes and J. C. Garcia-Escartin, Rev. Mod. Phys. 89, 015004 (2017).
  • (8) R. Srivastava, I. Choi, and T. Cook, The Commercial Prospects for Quantum Computing (Networked Quantum Information Technologies, 2016).
  • (9) E. Gibney, Nature 541, 447 (2017).
  • (10) D. Castelvecchi, Nature 543, 159 (2017).
  • (11) T. Xin et al., Science Bulletin 63, 17 (2018).
  • (12) Y. Yamamoto, M. Sasaki, and H. Takesue, Quant. Sci. Tech. 4, 020502 (2019).
  • (13) National Academies of Sciences, Engineering, and Medicine, Quantum Computing: Progress and Prospects (Washington DC, The National Academies Press, 2019).
  • (14) R. LaRose, Quantum 3, 130 (2019).
  • (15) J. Preskill, Quantum 2, 79 (2018).
  • (16) X. Zhang, Y. Nie, H. Liang, and J. Zhang, IEEE-NPSS Real Time Conference (RT), Padua, 1 (2016).
  • (17) H. Demirhan and N. Bitirim, J. Statisticians: Stat. Actuar. Sci. 9, 1 (2016).
  • (18) L. E. Bassham et al., NIST Special Publication 800, 163 (2001).
  • (19) P. L’ecuyer and R. Simard, ACM Trans. Math. Softw. (TOMS) 33, 22 (2007).
  • (20) S. Marek, R. Zdenĕk, M. Vashek, M. Kinga, and S. Alin, Rom. J. Inf. Sci. Tech. 18, 1 (2015).
  • (21) S.-J. Kim, K. Umeno, and A. Hasegawa, arXiv:nlin/0401040.
  • (22) L. Fan, H. Chen, and S. Gao, in Information Security Applications, WISA 2013, Lecture Notes in Computer Science 8267 edited by Y. Kim, H. Lee, and A. Perrig (Springer, Cham, 2014) p. 52.
  • (23) H. Haramoto and M. Matsumoto, Math. Comput. Simul. 161, 66 (2019).
  • (24) G. Aleksandrowicz et al., doi:10.5281/zenodo.2562110 (2019) version: 0.10.1.