A computer-implemented method for determining a control sequence, a computer implemented method for determining a random number, and related system

A control sequence for quantum elements generates certified random numbers efficiently, addressing inefficiencies in current methods by using a statistical test to verify the authenticity of random number generation on near-term quantum devices.

WO2026244179A1PCT designated stage Publication Date: 2026-11-26QMILL OY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/FI2026/050259
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-23
Filing Date
2026-05-19
Publication Date
2026-11-26

AI Technical Summary

Technical Problem

Current methods for generating random numbers using quantum computers are inefficient and lack verification of true randomness, especially with near-term quantum devices, and verifying samples obtained from remote quantum computing devices is computationally expensive.

Method used

A method for determining a control sequence for quantum elements that produces bit strings usable for generating certified random numbers, where the bit strings can be verified using a classical computing device with limited resources, by employing a statistical test that distinguishes outputs from quantum and classical computing devices.

Benefits of technology

Enables efficient generation and verification of certified random numbers using near-term quantum devices, ensuring the authenticity of the random numbers generated and reducing computational overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FI2026050259_26112026_PF_FP_ABST
    Figure FI2026050259_26112026_PF_FP_ABST
Patent Text Reader

Abstract

A method for determining a control sequence for performing a series of interactions between quantum elements to determine a random number is provided, the method comprising determining a control sequence for performing a series of interactions between n quantum elements, wherein the control sequence is determined such that implementation of the control sequence on a trusted or ideal quantum computing device from a predetermined initial state produces comparison outcomes, wherein when the comparison outcomes are used to calculate an outcome of a selected statistical test T to obtain a comparison statistical outcome, the comparison statistical outcome deviates by over a first threshold from a random statistical outcome, wherein the random statistical outcome corresponds to calculation of an outcome of the statistical test T when calculated using a classically sampleable random distribution A method for determining a random number is also provided.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] A COMPUTER-IMPLEMENTED METHOD FOR DETERMINING A CONTROL SEQUENCE, A COMPUTER IMPLEMENTED METHOD FOR DETERMINING A RANDOM NUMBER, AND RELATED SYSTEM

[0002] TECHNICAL FIELD OF THE INVENTION

[0003] The invention relates to quantum computing in general. More specifically, the invention relates to a computer-implemented method for determining a control sequence for performing a series of interactions between quantum elements to determine a random number, a computer-implemented method for determining a random number and a related computer program product and system, where a certified random number may be determined by verifying that at least a portion of obtained bit strings have been obtained by executing a selected control sequence by a quantum computing device.

[0004] BACKGROUND OF THE INVENTION

[0005] Quantum computers are foreseen as being useful relating to various types of problems. Unfortunately, many applications are expected to be feasible only with fault-tolerant quantum computers that will not be available for at least the next 10 years. It is therefore important to identify use-cases where the quantum resources could bring advantage with either current or near-term (NISQ) quantum devices.

[0006] Quantum computers in general are feasible for the generation of certified random numbers. High quality (genuine) random numbers have applications in various fields such as cryptography (e.g. generating random prime numbers), cybersecurity, banking, defense, communications, proof of work cryptocurrencies, gambling, and numerical computation via monte Carlo integration.

[0007] To obtain random numbers from a quantum computing device, one could for instance apply Hadamard gates to prepare an equal superposition of all states and measure the states of qubits to obtain the desired number. Some solutions for obtaining random numbers using quantum computers that have been presented, such as ones involving implementing quantum states whose coefficients are given by a cryptographic function, cannot be implemented on current NISQ devices.

[0008] When obtaining random numbers directly e.g. from a service provider, it may be impossible to verify that the provided numbers are truly random. In some applications, one could generate random numbers by obtaining samples of results obtained from quantum computations and then generating random numbers based on the results. Yet, if the samples of results are obtained from an external, possibly remote party claiming to haveobtained the results by using a quantum computing device, it may be difficult to verify that the results have actually been obtained through use of a quantum computing device.

[0009] Some applications involving currently available quantum hardware are based on sampling from the output distribution of a quantum circuit, which according to the laws of quantum mechanics contains genuine randomness. With the known methods, verifying that obtained samples of an output distribution have been obtained through use of a quantum computing device is computationally very expensive.

[0010] It would be advantageous to provide a method for generating certified random numbers, where it may be verified that samples of bit strings obtained to generate the random number have been obtained through using a quantum computing device.

[0011] SUMMARY OF THE INVENTION

[0012] An object of the invention is to alleviate at least some of the problems in prior art. According to one aspect of the invention, a computer-implemented method is provided for determining a control sequence for performing a series of interactions between quantum elements to determine a random number, the method comprising, preferably at a first computing device, said first computing device being used as a classical computing device, determining a control sequence for performing a series of interactions between n quantum elements, wherein the control sequence is determined such that implementation of the control sequence on a trusted or ideal quantum computing device from a predetermined initial state produces comparison outcomes, wherein when the comparison outcomes are used to calculate an outcome of a selected statistical test T to obtain a comparison statistical outcome, the comparison statistical outcome deviates by over a first threshold from random statistical outcomes, wherein a random statistical outcome corresponds to calculation of an outcome of the statistical test T when calculated using a classically sampleable random distribution.

[0013] With the present invention, a control sequence for performing a series of interactions between quantum elements (which could be a quantum circuit, for instance) may be determined, wherein the control sequence is usable, when executed on a quantum computing device, for obtaining bit strings that may be utilized in determining a random number. The random number may, when obtained through use of a quantum computing device, be a genuine / certified random number. The control sequence may be determined in such a manner that verifying that obtained bit strings have been obtained by executing the control sequence on a quantum computing device may be carried out, preferably by using a limited amount of computational resources.The invention could be utilized to verify that obtained samples (bit strings that allegedly correspond to outcomes of executing the control sequence on a quantum computing device) are actually obtained through use of a quantum computing device. In some cases, a verifying party may obtain a control sequence as prescribed herein and send the control sequence to a third party for execution. The third party may claim to have a quantum computing device in use, whereby the present invention may allow the verifying party to verify this claim.

[0014] The inventors have realized that selecting a suitable statistical test may allow distinguishing the outputs of the control sequence that are obtained by using a quantum computing device from a distribution of values that can be produced by a classical computing device. Thus, the invention may be useful in verifying that samples obtained from a remote alleged quantum computing device are samples obtained from the output distribution of the control sequence, whereby at least some true randomness must be present in the samples.

[0015] The invention is usable for generating random numbers by utilizing NISQ devices, as it does not require implementing classical hash functions, such as SHA256, on quantum hardware.

[0016] The statistical test may be efficient to run on a classical computing device, as opposed to other randomness protocols, where tests for certifying randomness may be exponentially difficult to run.

[0017] With the present invention, a single protocol for obtaining random numbers using NISQ devices and simple verification of obtained samples is provided, enabling efficient generation of certified random numbers using near-term quantum devices.

[0018] A determined control sequence may be provided as an output. The control sequence may be a quantum circuit or may be indicative of a quantum circuit that is intended to be executed at a quantum computing device. The control sequence may be an entity that may be used to determine a quantum circuit, such as a Hamiltonian of an instantaneous quantum polynomial (IQP) circuit.

[0019] A considered classically sampleable random distribution can preferably be sampled from under a first time limit. The first time limit may be e.g. a day, or more preferably an hour, or even more preferably, a minute. In general, smaller time limits are advantageous in applications, as it means that the user has access to the random numbers sooner.

[0020] The protocol enabled by the present invention may thus be designed such that any classical spoofing strategy that produces bit strings passing the statistical test T with probability above a predetermined threshold would require more than a predetermined amount ofclassical computational resources (time and / or memory), whereas a verifier’s computations remain within fixed resource bounds.

[0021] The first threshold of the deviation of the comparison statistical outcome from the random statistical outcome may be a predetermined deviation corresponding to a statistically significant difference between the comparison statistical outcome and the random statistical outcome, optionally where the first threshold of the deviation corresponds to at least a couple of standard deviations, preferably at least three standard deviations, more preferably more than three standard deviations, of a sampling distribution of the statistical test T, preferably such that the first threshold of deviation can be detected with at least 90% probability, using at most 109comparison outcomes, more preferably 106or even more preferably 104comparison outcomes.

[0022] Some embodiments of the method may comprise determining the comparison statistical outcome and random statistical outcome and determining the control sequence based thereon. In further embodiments of the method, a control sequence may be determined such that the control sequence comprises characteristics that inherently fulfil the condition that implementation of the control sequence on a trusted or ideal quantum computing device from a predetermined initial state produces comparison outcomes, wherein when the comparison outcomes are used to calculate an outcome of a selected statistical test T to obtain a comparison statistical outcome, the comparison statistical outcome deviates by over a first threshold from a random statistical outcome, wherein the random statistical outcome corresponds to calculation of an outcome of the statistical test T when calculated using a classically sampleable random distribution.

[0023] The method may comprise determination of the comparison statistical outcome by using a classical computing device, optionally by using an exact mathematical expression, or obtaining comparison outcomes by executing the control sequence on a trusted quantum computing device, and using the thus determined comparison outcomes in determining the comparison statistical outcome.

[0024] The method may comprise determination of a control sequence and selection of the statistical test such that one or more characteristics of the control sequence and statistical test are correlated.

[0025] The statistical test T may be selected to comprise the calculation of the expectation value of a, preferably traceless, Hermitian operator H, optionally expressed as a linear combination of Pauli strings, which are optionally Pauli-Z strings, and the method may comprise determining the control sequence to prepare a quantum state that has an H-expectation value that differs significantly from 0, preferably by at least 104, more preferably by 103or even more preferably by 102. The statistical test T is advantageously one that can be performed using limited computational resources.

[0026] In one embodiment, the statistical test T may comprise computing the experimental expectation value of a function f (x), where the function f is a function that takes an n-bit binary string and outputs a binary string.

[0027] The control sequence may be determined by starting from a variational circuit, optionally with random variational parameters, and where the expectation value of the state prepared by the variational circuit is optimized, preferably with intermediate random perturbation steps, to promote the H-expectation value of the state prepared by the variational circuits, where the method of optimization is optionally VQE, QAOA, or a hybrid implementation of gradient descent or simulated annealing, where the H-expectation values and the gradients thereof with respect to the variational parameters are optionally computed with a quantum computing device.

[0028] In some embodiments, the control sequence may be determined as producing associated comparison outcomes that are biased with respect to a selected bit string s or a selected plurality of bit strings s, and the selected Hermitian operator H is H = 6sor H =

[0029]

[0030] respectively, where <5®sis the tensor product of Pauli- operators.

[0031] If the control sequence is determined as producing associated comparison outcomes that are biased with respect to a selected bit string s, the control sequence may be determined as corresponding to an instantaneous quantum polynomial (IQP) circuit, the method comprising selecting a bit string s of length n, wherein n corresponds to a number of quantum elements to be utilized by the control sequence, and determining a first matrix G, wherein the first matrix is a binary matrix G e

[0032]

[0033] where F"xmis the set of all matrices with n rows and m columns, where the first matrix is used to determine a Hamiltonian of the IQP circuit as H =

[0034]

[0035] n”=iXGi'-, wherein the control circuit may be determined by

[0036] sampling a second matrix Go, wherein the second matrix is a random binary matrix G

[0037]

[0038] oe

[0039] selecting a set 0 of j vectors being orthogonal with respect to s, determining the first matrix G by adding selected columns to the second matrix Goby carrying out m - I rounds of:

[0040] o selecting a vector o from the set of vectors 0,o sampling k - 1 column vectors, optionally using varying for each round, of the second matrix Go, optionally such that there is an odd number of non-orthogonal vectors,

[0041] o summing the column vectors v =

[0042]

[0043] o + %iEland appending the column vectors to the first matrix as G <- [G, v],

[0044] o mixing the order of columns of the first matrix G.

[0045] One aspect of the invention relates to a computer-implemented method for determining a random number, the method comprising obtaining a control sequence for performing a series of interactions between n quantum elements and obtaining an indication of a statistical test T or selecting a statistical test T, wherein the statistical test T is usable in determining at least one characteristic of obtained bit strings, said characteristic being indicative of an estimated fraction of the bit strings that correspond to ideal measurement outcomes obtainable when executing the control sequence on an ideal quantum computer, providing an indication of a predetermined initial state of n quantum elements and the control sequence for use to implement the control sequence at a second computing device, said second computing device preferably being a quantum computing device, wherein the method comprises at least one round of

[0046] obtaining, preferably at a verifying computing device, said verifying computing device being used as a classical computing device, optionally wherein the verifying computing device is the first computing device, a plurality of bit strings from an external source, the plurality of bit strings being indicative of alleged measurement outcomes of executing the control sequence at a second computing device,

[0047] wherein the method further comprises

[0048] using at least a portion of the obtained plurality of bit strings to calculate an outcome of the statistical test to determine a measured statistical outcome,

[0049] determining at least one parameter indicative of a lower bound for an amount of entropy comprised in the plurality of bit strings based on the measured statistical outcome, and

[0050] determining a random number based on the plurality of bit strings and the lower bound for an amount of entropy in the plurality of bit strings. The lower bound may be an estimate for the lower bound for an amount of entropy comprised in the plurality of bit strings.

[0051] The method for determining a random number may comprise determining a control sequence as described further herein. A statistical test may also be selected. A method fordetermining a control sequence and a method for determining a random number may be carried out by the same computing device, such as a first computing device.

[0052] Alternatively, the control sequence may be determined separately (at a first computing device), whereby the method for determining a random number is carried out at a further computing device, such as a verifying computing device. The verifying computing device may obtain the control sequence from the first computing device. The verifying computing device may obtain an indication of the statistical test from the first computing device or the method of determining a random number may comprise selecting the statistical test based on the control sequence.

[0053] The method may further comprise, at each round or after all rounds have been completed, comparing the measured statistical outcome to a predetermined spoof statistical outcome, said spoof statistical outcome corresponding to an outcome of the statistical test T calculated using determined spoof measurement outcomes obtainable by utilizing classical computing means. The spoof measurement outcomes may be determined by classical simulation of the control sequence, while the method may further comprise verifying bit strings that are usable for determining a random number based on the comparison. The spoof measurement outcomes may be determined as an estimated best possible classically obtainable output distribution of the control sequence. Determining the spoof measurement outcomes may be carried out using selected bounds for time and computational resources.

[0054] Determining at least one parameter indicative of the lower bound for an amount of entropy comprised in the plurality of bit strings may comprise determining a lower bound for an estimated fraction F of the obtained plurality of bit strings that corresponds to measurement outcomes obtainable from an ideal output distribution of the control sequence, optionally by comparing the measured statistical outcome to a predetermined spoof statistical outcome, said spoof statistical outcome corresponding to an outcome of the statistical test T calculated using determined spoof measurement outcomes obtainable by utilizing classical computing means, optionally by classical simulation of the control sequence. A lower-bound estimation of the entropy Eideai of an ideal measurement output distribution, obtainable when the control sequence is implemented on an ideal quantum computing device, may further be used. A lower bound for the amount of entropy comprised in the plurality of bitstrings may be determined using the formula E=F*Eideai

[0055] The method may comprise determining a minimum number of bit strings that is to be obtained as the plurality of bit strings from the external source during one round, the method further preferably comprising determining a time limit for obtaining the plurality of bit stringsfrom the external source during one round, wherein the time limit is preferably determined by the time complexity of a classical simulation of the control sequence.

[0056] Th method may comprise determining a random number by converting at least a portion of the bit strings into a binary string and using said binary string as the random number or utilizing a randomness extractor to determine a random number based on the binary string. The method may thus be combined with a randomness extractor to produce random numbers that have higher entropy than the output distribution of the control sequence.

[0057] The method may comprise applying a randomness extractor to at least a portion of the bit strings, wherein the method may further comprise determining an applied amount of distillation based on the determined lower bound of entropy contained in the samples.

[0058] One further aspect of the invention relates to a computer program product comprising program code means adapted to execute the method of determining a control sequence and / or the method of generating random numbers when run on a classical computing device.

[0059] The invention also provides a system comprising at least one computing device, preferably being a classical computing device, wherein the system comprises at least a first computing device, being configured to determine a control sequence for performing a series of interactions between n quantum elements, wherein the control sequence is determined such that implementation of the control sequence on a trusted or ideal quantum computing device from a predetermined initial state produces comparison outcomes, wherein when the comparison outcomes are used to calculate an outcome of a selected statistical test T to obtain a comparison statistical outcome, the comparison statistical outcome deviates by over a first threshold from a random statistical outcome, wherein the random statistical outcome corresponds to calculation of an outcome of the statistical test T when calculated using a classically sampleable random distribution.

[0060] A system may comprise a verifying computing device, optionally wherein the verifying computing device is the first computing device, wherein the verifying computing device is configured to:

[0061] obtain the control sequence, and

[0062] provide an indication of a predetermined initial state of n quantum elements and the control sequence for use to implement the control sequence at a second computing device, said second computing device preferably being a quantum computingdevice, wherein the verifying computing device is configured to perform at least one round of

[0063] obtaining a plurality of bit strings from an external source, the plurality of bit strings being indicative of alleged measurement outcomes of executing the control sequence at a second computing device, and

[0064] using at least a portion of the obtained plurality of bit strings to calculate an outcome of the statistical test to determine a measured statistical outcome,

[0065] wherein the verifying computing device is further configured to

[0066] determine at least one parameter indicative of a lower bound for an amount of entropy comprised in the plurality of bit strings based on the measured statistical outcome, and

[0067] determine a random number based on the plurality of bit strings and the lower bound for an amount of entropy in the plurality of bit strings.

[0068] “Comparison outcomes” refer to theoretical or simulated measurement outcomes that would be obtained by executing the control sequence on an ideal quantum computing device from a predetermined initial state.

[0069] “Comparison statistical outcome” refers to the value of the statistical test T when applied to comparison outcomes.

[0070] “Random statistical outcome” refers to the value of the statistical test T when applied to samples drawn from a classically sampleable random distribution, such as a uniform distribution over n-bit strings.

[0071] “Measured statistical outcome” is an outcome of the statistical test T being applied on obtained bit strings, which may be obtained from an external source that claims to execute the control sequence on a quantum computing device.

[0072] “Spoof measurement outcomes” are bit strings generated by a classical computing process that attempts to mimic the ideal quantum output distribution of the control sequence without executing the control sequence on a quantum computing device.

[0073] “Spoof statistical outcome” refers to the value of the statistical test T when applied to spoof measurement outcomes.

[0074] The novel features which are considered as characteristic of the invention are set forth inparticular in the appended claims. The invention itself, however, both as to its construction and its method of operation, together with additional objects and advantages thereof, will be best understood from the following description of specific example embodiments when read in connection with the accompanying drawings.

[0075] BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Next the invention will be described in greater detail with reference to exemplary embodiments in accordance with the accompanying drawings.

[0077] Figure 1 illustrates a flow chart of a method.

[0078] Figure 2 shows a flow chart of a method.

[0079] Figure 3 shows an orthogonality bias of an IQP quantum circuit.

[0080] Figure 4 shows an output distribution of an example control sequence.

[0081] Figure 5 shows a histogram of the output probabilities of Figure 4.

[0082] Figure 6 shows absolute values of the biases with respect to all non-zero 12-bit binary vectors sampled from an output distribution of an example control sequence. Figure 7 depicts an example of a system.

[0083] DETAILED DESCRIPTION

[0084] Figure 1 shows a flow chart of a computer-implemented method for determining a random number, which may be carried out at a verifying computing device, which may be a first computing device. The verifying computing device and first computing device may be classical computing devices or other computing devices, such as quantum computing devices, that are being used as classical computing devices.

[0085] The method comprises obtaining 102 a control sequence for performing a series of interactions between n quantum elements of a quantum computing device and obtaining an indication of a statistical test T or selecting a statistical test T. The statistical test T is usable in determining at least one characteristic of obtained bit strings, the characteristic being indicative of an estimated fraction of the bit strings that correspond to ideal measurement outcomes obtainable when executing the control sequence on an ideal quantum computer.The method may comprise obtaining the control sequence by determining the control sequence as will be further specified below or the method may comprise obtaining a predetermined control sequence.

[0086] The method further comprises providing 104 the control sequence for use to implement the control sequence at a second computing device, and providing an indication of a predetermined initial state of n quantum elements. The second computing device is preferably a quantum computing device. The method may comprise transmitting the control sequence to a third-party computing device, which may be a classical computing device, whereby the third-party computing device may transmit or prepare the control sequence for use at a second computing device which is a quantum computing device. It may be one aim of the invention to verify that the control sequence has been executed on a quantum computing device. The quantum computing device may be e.g. a quantum computer, such as a superconducting quantum computer, a photonic quantum computer, or a quantum computer based on trapped ions or artificial atoms.

[0087] The control sequence may be implemented on the second computing device by executing the control sequence using n quantum elements and starting from the predetermined initial state of the n quantum elements. The quantum elements may be capable of storing quantum information, being in quantum superposition, and having entangled quantum states. The quantum elements may be for example qudits or qubits, i.e. quantum bits, realized as superconducting qubits, such as transmons or fluxoniums, trapped ions, photonic systems, and / or artificial atoms, for example.

[0088] The method continues by obtaining 106 a plurality of bit strings from an external source, the plurality of bit strings being indicative of alleged measurement outcomes of executing the control sequence at a second computing device. The external source may be a source that is associated with the party to which the control sequence has been provided for use, and may e.g. be a third-party computing device.

[0089] The method then comprises using at least a portion of the obtained plurality of bit strings to calculate an outcome of the statistical test T to determine 108 a measured statistical outcome.

[0090] At least one parameter indicative of a lower bound for an amount of entropy e comprised in the plurality of bit strings is then determined 110 based on the measured statistical outcome. The lower bound or minimum amount of entropy may be an estimate for the minimum amount of entropy and corresponds to an amount of guaranteed randomness in the obtained bit strings.A predetermined ideal entropy parameter and a spoof statistical outcome may further be utilized in determining the lower bound for an amount of entropy e, as will be considered further below. A predetermined ideal entropy parameter may be indicative of an amount of entropy comprised in ideal measurement outcomes, wherein the ideal measurement outcomes correspond to outcomes obtainable when the control sequence is implemented on an ideal quantum computing device.

[0091] The estimation / determination of a lower bound for the amount of entropy may be carried out, for example, by first estimating a lower bound of the fraction F of the bits strings that are from the ideal output distribution of the control sequence based on the measured statistical outcomes. If the expected amount of entropy per sample from the ideal output distribution of the control sequence is e', then the lower bound for an amount of entropy may be determined as e = F*t*e where t is the number of samples (bit strings obtained). The number of output samples is determined to be such that there is a high probability, such as 99%, that the results of the statistical tests are not caused by chance. Thus, more output samples may mean more certainty. The required number of output samples may be estimated e.g. by standard statistical methods once the desired threshold of certainty has been set.

[0092] An aspect that may be considered is the imperfect fidelity of current and near term quantum computers. With fidelity Fi < 1, a noisy intermediate-scale quantum computer correctly executes the intended control sequence, or quantum circuit based on the control sequence, only with probability F and the rest of the time it can be considered to sample from the uniform distribution. With proper choice of the control sequence, an output sample from an imperfect quantum computer can still be distinguishable from that of any classical computer and it can be certified that some fraction of the output samples are from executing an intended control sequence on a quantum computing device. Therefore, one way to estimate the entropy is to use the estimated expectation value of a Hermitian operator H utilized as the statistical test to estimate the fidelity of executing the control sequence correctly. For example, if the fidelity is estimated at 50%, then 50% of the bit strings originate from executing the control sequence. If the expected amount of entropy from a sample obtained from an ideal quantum computing device is e’ bits, and the total number of samples is t, then the expected amount of certifiable entropy in the samples is 0.5*f*e’.

[0093] The steps of obtaining 106 bits strings and determining 108 a measured statistical outcome are carried out at least once, while the method may also comprise a plurality of rounds of said steps.The obtaining 102 of a control sequence and providing 104 the control sequence may also be carried out a plurality of times. In one embodiment, a new control sequence is provided for use at every round of carrying out steps 106 and 108.

[0094] The method then comprises determining 112 a random number based on the plurality of bit strings and the lower bound for an amount of entropy in the plurality of bit strings.

[0095] The method may comprise determining a minimum number of bit strings that is to be obtained as the plurality of bit strings from the external source during one round.

[0096] At least a portion of the obtained bit strings may be discarded according to predetermined criteria. For example, all-zeros bit strings or repeating bit strings may be discarded and not used in the determination of a random number. Depending on the exact construction of the control sequence, there can be many choices for discarding some samples. An idea behind discarding samples is to negate any advantage by using tricks to spoof the distribution.

[0097] The method may comprise determining a time limit for obtaining the plurality of bit strings from the external source during one round. The time limit may be large enough to reasonably allow the party to obtain the samples by executing the control sequence on a quantum computer, but may be strict enough to prevent said party from obtaining such samples by simulating the control sequence on a classical computer. The statistical test T may be able to distinguish the bit strings which are outputs from the distribution obtained by executing the control sequence from any distribution that can be produced by a classical computer by any known classical methods that work under the time limit that is set. An upper bound for the time limit can be estimated e.g. by determining the time complexity of the classical simulation of the control sequence and then assuming the other party has access to a state-of-the-art supercomputer. The time limit may be well below this upper bound to account for surprises. Preferably, only output samples obtained during this time limit are accepted.

[0098] Optionally, there may be an estimate of the performance of a quantum computing device that the external source claims to have: Given the control sequence, how many times can the quantum computing device be expected to simulate and measure the outcome of the control sequence. An estimation may be written as follows: t, is the average initialization time for a new control sequence and tsis the average time per one output sample. Thus, the time limit may be set as to > ti+M*ts, where M is the number of obtained output samples.

[0099] The statistical test T may, for example, be usable in providing an estimate of the size of the fraction of the obtained bit strings that is from the ideal output distribution of the controlsequence. Having been verified to be obtained from the output distribution of the control sequence, the samples (obtained bit strings) contain real randomness inherit to quantum mechanics in play when implementing the control sequence. The samples may then be used as random numbers as such and / or they may be utilized to generate random numbers, e.g. by using a randomness extractor protocol.

[0100] The method may further comprise, at each round or after all rounds have been completed, comparing the measured statistical outcome to a predetermined spoof statistical outcome. The spoof statistical outcome may correspond to an outcome of the statistical test T calculated using determined spoof measurement outcomes obtainable by utilizing classical computing means, such as by classical simulation of the control sequence. The method may then further comprise verifying bit strings that are usable for determining a random number based on the comparison. If the measured statistical outcome differs from the spoof statistical outcome by under a second threshold, it may be determined that the plurality of bit strings obtained at the round in question are not usable for determining a random number, and these bit strings may be discarded. If the measured statistical outcome differs from the spoof statistical outcome by over the second threshold, it may be determined that the plurality of bit strings obtained at the round in question are usable for determining a random number, and these bit strings may be stored and used when determining a random number.

[0101] Alternatively, comparison to a spoof statistical outcome may be carried out after all rounds have been performed.

[0102] The method may comprise determining or obtaining a predetermined ideal statistical outcome, which corresponds to an outcome of the statistical test T calculated using determined ideal measurement outcomes, which correspond to measurement outcomes of the control sequence obtained using an ideal quantum computing device. The ideal measurement outcomes may be simulated using a classical computing device, such as the first computing device. The method may comprise determining the ideal measurement outcomes and the ideal statistical outcome.

[0103] It may be noted that a spoof statistical outcome is at least as close to an ideal statistical outcome as the result of the statistical test when run on uniform random outputs, because uniform random strings is one way of spoofing the test.

[0104] Comparing the measured statistical outcome to the ideal statistical outcome and spoof statistical outcome may enable determination of a lower bound for the estimate of quantum samples, i.e. bit strings obtained as a measurement outcome by executing the controlsequence on a quantum computing device, with a degree of certainty that can also be estimated by standard statistical means. An estimated lower bound may be determined as a safe lower bound, if is guaranteed to be true with a probability that exceeds a threshold, the threshold optionally being at least 99.9%.

[0105] Determining at least one parameter indicative of the lower bound for an amount of entropy comprised in the plurality of bit strings may comprise determining a lower bound for an estimated fraction of the obtained plurality of bit strings that corresponds to measurement outcomes obtainable from an ideal output distribution of the control sequence. This may be carried out by comparing the measured statistical outcome to a predetermined spoof statistical outcome, said spoof statistical outcome corresponding to an outcome of the statistical test T calculated using determined spoof measurement outcomes obtainable by utilizing classical computing means, optionally by classical simulation of the control sequence, combined with a lower-bound estimation of the entropy Eideai of an ideal measurement output distribution, obtainable when the control sequence is implemented on an ideal quantum computing device, to estimate a lower bound for the amount of entropy comprised in the plurality of bitstrings using the formula E=F*Eideai.

[0106] In determining 112 a random number, the obtained bits strings, or at least a portion of the obtained bits strings may be used. The portion of bit strings that are used may be ones that are determined as being usable for generating a random number, which may be determined at each round as described above.

[0107] The method may end with samples (bit strings) that have been determined as being usable for determining a random number, together with the knowledge of a lower bound for entropy e, which tells how much randomness these strings contain. The samples may be used as random numbers. The samples are preferably accepted as random numbers if the lower bound for entropy e is higher than an acceptance threshold, which is preferably at least 10.

[0108] The random numbers generated by the method need not be uniform random, it suffices that they contain some randomness. Optionally, the method may further comprise scrambling the output samples using a hash function, such as SHA-2 or SHA-3, to make the output samples more random looking without reducing the entropy contained in them.

[0109] At step 112, a randomness extractor or randomness distillation may alternatively be utilized. Here, the bit strings, or at least the portion of bit strings that have been determined as being usable for determining a random number, may be converted into an e-bit uniform random integer using a randomness extractor.The use of a randomness extractor may ensure that all malicious signals hidden in the obtained bit strings are washed out, and only true randomness remains. The obtained samples are a weak source of entropy, i.e. their probability distribution is far from uniform. With a suitable randomness extractor and preferably a large number of samples, the extractor will output samples / bit strings the probability distribution of which can be made arbitrarily close to the uniform distribution.

[0110] In general, randomness extractors take a bit string formed from the samples from weakly random sources with less than perfect entropy and produce a compressed bit string whose output distribution can be made arbitrarily close to a uniform distribution. If there is access to another independent source of weak randomness, one can use a two-source extractor. One might also opt for a strong seeded randomness extractor, where the user has to provide a nearly perfectly uniform seed to extract the randomness. However, the seed can be reused as long as it is kept secret. The efficiency of an extractor is often determined by the minimum entropy of the input, hence the discussion about the minimum entropy above. With a proper extractor and a large number of output samples, the extractor will output samples / bit strings the probability distribution of which can be made arbitrarily close to the uniform distribution.

[0111] A level of distillation used in randomness extraction or randomness distillation may depend on a known or estimated fidelity, whereby lower fidelity means that more distillation should be applied.

[0112] It may be noted that minimum (or lower bound for) entropy of the obtained bit strings should be obtained to perform randomness extraction / distillation. The minimum entropy determines the compression ratio of the extraction process that should be used to guarantee a near uniform distribution.

[0113] The compression ratio depends on the choice of extractor. With the fastest available extractors, the number of output bits will be lower than the amount of entropy e in the input bits. With the best known extractors, the number of output bits is very close to e. When a family of extractors is selected, the amount of entropy in the bit strings, e, and the desired statictical distance between the output distribution and the uniform distribution, D, may be determined. With a very large n, the compression ratio is a function of e / n and D. When e / n and D grow, the compression ratio approaches 1. If an n-bit binary string contains e-bits of entropy, then an ideal achievable compression ratio could be n / e.

[0114] Figure 2 shows a flow chart of a computer-implemented method for determining a control sequence for performing a series of interactions between quantum elements to determinea random number. The method may be carried out by a first computing device, which is a classical computing device or is used as a classical computing device. The method comprises determining 114 a control sequence for performing a series of interactions between n quantum elements, wherein the control sequence is determined such that implementation of the control sequence on a trusted or ideal quantum computing device from a predetermined initial state produces comparison outcomes, wherein when the comparison outcomes are used to calculate an outcome of a selected statistical test T to obtain a comparison statistical outcome, the comparison statistical outcome deviates by over a first threshold from a random statistical outcome, wherein the random statistical outcome corresponds to calculation of an outcome of the statistical test T when calculated using a classically sampleable random distribution.

[0115] The first threshold of the deviation of the comparison statistical outcome from the random statistical outcome may be a predetermined deviation corresponding to a statistically significant difference between the comparison statistical outcome and the random statistical outcome, optionally where the first threshold of the deviation corresponds to at least a couple of standard deviations, preferably at least three standard deviations, more preferably more than three standard deviations, of a sampling distribution of the statistical test T, preferably such that the first threshold of deviation can be detected with at least 90% probability, using at most 109comparison outcomes, more preferably 106or even more preferably 104comparison outcomes. In other terms, in order to generate certified randomness in the output samples, the first threshold may preferably be a couple of standard deviations, more preferably three standard deviations, more preferably more than three standard deviations. With the latter choice, the number of required output samples would require e.g. some 30 hours of sampling in a classical computing device.

[0116] In a control sequence, in case of a gate-based quantum circuit, every unitary quantum gate in the circuit corresponds to a single unitary operation of the Hamiltonian and consecutive unitary quantum gates correspond to consecutive unitary operations of the Hamiltonian. However, implementing a given unitary operation on a real quantum device is considerably more difficult and often possible only approximately. These errors can be made arbitrarily small but almost always require an increasing number of qubits and quantum gates making it quickly unfeasible for the noisy intermediate-scale quantum (NISQ) era quantum devices. Given a Hermitian operator, H, and a time parameter 0, a unitary operator can be expressed as U = exp( / 0 / 7). Hamiltonians can be decomposed as a finite sum of simpler Hermitian terms ( / 7 = £feWfe) such that Uk = exp(iOH ) is once again unitary but now easier toimplement. However, in generic cases exp( / 0 / 7) A [kexp i0Hk'). This fact makes the implementation of unitary operations more error prone.

[0117] If the Hamiltonian is restricted to be a sum of multiple Pauli-X terms, as done below, the terms of the Hamiltonian are then commuting and the unitary operation can be applied in any desired order exp( / 0 / 7) = nfcexp(i0Hfe). This subgroup of unitary operations is known as instantaneous quantum polynomial time (IQP) circuits and have raised interest for NISQ-era quantum devices. Despite these restrictions, the accurate simulation of these quantum operations is strongly believed to be intractable for classical computers and they can be related to computational problems that can be verified classically in polynomial time.

[0118] The method may comprise providing 116 the control sequence as an output, e.g. to a verifying computing device, a second computing device, or some further computing device. The control sequence is intended to be usable for executing the series of interactions between quantum elements at a second computing device which is a quantum computing device. The control sequence may be a quantum circuit or may be indicative of a quantum circuit. The control sequence may be provided as an output to a verifying computing device or a further computing device, whereby if the control sequence is not a quantum circuit, the verifying computing device or further computing device may determine a quantum circuit based on the obtained output. A control sequence or related quantum circuit may be obtained at a (classical) computing device that is in communication with a second computing device that is a quantum computing device and is configured to cause execution of a quantum circuit on the second computing device.

[0119] A provided output may also comprise an indication of the statistical test T. Indications of initial states of quantum elements to be used in the execution of the control sequence may also be provided.

[0120] There are many different ways of generating a control sequence that is associated with a statistical test T, where the control sequence will have properties as prescribed above. A statistical test may, for example, be described as a classical computer program that is run on the provided outputs. The test may be e.g. computing the expectation value of a Hermitian operator, or generally a Hamiltonian operator, using an output sample, but the statistical test may also be some other statistical test. If the Hamiltonian is a linear combination of Pauli-Z strings, then the expectation value can be computed from the measurement outputs in the usual computational basis states, because |0> and |1> are Z-eigenstates.If the Hamiltonian is more general, then the outputs of the control sequences (i.e. obtained bit strings) should be measured in various different bases, depending on the form the Hamiltonian takes. In this case, different measurement bases and the number of required samples for different measurement bases may also be specified upon providing the control sequence for use at a second computing device. In a method for generating a random number, a verifying party (associated with a verifying computing device) may use the obtained samples from the different measurement bases in order to perform the statistical test T, which could be estimating the expectation value of a Hermitian operator.

[0121] The method may comprise selecting a statistical test T. The statistical test T should preferably be feasible to perform on a modest classical computer, i.e. not a supercomputer.

[0122] The statistical test T may be selected to comprise the calculation of the expectation value of a, preferably traceless, Hermitian operator H, optionally expressed as a linear combination of Pauli strings, which are optionally Pauli-Z strings, and the method may comprise determining the control sequence to prepare a quantum state that has an H-expectation value that differs significantly from 0, preferably by at least 104, more preferably by 103or even more preferably by 102.

[0123] The control sequence is advantageously determined so that its ideal output distribution is not uniform, i.e. flat. This feature is referred to as bias in this text, and its purpose is that, for an ideal output distribution of the control sequence, the statistical T produces results that are significantly different from T performed on samples sampled from a random uniform distribution. Without the bias embedded into the output distribution of the control sequence, a provider generating the output samples could generate uniform pseudorandom bit strings and send them to the e.g. a verifying computing device which has provided the control sequence and requested samples from its output distribution, whereby the verifying computing device could not distinguish these samples from true samples of outputs obtained by executing the control sequence on a quantum computing device.

[0124] The bias may for example be introduced to the ideal output distribution of the control sequence by embedding a selected bit string s to the control sequence such that the probability that an output string from the output distribution of the control sequence is orthogonal to the selected bit string deviates significantly from1Note that for control sequencies implemented as quantum circuits this is very special: as the output probabilities of a random quantum circuit are exponentially distributed, the expected bias of a completely random quantum circuit with respect to s is expected to be exponentially small.The control sequence could be determined by starting from a variational circuit, optionally with random variational parameters, and where the expectation value of the state prepared by the variational circuit is optimized, preferably with intermediate random perturbation steps, to promote the H-expectation value of the state prepared by the variational circuits, where the method of optimization is optionally VQE, QAOA, or a hybrid implementation of gradient descent or simulated annealing, where the H-expectation values and the gradients thereof with respect to the variational parameters are optionally computed with a quantum computing device.

[0125] In some embodiments, the control sequence may be determined as being indicative of an IQP quantum circuit. A method for generating random numbers may then comprise, at each round, using a binary matrix picked from the same family of random matrices (i.e. (exponentially) large collection of binary matrices with similar features) and the comparisons to spoof and ideal distributions may be done after all the rounds have been performed. This may reduce the number of samples that have to be collected for each round (even one sample per round may be enough) and may reduce the time for the classical adversary to obtain a good enough approximation of the distribution.

[0126] The benefit of the above approach would be that only a small amount of samples (such as between one and a few thousand) may be required for each control sequence, giving the opposing party less time to complete a simulation of the control sequence.

[0127] In some embodiments, the control sequence may be determined as producing associated comparison outcomes that are biased with respect to a selected bit string s or a selected plurality of bit strings s, and the selected Hermitian operator H is H = 6sor H =

[0128]

[0129] respectively. These Hermitian operators compute the tensor product of Pauli-Z operators acting on those quantum elements where the selected string has a non-zero value, such as 1 in case the quantum element is a qubit producing binary read-out values. These Hermitian operators may be used e.g. if the statistical test is testing orthogonality against s. If a comparison outcome is an n-bit binary string, it has an eigenvalue +1 if it is orthogonal to s and -1 otherwise. Thus, if the / - / -expectation value computed from the comparison outputs is 0.5, it means that 75% of the obtained samples were orthogonal to s.

[0130] Regarding the abovementioned discarding of output samples, a random guess is known to be orthogonal to any non-zero secret with 50% probability while the all-zero vector is always orthogonal. It is immediately clear that the latter fact leads one to discard all-zero samples, otherwise an adversary could attempt to spoof the output distribution by guessing the intended bias and providing a suitable mixture of all-zero samples and uniform samples to reach the target bias in the middle. Similar considerations lead one to discard all repeatedsamples, as they should be exceedingly rare for an honest implementation with realistic sizes of n. Further restrictions on the samples could be placed, e.g. rejecting all column vectors of G when the control sequence in question corresponds to an IQP circuit

[0131] If the control sequence is determined as producing associated comparison outcomes that are biased with respect to a selected bit string s, the control sequence may be determined as corresponding to an IQP circuit. Such a control sequence may be determined in numerous ways.

[0132] In one embodiment, the method for determining a control sequence may comprise selecting a bit string s of length n, wherein n corresponds to a number of quantum elements to be utilized by the control sequence, and determining a first matrix G, wherein the first matrix is a binary matrix G

[0133]

[0134] e which is used to determine a Hamiltonian of the IQP circuit as H = iWj=i^Gji■ The corresponding control sequence may be determined by

[0135] sampling a second matrix Go, wherein the second matrix is a random binary matrix Goe F'1^1

[0136] selecting a set 0 of j vectors being orthogonal with respect to s, determining the first matrix G by adding selected columns to the second matrix Goby carrying out m - I rounds of:

[0137] o selecting a vector o from the set of vectors 0,

[0138] o sampling k - 1 column vectors, optionally using varying for each round, of the second matrix Go, optionally such that there is an odd number of non-orthogonal vectors,

[0139] o summing the column vectors v =

[0140]

[0141] o + Gt, and appending the column vectors to the first matrix as G <- [G, v],

[0142] o mixing the order of columns of the first matrix G.

[0143] Here, X are the Pauli-X gates and m is the number of terms in the Hamiltonian corresponding to the number of columns in G; each term in the Hamiltonian therefore applies the X gate on the quantum elements for which the corresponding element of the column is non-zero. The other positive integer input parameters are: k, the number of terms to include in linearly dependent subsets; / , the number of columns to be generated fully randomly, J, the number of orthogonal vectors to amplify. Constraints of the input parameters in this example are: I < m, k < I, and j < k.

[0144] In constructing the IQP circuit, it is preferable to have a lot of interference already at moderate values of time parameter Q. The interference can be such that either orthogonal or non-orthogonal output samples are greatly amplified in a way that is hard to discoverfrom inspecting the first matrix G. Effectively, it is preferable to have many small linearly dependent subsets of the column vectors in the first matrix G as in the protocol above. Its essential idea is to amplify the probability of a small set of orthogonal vectors while hiding the fact by having most of the column vectors be non-orthogonal.

[0145] The expected weight of the bias created in the protocol is m - 1 / 2. A simulated example of a orthogonality bias generated by a IQP quantum circuit generated by the above protocol with 20 qubits is presented in Fig. 3. In the simulation, ideal quantum samples achieve a higher bias compared to a classical sampling strategy ignoring quantum interference. Shown in Fig. 3, at around Q = 0.07, the quantum bias becomes positive while the classical attack is never positive. The peak bias is reached around 0.13 and is approximately 0.088. Parameters used to generate the matrix G are: (n, m, I, k, j) = (20, 100, 60, 3, 2). In other words, IQP quantum circuits for 20 qubits were created using a generating matrix G with 100 columns. In the construction, 40 columns were generated solely to introduce many linearly dependent subsets of size 3, all of which included one of two randomly selected orthogonal column vectors. Due to computational limitations, the number of qubits is small, and repeated samples are not rejected. Based on the simulation one can in this case conclude that, without discarding of repeated samples, a suitable choice of Q would be around 0.13 for which the minimum entropy of a single sample would be 3.6 bits and Shannon entropy would be 8.2 bits. The classical sampling strategy is based on ignoring interference effects of quantum amplitudes, adding column vectors of the first matrix G with probability sin2(0) for each column.

[0146] The fraction of output samples from the ideal output distribution of an IQP quantum circuit can be estimated as follows, for example: First, define function o(0) as the orthogonality bias of the output distribution (sans all-zero samples) of the IQP circuit with parameter value Q, i.e. o(0) = 2P((X, s) = 0) - 1. For fidelity Fi, the expected experimental outcome would be Oexp(0)=Fl ' 0(0).

[0147] Next, define c(0) as the best possible statistical bias achievable by a classical adversary without the knowledge of the selected string s. The classical adversary is also restricted by the discarding of all-zero states and repeated samples. By choosing a value of time parameter©, say 0*such that o(0^ is greater (less) than the maximum (minimum) attainable value of c(0) (= o’ the quantum randomness of the output samples can be guaranteed provided that |oexP(0’ | > |c*|. If o is at its highest value at 0* one can immediately approximate the fraction, r, of samples from the IQP quantum circuit:

[0148]

[0149] It is also possible to choose values of time parameter 0*that do not maximize (minimize) o(0). Such choices might increase the minimum quantum entropy in single samples, thus increasing the output rate of random bits, but the security of the method might be weakened with such a choice.

[0150] Preferably, the value of the time parameter 0 is at least TT / 16 away from / C*TT / 4, k= 0, 1, 2..., in particular TT / 4, as for time parameter 0= TT / 4 the simulation of the corresponding IQP quantum circuit reduces to the simulation of stabilizer states which is classically tractable due to the Gottesman-Knill theorem.

[0151] Below, an example of constructing a biased control sequence is presented. Figs. 4-6 show results obtained by simulating executing a biased quantum circuit as control sequence in an ideal quantum computer. The circuit was constructed on 12 qubits and configured to exhibit a significant bias with respect to a selected string s, s being here 1654 = 110011101102. The qubits are considered to be in a 3 x 4 grid. The circuit consists of 12 alternating layers each layer consisting of

[0152] 1. parallel execution of one-qubit n74-rotations about axes in the XY plane, each qubit having its own rotation axis;

[0153] 2. parallel execution of entanglement creating CZ gates in a predetermined configuration

[0154] In total, the circuit is parametrized by 12 12 = 144 continuous parameters that specify the one-qubit rotation axes.

[0155] As can be seen from Fig. 4, the output distribution of the individual states looks random. Fig. 5 presents a histogram of the output probabilities. There seems to be no evident structure in the output distribution of the circuit. Moreover, the circuit seems to be very close to a Haar random circuit, as the linear cross entropy (XEB) is close to 1. However, Fig. 6 plotting the absolute values of the biases with respect to all non-zero 12-bit binary outputs shows that there is significant bias (=0.12) with respect to the binary representation of 1654 and the biases with respect to other binary strings are much smaller. Thus, a significant bias was hidden into a seemingly random circuit. The largest biases one expects for a completely random state of this size is roughly 0.03 so some of the other peaks than the one at 1654 are also larger than expected. It is likely that this effect could be mitigated by designing the circuit more carefully.

[0156] Below, an exemplary protocol according to an embodiment of the random number generation method using the above example circuit is provided:A client (user of a first computing device or verifying computing device) knows that the example circuit C as control sequence exhibits positive bias of around 0.12 with respects to s = 1654. Thus, given samples xi, . . . , xmfrom the output distribution of C, one expects a fraction of 0.62 (i.e. the expected fraction 0.5 plus the bias 0.12) of them to be orthogonal to s. The client sends the example circuit to a provider (external source) with a second computation device possibly claimed to be a quantum computation device.

[0157] If the second computation device executing the example circuit makes an error or is not a quantum computation device, it outputs a uniformly random binary string of length 12, so the bias vanishes in this case. Furthermore, unless the adversary provider knows s, they cannot generate fake data, or tamper with the outputs of the quantum computation device, while achieving the desired bias with respect to s with non-negligible probability. In the small case of 12 qubits, an adversary provider may of course compute all the biases (Fig. 3) in order to find out s, but this approach is infeasible when the number of quantum elements, such as qubits is large enough, such as 60 or more.

[0158] The effect of errors and the fake data and tampering of the output strings by the provider is accounted by the total fidelity F. The total fidelity is the fraction of the output samples that are ideal, untampered data from the output distribution of C. If A denotes the ideal bias, then the observed experimental bias Aexpsatisfies Aexp= F ■ A.

[0159] For example, if the provider sends t = 1000 samples, and the client observes an experimental bias of Aexp= 0.012, they can estimate that F ~ 0.1, so roughly 10% of the provided output samples are from the genuine output distribution of an ideal quantum computation device.

[0160] Next, the lower bound of the amount of entropy comprised in the output samples is estimated. The minimum entropy of a probability distribution is -Iog2(pmax), where pmaxis the probability of the most likely outcome. It is the quantity that controls the efficacy of randomness extractors. As the minimum entropy of a single sample of the output distribution is about 8 (Fig. 3), the xi, . . . , x oo are iid, the sequence xi, . . . , x oo contains roughly 800 bits of extractable entropy. The randomness inherent in the samples can be extracted using some of the randomness extractors widely known, such as those introduced hereinabove.

[0161] In general for large circuits, the client estimates F by computing Aexpfrom the samples obtained from the provider and then uses Fto determine the amount of extractable entropy in the output samples. Even though it may be infeasible to compute the minimum entropy for the output distribution of large circuits, it is known that for an n-qubit random circuit, pmaxis within constant factor of n / 2nwith an overwhelming probability. Thus, the minimum entropy of a single output satisfies emin = n - Iog2(n) + 0(1) with overwhelming probability, allowing for the estimation of extractable entropy. Above, 0(1) means a variable that is bound by a constant that does not depend on n. This formula can be used to estimate the minimum entropy of a sequence of purported samples from a (claimed) quantum computation device.

[0162] Minimum entropy is the lower bound for all Renyi entropies and it is a measure for the amount of randomness that can be extracted from the sample. By considering smooth minimum entropies of several samples, one can have a more favorable estimation for the amount of randomness that can be extracted:

[0163] e(x£) t^co

[0164] — - - > re*(%),

[0165]

[0166] where e*(%) is the Shannon entropy of a single quantum sample x and r is the estimated fraction of the quantum samples among all the samples.. For small values of Q, the minimum entropy of samples from a IQP circuit can be estimated as Iog2(m) after rejecting the allzero samples, where m is the number of columns in the generating matrix. With a larger Q, the samples from the ideal quantum circuits tend to have greater (minimum) entropy but the statistical bias may be harder to generate. In the ideal situation, there would be a family of generating matrices such that the minimum entropy at the best choice of Q would grow linearly with n, the number of quantum elements.

[0167] Below, some potential attacks against the method are listed with an explanation either why they are not a serious threat, or how to mitigate against them. As a general assumption, the adversary has access to a supercomputer and a high-fidelity, high-speed quantum computer. It is reasonable to assume that essentially all polynomial time algorithms are feasible for the adversary, but brute force algorithms are only feasible for small problem instance sizes. The goal of this random number generation protocol is for the adversary to succeed to trick a client into certifying random numbers only with a vanishingly small probability i.e. the probability of success decreases superpolynomially with either n or m. This implies that the probability of the adversary spoofing the output distribution should still be negligible even if they were able to correctly guess the weight of the selected string or guess the bias in the output distribution.

[0168] 1. Adversary ordering. An adversary provider may reorder the output samples in a malicious way in order to embed a signal into the sequence. In order to mitigate this, the client may simply order the received output strings and extract the remaining entropy from the ordered sequence.2. Classical sampling from C. Some prior art methods require using circuits whose classical simulation is expensive, but possible with exaflops-scale supercomputers. This is because the certification protocol requires computing the ideal output probabilities of the observed output strings. As the random number certification protocol introduced herein does not require this, it is possible to use quantum circuits that are deep inside the quantum supremacy regime meaning that they cannot be simulated classically in a reasonable time even if all of the classical computing power of the world were harnessed solely for this task.

[0169] 3. Learning s from the output. If the output strings are not fully biased with respect to s (e.g. orthogonal to it with probability 1), then learning s from the output samples is related to the learning with errors problem. This is a difficult computational problem on which many state of the art cryptographic protocols are based on, such as lattice based cryptography, and thus learning s from the outputs is expected to be infeasible.

[0170] 4. The secret s might leak from failures. If the same circuit C is used multiple times, the adversary provider could be able to learn s. Indeed, s can be learned one bit at a time by sampling outputs of C and randomly resetting the y1hbit of the output strings, and then seeing if the client accepts the samples. If the client accepts, it means that s, = 0, and if the client rejects the samples, it means that s, = 1.

[0171] This attack can be mitigated by not reusing the same circuit C multiple times. Alternatively, there could be multiple selected strings such that (i) outputs of C have observable bias with respect to all the selected strings (ii) the one-bits of the selected strings cover all the quantum element-locations.

[0172] 5. Mixing quantum and classical samples. In this strategy, the quantum computer has higher fidelity than expected. It produces samples both from the distribution of the quantum circuit and from a classical algorithm. If q is the ratio of quantum samples and total number of samples, the measured bias would be qo(Q*) + (1 - q)c*.

[0173] The method outlined herein already is designed against this attack strategy. The measured experimental bias is compared against the best possible bias achieved by the classical algorithm and not against the completely uniform distribution that has no bias. In addition, Q is set to be such that the bias from the ideal quantum circuit is maximized. Otherwise, the quantum computer could have provided samples with another value of Q with a higher orthogonality bias (o’) such that the estimated ratio of quantum samples would have been: r= q{ *- c ) / (o(0*) -c*) >q, leading to an overestimation of the amount of quantum samples in the output.

[0174] Figure 7 shows an example of a system. The system comprises at least one computingdevice, preferably being a classical computing device. The system of Fig. 7 comprises at least a first computing device 202, being configured to determine a control sequence for performing a series of interactions between n quantum elements, wherein the control sequence is determined such that implementation of the control sequence on a trusted or ideal quantum computing device from a predetermined initial state produces comparison outcomes, wherein when the comparison outcomes are used to calculate an outcome of a selected statistical test T to obtain a comparison statistical outcome, the comparison statistical outcome deviates by over a first threshold from a random statistical outcome, wherein the random statistical outcome corresponds to calculation of an outcome of the statistical test T when calculated using a classically sampleable random distribution.

[0175] The system may comprise a verifying computing device 204. The first computing device 202 may be configured to determine the control sequence and provide the control sequence as an output to the verifying computing device 204.

[0176] The verifying computing device 204 may be configured to:

[0177] obtain the control sequence, and

[0178] provide an indication of a predetermined initial state of n quantum elements and the control sequence for use to implement the control sequence at a second computing device 206, said second computing device 206 preferably being a quantum computing device, wherein the verifying computing device 204 is configured to perform at least one round of

[0179] obtaining a plurality of bit strings from an external source 208, the plurality of bit strings being indicative of alleged measurement outcomes of executing the control sequence at a second computing device, and

[0180] using at least a portion of the obtained plurality of bit strings to calculate an outcome of the statistical test to determine a measured statistical outcome,

[0181] wherein the verifying computing device 204 is further configured to

[0182] determine at least one parameter indicative of a lower bound for an amount of entropy comprised in the plurality of bit strings based on the measured statistical outcome, and

[0183] determine a random number based on the plurality of bit strings and the lower bound for an amount of entropy in the plurality of bit strings.

[0184] The calculation of an outcome of the statistical test to determine a measured statistical outcome based on at least a portion of the obtained plurality of bit strings may be carriedout at each round or after all rounds have been completed.

[0185] In Fig. 7, a second computing device 206 is depicted. The verifying computing device 204 is described as obtaining a plurality of bit strings from an external source 208. In the ideal situation, the external source 208 can be considered as being associated with a second computing device 204, i.e. quantum computing device. The external source 208 may be a further computing device which is in communication with the second computing device 206 or it may e.g. be part of the second computing device 206.

[0186] Some systems may comprise only a first computing device 202, where the first computing device 202 is configured to carry out the functionalities of the verifying computing device 204 as described above.

[0187] The invention has been explained above with reference to the aforementioned embodiments, and several advantages of the invention have been demonstrated. It is clear that the invention is not restricted only to these embodiments, but comprises all possible embodiments within the scope of inventive thought and the following patent claims.

[0188] The features recited in dependent claims are mutually freely combinable unless otherwise explicitly stated.

Claims

CLAIMS1. A computer-implemented method for determining a control sequence for performing a series of interactions between quantum elements to determine a random number, the method comprising, preferably at a first computing device, said first computing device being used as a classical computing device,determining a control sequence for performing a series of interactions between n quantum elements, wherein the control sequence is determined such that implementation of the control sequence on a trusted or ideal quantum computing device from a predetermined initial state produces comparison outcomes, wherein when the comparison outcomes are used to calculate an outcome of a selected statistical test T to obtain a comparison statistical outcome, the comparison statistical outcome deviates by over a first threshold from a random statistical outcome, wherein the random statistical outcome corresponds to calculation of an outcome of the statistical test T when calculated using a classically sampleable random distribution.

2. The method of claim 1 , wherein the first threshold of the deviation of the comparison statistical outcome from the random statistical outcome is a predetermined deviation corresponding to a statistically significant difference between the comparison statistical outcome and the random statistical outcome, optionally where the first threshold of the deviation corresponds to at least a couple of standard deviations, preferably at least three standard deviations, more preferably more than three standard deviations, of a sampling distribution of the statistical test T, preferably such that the first threshold of deviation can be detected with at least 90% probability, using at most 109comparison outcomes, more preferably 106or even more preferably 104comparison outcomes.

3. The method of any previous claim, wherein the method comprises determination of the comparison statistical outcome by using a classical computing device to obtain comparison outcomes, optionally by using an exact mathematical expression, or wherein the method comprises obtaining comparison outcomes by executing the control sequence on a trusted quantum computing device, and using the thus determined comparison outcomes in determining the comparison statistical outcome, where the comparison statistical outcome is obtained by calculating an outcome of the statistical test using the comparison outcomes.

4. The method of any previous claim, wherein the statistical test T is selected to comprise the calculation of the expectation value of a, preferably traceless, Hermitian operator H, optionally expressed as a linear combination of Pauli strings, which are optionally Pauli-Z strings, and the method preferably comprises determining the control sequence to prepare a quantum state that has an H- expectation value that differs significantly from 0, preferably by at least 104, more preferably by 103or even more preferably by 102.

5. The method of claim 4, where the control sequence is determined by starting from a variational circuit, optionally with random variational parameters, and where the expectation value of the state prepared by the variational circuit is optimized, preferably with intermediate random perturbation steps, to promote the H- expectation value of the state prepared by the variational circuits, where the method of optimization is optionally VQE, QAOA, or a hybrid implementation of gradient descent or simulated annealing, where the H-expectation values and the gradients thereof with respect to the variational parameters are optionally computed with a quantum computing device.

6. The method claim 4 or claim 5, wherein the control sequence is determined as producing associated comparison outcomes that are biased with respect to a selected bit string s or a selected plurality of bit strings s, and the selected Hermitian operator H is H = 6sor H = t sfSlrespectively.

7. The method of claim 6, wherein the control sequence is determined as producing associated comparison outcomes that are biased with respect to a selected bit string s, wherein the control sequence is determined as corresponding to an instantaneous quantum polynomial (IQP) circuit, the method comprising selecting a bit string s of length n, wherein n corresponds to a number of quantum elements to be utilized by the control sequence, and determining a first matrix G, wherein the first matrix is a binary matrix G ewhich is used to determine a Hamiltonian of the IQP circuit as H =f[”=i XGji, where m is the number of terms in the Hamiltonian corresponding to the number of columns in G, wherein the control circuit is preferably determined bysampling a second matrix Go, wherein the second matrix is a random binary matrix Goeselecting a set 0 of j vectors being orthogonal with respect to s,determining the first matrix G by adding selected columns to the second matrix Goby carrying out m - 1 rounds of, where I is the number of columns to be generated randomly,:o selecting a vector o from the set of vectors 0,o sampling k - 1 column vectors, optionally using varying for each round, of the second matrix Go, optionally such that there is an odd number of non-orthogonal vectors,o summing the column vectors v = o + %iElG^ and appending the column vectors to the first matrix as G <- [G, v],mixing the order of columns of the first matrix G.

8. A computer-implemented method for determining a random number, the method comprisingobtaining a control sequence for performing a series of interactions between n quantum elements and obtaining an indication of a statistical test T or selecting a statistical test T, wherein the statistical test T is usable in determining at least one characteristic of obtained bit strings, said characteristic being indicative of an estimated fraction of the bit strings that correspond to ideal measurement outcomes obtainable when executing the control sequence on an ideal quantum computer, andproviding an indication of a predetermined initial state of n quantum elements and the control sequence for use to implement the control sequence at a second computing device, said second computing device preferably being a quantum computing device, wherein the method comprises at least one round ofobtaining, preferably at a verifying computing device, said verifying computing device being used as a classical computing device, optionally wherein the verifying computing device is the first computing device, a plurality of bit strings from an external source, the plurality of bit strings being indicative of alleged measurement outcomes of executing the control sequence at a second computing device,wherein the method further comprisesusing at least a portion of the obtained plurality of bit strings to calculate an outcome of the statistical test to determine a measured statistical outcome, determining at least one parameter indicative of a lower bound for an amount of entropy comprised in the plurality of bit strings based on the measured statistical outcome, anddetermining a random number based on the plurality of bit strings and the lower bound for an amount of entropy in the plurality of bit strings.

9. The method of claim 8, further comprising, at each round or after all rounds have been completed, comparing the measured statistical outcome to a predetermined spoof statistical outcome, said spoof statistical outcome corresponding to an outcome of the statistical test T calculated using determined spoof measurement outcomes obtainable by utilizing classical computing means, optionally by classical simulation of the control sequence, the method further preferably comprising verifying bit strings that are usable for determining a random number based on the comparison.

10. The method of any of claims 8-9, wherein determining at least one parameter indicative of the lower bound for an amount of entropy comprised in the plurality of bit strings comprises determining a lower bound for an estimated fraction F of the obtained plurality of bit strings that corresponds to measurement outcomes obtainable from an ideal output distribution of the control sequence, optionally by comparing the measured statistical outcome to a predetermined spoof statistical outcome, said spoof statistical outcome corresponding to an outcome of the statistical test T calculated using determined spoof measurement outcomes obtainable by utilizing classical computing means, optionally by classical simulation of the control sequence, combined with a lower-bound estimation of the entropy Eideai of an ideal measurement output distribution, obtainable when the control sequence is implemented on an ideal quantum computing device, to estimate a lower bound for the amount of entropy comprised in the plurality of bitstrings using the formula E=F*Eideal- 11. The method of any of previous claims 8-10, wherein the method comprises determining a minimum number of bit strings, preferably less than 109, more preferably less than 106or 104, that is to be obtained as the plurality of bit strings from the external source during one round by estimating the minimum number of samples required to reliably distinguish, optionally with probability of at least 90%, the measurement outcome from the spoof outcomes using the statistical test T, the method further preferably comprising determining a time limit, preferably less than a day, more preferably less than an hour, even more preferably less than a minute, for obtaining the plurality of bit strings from the external source during one round, wherein the time limit is preferably determined by the time complexity of a classical simulation of the control sequence.

12. The method of any of claims 8-11, wherein the method comprises determining a random number by converting at least a portion of the bit strings into a binary string and using said binary string as the random number or utilizing a randomness extractor to determine a random number based on the binary string.

13. A computer program product comprising program code means adapted to execute the method items of any of the previous claims when run on a classical computing device.

14. A system comprising at least one computing device, preferably being a classical computing device, wherein the system comprises at least a first computing device, being configured to determine a control sequence for performing a series of interactions between n quantum elements, wherein the control sequence is determined such that implementation of the control sequence on a trusted or ideal quantum computing device from a predetermined initial state produces comparison outcomes, wherein when the comparison outcomes are used to calculate an outcome of a selected statistical test T to obtain a comparison statistical outcome, the comparison statistical outcome deviates by over a first threshold from a random statistical outcome, wherein the random statistical outcome corresponds to calculation of an outcome of the statistical test T when calculated using a classically sampleable random distribution.

15. The system of claim 14, comprising a verifying computing device, optionally wherein the verifying computing device is the first computing device, wherein the verifying computing device is configured to:obtain the control sequence, andprovide an indication of a predetermined initial state of n quantum elements and the control sequence for use to implement the control sequence at a second computing device, said second computing device preferably being a quantum computing device, wherein the verifying computing device is configured to perform at least one round ofobtaining a plurality of bit strings from an external source, the plurality of bit strings being indicative of alleged measurement outcomes of executing the control sequence at a second computing devicewherein the verifying computing device is further configured toutilize at least a portion of the obtained plurality of bit strings to calculate an outcome of the statistical test to determine a measured statistical outcome, determine at least one parameter indicative of a lower bound for an amount of entropy comprised in the plurality of bit strings based on the measured statistical outcome, anddetermine a random number based on the plurality of bit strings and the lower bound for an amount of entropy in the plurality of bit strings.