Quantum Random Number GeneratorRandom Number Generator ClassRandom Topic GeneratorDiscrete random variable generatorRandom String generator in COptimize random number generatorRandom number generator initialisationTesting a Random number generatorPseudo Random Number GeneratorRandom Number Generator Followup: Choosing the Generator Algorithm and the DistributionPseudo-truly random number generator

Forgetting the musical notes while performing in concert

Rotate ASCII Art by 45 Degrees

Does the Idaho Potato Commission associate potato skins with healthy eating?

Why were 5.25" floppy drives cheaper than 8"?

In Bayesian inference, why are some terms dropped from the posterior predictive?

Different meanings of こわい

Finding the reason behind the value of the integral.

Does Dispel Magic work on Tiny Hut?

How can a day be of 24 hours?

Can a virus destroy the BIOS of a modern computer?

Getting extremely large arrows with tikzcd

Is it possible to map the firing of neurons in the human brain so as to stimulate artificial memories in someone else?

What is the opposite of "eschatology"?

Finitely generated matrix groups whose eigenvalues are all algebraic

What does the same-ish mean?

How to prevent "they're falling in love" trope

Send out email when Apex Queueable fails and test it

Is there a hemisphere-neutral way of specifying a season?

Convert seconds to minutes

Pact of Blade Warlock with Dancing Blade

How can saying a song's name be a copyright violation?

What Exploit Are These User Agents Trying to Use?

Could neural networks be considered metaheuristics?

Avoiding the "not like other girls" trope?



Quantum Random Number Generator


Random Number Generator ClassRandom Topic GeneratorDiscrete random variable generatorRandom String generator in COptimize random number generatorRandom number generator initialisationTesting a Random number generatorPseudo Random Number GeneratorRandom Number Generator Followup: Choosing the Generator Algorithm and the DistributionPseudo-truly random number generator













0












$begingroup$


I'm working on a Quantum Random Number Generator and wanted to get some feedback on the project so far.



I'm using PyQuil to generate machine code for the quantum computer, first to create a bell state placing our random bit into a superposition, then I measure the bit to collapse the superposition and repeat the process for N bits.



I'm a little concerned because I haven't been able to come across much data in terms of how long it takes to restore a qubit to a superposition so I can't really say how fast this program is going to work, but on my virtual quantum computer it runs okayish,~0.5 seconds to generate 512 bits, ~1 second for 1024 bits, ~2.09 seconds for 2048 bits.



The QRandom class is a subclass of the Random() class, figured it was easier to re-use than reinvent the wheel completely.



qrandom.py:



"""
Random variable generator using quantum machines
"""

from math import sqrt as _sqrt
import random
import psutil
from pyquil.quil import Program
from pyquil.api import get_qc
from pyquil.gates import H, CNOT
import vm

__all__ = ["QRandom", "random", "randint", "randrange", "getstate", "setstate", "getrandbits"]

BPF = 53 # Number of bits in a float
RECIP_BPF = 2**-BPF

def bell_state():
"""Returns the Program object of a bell state operation on a quantum computer
"""
return Program(H(0), CNOT(0, 1))

def arr_to_int(arr):
"""returns an integer from an array of binary numbers
arr = [1 0 1 0 1 0 1] || [1,0,1,0,1,0,1]
"""
return int(''.join([str(i) for i in arr]), 2)

def arr_to_bits(arr):
return ''.join([str(i) for i in arr])

def int_to_bytes(k, x=64):
"""returns a bytes object of the integer k with x bytes"""
#return bytes(k,x)
return bytes(''.join(str(1 & int(k) >> i) for i in range(x)[::-1]), 'utf-8')

def bits_to_bytes(k):
"""returns a bytes object of the bitstring k"""
return int(k, 2).to_bytes((len(k) + 7) // 8, 'big')

def qvm():
"""Returns the quantum computer or virtual machine"""
return get_qc('9q-square-qvm')

def test_quantum_connection():
"""
Tests the connection to the quantum virtual machine.
attempts to start the virtual machine if possible
"""
while True:
qvm_running = False
quilc_running = False
for proc in psutil.process_iter():
if 'qvm' in proc.name().lower():
qvm_running = True
elif 'quilc' in proc.name().lower():
quilc_running = True
if qvm_running is False or quilc_running is False:
try:
vm.start_servers()
except Exception as e:
raise Exception(e)
else:
break

class QRandom(random.Random):
"""Quantum random number generator

Generates a random number by collapsing bell states on a
quantum computer or quantum virtual machine.
"""

def __init__(self):
super().__init__(self)
self.p = bell_state()
self.qc = qvm()
# Make sure we can connect to the servers
test_quantum_connection()

def random(self):
"""Get the next random number in the range [0.0, 1.0)."""
return (int.from_bytes(self.getrandbits(56, 'bytes'), 'big') >> 3) * RECIP_BPF

def getrandbits(self, k, x="int"):
"""getrandbits(k) -> x. generates an integer with k random bits"""
if k <= 0:
raise ValueError("Number of bits should be greater than 0")
if k != int(k):
raise ValueError("Number of bits should be an integer")
out = bits_to_bytes(arr_to_bits(self.qc.run_and_measure(self.p, trials=k)[0]))
if x in ('int', 'INT'):
return int.from_bytes(out, 'big')
elif x in ('bytes', 'b'):
return out
else:
raise ValueError(str(x) + ' not a valid type (int, bytes)')

def _test_generator(n, func, args):
import time
print(n, 'times', func.__name__)
total = 0.0
sqsum = 0.0
smallest = 1e10
largest = -1e10
t0 = time.time()
for i in range(n):
x = func(*args)
total += x
sqsum = sqsum + x*x
smallest = min(x, smallest)
largest = max(x, largest)
t1 = time.time()
print(round(t1 - t0, 3), 'sec,', end=' ')
avg = total/n
stddev = _sqrt(sqsum / n - avg*avg)
print('avg %g, stddev %g, min %g, max %gn' %
(avg, stddev, smallest, largest))


def _test(N=2000):
_test_generator(N, random, ())
# Create one instance, seeded from current time, and export its methods
# as module-level functions. The functions share state across all uses
#(both in the user's code and in the Python libraries), but that's fine
# for most programs and is easier for the casual user than making them
# instantiate their own QRandom() instance.

_inst = QRandom()
#seed = _inst.seed
random = _inst.random
randint = _inst.randint
randrange = _inst.randrange
getstate = _inst.getstate
setstate = _inst.setstate
getrandbits = _inst.getrandbits

if __name__ == '__main__':
_test(2)


vm.py



import os

def start_servers():
try:
os.system("gnome-terminal -e 'qvm -S'")
os.system("gnome-terminal -e 'quilc -S'")
except:
try:
os.system("terminal -e 'qvm -S'")
os.system("terminal -e 'quilc -S'")
except:
exit()









share|improve this question







New contributor




Noah Wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$
















    0












    $begingroup$


    I'm working on a Quantum Random Number Generator and wanted to get some feedback on the project so far.



    I'm using PyQuil to generate machine code for the quantum computer, first to create a bell state placing our random bit into a superposition, then I measure the bit to collapse the superposition and repeat the process for N bits.



    I'm a little concerned because I haven't been able to come across much data in terms of how long it takes to restore a qubit to a superposition so I can't really say how fast this program is going to work, but on my virtual quantum computer it runs okayish,~0.5 seconds to generate 512 bits, ~1 second for 1024 bits, ~2.09 seconds for 2048 bits.



    The QRandom class is a subclass of the Random() class, figured it was easier to re-use than reinvent the wheel completely.



    qrandom.py:



    """
    Random variable generator using quantum machines
    """

    from math import sqrt as _sqrt
    import random
    import psutil
    from pyquil.quil import Program
    from pyquil.api import get_qc
    from pyquil.gates import H, CNOT
    import vm

    __all__ = ["QRandom", "random", "randint", "randrange", "getstate", "setstate", "getrandbits"]

    BPF = 53 # Number of bits in a float
    RECIP_BPF = 2**-BPF

    def bell_state():
    """Returns the Program object of a bell state operation on a quantum computer
    """
    return Program(H(0), CNOT(0, 1))

    def arr_to_int(arr):
    """returns an integer from an array of binary numbers
    arr = [1 0 1 0 1 0 1] || [1,0,1,0,1,0,1]
    """
    return int(''.join([str(i) for i in arr]), 2)

    def arr_to_bits(arr):
    return ''.join([str(i) for i in arr])

    def int_to_bytes(k, x=64):
    """returns a bytes object of the integer k with x bytes"""
    #return bytes(k,x)
    return bytes(''.join(str(1 & int(k) >> i) for i in range(x)[::-1]), 'utf-8')

    def bits_to_bytes(k):
    """returns a bytes object of the bitstring k"""
    return int(k, 2).to_bytes((len(k) + 7) // 8, 'big')

    def qvm():
    """Returns the quantum computer or virtual machine"""
    return get_qc('9q-square-qvm')

    def test_quantum_connection():
    """
    Tests the connection to the quantum virtual machine.
    attempts to start the virtual machine if possible
    """
    while True:
    qvm_running = False
    quilc_running = False
    for proc in psutil.process_iter():
    if 'qvm' in proc.name().lower():
    qvm_running = True
    elif 'quilc' in proc.name().lower():
    quilc_running = True
    if qvm_running is False or quilc_running is False:
    try:
    vm.start_servers()
    except Exception as e:
    raise Exception(e)
    else:
    break

    class QRandom(random.Random):
    """Quantum random number generator

    Generates a random number by collapsing bell states on a
    quantum computer or quantum virtual machine.
    """

    def __init__(self):
    super().__init__(self)
    self.p = bell_state()
    self.qc = qvm()
    # Make sure we can connect to the servers
    test_quantum_connection()

    def random(self):
    """Get the next random number in the range [0.0, 1.0)."""
    return (int.from_bytes(self.getrandbits(56, 'bytes'), 'big') >> 3) * RECIP_BPF

    def getrandbits(self, k, x="int"):
    """getrandbits(k) -> x. generates an integer with k random bits"""
    if k <= 0:
    raise ValueError("Number of bits should be greater than 0")
    if k != int(k):
    raise ValueError("Number of bits should be an integer")
    out = bits_to_bytes(arr_to_bits(self.qc.run_and_measure(self.p, trials=k)[0]))
    if x in ('int', 'INT'):
    return int.from_bytes(out, 'big')
    elif x in ('bytes', 'b'):
    return out
    else:
    raise ValueError(str(x) + ' not a valid type (int, bytes)')

    def _test_generator(n, func, args):
    import time
    print(n, 'times', func.__name__)
    total = 0.0
    sqsum = 0.0
    smallest = 1e10
    largest = -1e10
    t0 = time.time()
    for i in range(n):
    x = func(*args)
    total += x
    sqsum = sqsum + x*x
    smallest = min(x, smallest)
    largest = max(x, largest)
    t1 = time.time()
    print(round(t1 - t0, 3), 'sec,', end=' ')
    avg = total/n
    stddev = _sqrt(sqsum / n - avg*avg)
    print('avg %g, stddev %g, min %g, max %gn' %
    (avg, stddev, smallest, largest))


    def _test(N=2000):
    _test_generator(N, random, ())
    # Create one instance, seeded from current time, and export its methods
    # as module-level functions. The functions share state across all uses
    #(both in the user's code and in the Python libraries), but that's fine
    # for most programs and is easier for the casual user than making them
    # instantiate their own QRandom() instance.

    _inst = QRandom()
    #seed = _inst.seed
    random = _inst.random
    randint = _inst.randint
    randrange = _inst.randrange
    getstate = _inst.getstate
    setstate = _inst.setstate
    getrandbits = _inst.getrandbits

    if __name__ == '__main__':
    _test(2)


    vm.py



    import os

    def start_servers():
    try:
    os.system("gnome-terminal -e 'qvm -S'")
    os.system("gnome-terminal -e 'quilc -S'")
    except:
    try:
    os.system("terminal -e 'qvm -S'")
    os.system("terminal -e 'quilc -S'")
    except:
    exit()









    share|improve this question







    New contributor




    Noah Wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.







    $endgroup$














      0












      0








      0





      $begingroup$


      I'm working on a Quantum Random Number Generator and wanted to get some feedback on the project so far.



      I'm using PyQuil to generate machine code for the quantum computer, first to create a bell state placing our random bit into a superposition, then I measure the bit to collapse the superposition and repeat the process for N bits.



      I'm a little concerned because I haven't been able to come across much data in terms of how long it takes to restore a qubit to a superposition so I can't really say how fast this program is going to work, but on my virtual quantum computer it runs okayish,~0.5 seconds to generate 512 bits, ~1 second for 1024 bits, ~2.09 seconds for 2048 bits.



      The QRandom class is a subclass of the Random() class, figured it was easier to re-use than reinvent the wheel completely.



      qrandom.py:



      """
      Random variable generator using quantum machines
      """

      from math import sqrt as _sqrt
      import random
      import psutil
      from pyquil.quil import Program
      from pyquil.api import get_qc
      from pyquil.gates import H, CNOT
      import vm

      __all__ = ["QRandom", "random", "randint", "randrange", "getstate", "setstate", "getrandbits"]

      BPF = 53 # Number of bits in a float
      RECIP_BPF = 2**-BPF

      def bell_state():
      """Returns the Program object of a bell state operation on a quantum computer
      """
      return Program(H(0), CNOT(0, 1))

      def arr_to_int(arr):
      """returns an integer from an array of binary numbers
      arr = [1 0 1 0 1 0 1] || [1,0,1,0,1,0,1]
      """
      return int(''.join([str(i) for i in arr]), 2)

      def arr_to_bits(arr):
      return ''.join([str(i) for i in arr])

      def int_to_bytes(k, x=64):
      """returns a bytes object of the integer k with x bytes"""
      #return bytes(k,x)
      return bytes(''.join(str(1 & int(k) >> i) for i in range(x)[::-1]), 'utf-8')

      def bits_to_bytes(k):
      """returns a bytes object of the bitstring k"""
      return int(k, 2).to_bytes((len(k) + 7) // 8, 'big')

      def qvm():
      """Returns the quantum computer or virtual machine"""
      return get_qc('9q-square-qvm')

      def test_quantum_connection():
      """
      Tests the connection to the quantum virtual machine.
      attempts to start the virtual machine if possible
      """
      while True:
      qvm_running = False
      quilc_running = False
      for proc in psutil.process_iter():
      if 'qvm' in proc.name().lower():
      qvm_running = True
      elif 'quilc' in proc.name().lower():
      quilc_running = True
      if qvm_running is False or quilc_running is False:
      try:
      vm.start_servers()
      except Exception as e:
      raise Exception(e)
      else:
      break

      class QRandom(random.Random):
      """Quantum random number generator

      Generates a random number by collapsing bell states on a
      quantum computer or quantum virtual machine.
      """

      def __init__(self):
      super().__init__(self)
      self.p = bell_state()
      self.qc = qvm()
      # Make sure we can connect to the servers
      test_quantum_connection()

      def random(self):
      """Get the next random number in the range [0.0, 1.0)."""
      return (int.from_bytes(self.getrandbits(56, 'bytes'), 'big') >> 3) * RECIP_BPF

      def getrandbits(self, k, x="int"):
      """getrandbits(k) -> x. generates an integer with k random bits"""
      if k <= 0:
      raise ValueError("Number of bits should be greater than 0")
      if k != int(k):
      raise ValueError("Number of bits should be an integer")
      out = bits_to_bytes(arr_to_bits(self.qc.run_and_measure(self.p, trials=k)[0]))
      if x in ('int', 'INT'):
      return int.from_bytes(out, 'big')
      elif x in ('bytes', 'b'):
      return out
      else:
      raise ValueError(str(x) + ' not a valid type (int, bytes)')

      def _test_generator(n, func, args):
      import time
      print(n, 'times', func.__name__)
      total = 0.0
      sqsum = 0.0
      smallest = 1e10
      largest = -1e10
      t0 = time.time()
      for i in range(n):
      x = func(*args)
      total += x
      sqsum = sqsum + x*x
      smallest = min(x, smallest)
      largest = max(x, largest)
      t1 = time.time()
      print(round(t1 - t0, 3), 'sec,', end=' ')
      avg = total/n
      stddev = _sqrt(sqsum / n - avg*avg)
      print('avg %g, stddev %g, min %g, max %gn' %
      (avg, stddev, smallest, largest))


      def _test(N=2000):
      _test_generator(N, random, ())
      # Create one instance, seeded from current time, and export its methods
      # as module-level functions. The functions share state across all uses
      #(both in the user's code and in the Python libraries), but that's fine
      # for most programs and is easier for the casual user than making them
      # instantiate their own QRandom() instance.

      _inst = QRandom()
      #seed = _inst.seed
      random = _inst.random
      randint = _inst.randint
      randrange = _inst.randrange
      getstate = _inst.getstate
      setstate = _inst.setstate
      getrandbits = _inst.getrandbits

      if __name__ == '__main__':
      _test(2)


      vm.py



      import os

      def start_servers():
      try:
      os.system("gnome-terminal -e 'qvm -S'")
      os.system("gnome-terminal -e 'quilc -S'")
      except:
      try:
      os.system("terminal -e 'qvm -S'")
      os.system("terminal -e 'quilc -S'")
      except:
      exit()









      share|improve this question







      New contributor




      Noah Wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.







      $endgroup$




      I'm working on a Quantum Random Number Generator and wanted to get some feedback on the project so far.



      I'm using PyQuil to generate machine code for the quantum computer, first to create a bell state placing our random bit into a superposition, then I measure the bit to collapse the superposition and repeat the process for N bits.



      I'm a little concerned because I haven't been able to come across much data in terms of how long it takes to restore a qubit to a superposition so I can't really say how fast this program is going to work, but on my virtual quantum computer it runs okayish,~0.5 seconds to generate 512 bits, ~1 second for 1024 bits, ~2.09 seconds for 2048 bits.



      The QRandom class is a subclass of the Random() class, figured it was easier to re-use than reinvent the wheel completely.



      qrandom.py:



      """
      Random variable generator using quantum machines
      """

      from math import sqrt as _sqrt
      import random
      import psutil
      from pyquil.quil import Program
      from pyquil.api import get_qc
      from pyquil.gates import H, CNOT
      import vm

      __all__ = ["QRandom", "random", "randint", "randrange", "getstate", "setstate", "getrandbits"]

      BPF = 53 # Number of bits in a float
      RECIP_BPF = 2**-BPF

      def bell_state():
      """Returns the Program object of a bell state operation on a quantum computer
      """
      return Program(H(0), CNOT(0, 1))

      def arr_to_int(arr):
      """returns an integer from an array of binary numbers
      arr = [1 0 1 0 1 0 1] || [1,0,1,0,1,0,1]
      """
      return int(''.join([str(i) for i in arr]), 2)

      def arr_to_bits(arr):
      return ''.join([str(i) for i in arr])

      def int_to_bytes(k, x=64):
      """returns a bytes object of the integer k with x bytes"""
      #return bytes(k,x)
      return bytes(''.join(str(1 & int(k) >> i) for i in range(x)[::-1]), 'utf-8')

      def bits_to_bytes(k):
      """returns a bytes object of the bitstring k"""
      return int(k, 2).to_bytes((len(k) + 7) // 8, 'big')

      def qvm():
      """Returns the quantum computer or virtual machine"""
      return get_qc('9q-square-qvm')

      def test_quantum_connection():
      """
      Tests the connection to the quantum virtual machine.
      attempts to start the virtual machine if possible
      """
      while True:
      qvm_running = False
      quilc_running = False
      for proc in psutil.process_iter():
      if 'qvm' in proc.name().lower():
      qvm_running = True
      elif 'quilc' in proc.name().lower():
      quilc_running = True
      if qvm_running is False or quilc_running is False:
      try:
      vm.start_servers()
      except Exception as e:
      raise Exception(e)
      else:
      break

      class QRandom(random.Random):
      """Quantum random number generator

      Generates a random number by collapsing bell states on a
      quantum computer or quantum virtual machine.
      """

      def __init__(self):
      super().__init__(self)
      self.p = bell_state()
      self.qc = qvm()
      # Make sure we can connect to the servers
      test_quantum_connection()

      def random(self):
      """Get the next random number in the range [0.0, 1.0)."""
      return (int.from_bytes(self.getrandbits(56, 'bytes'), 'big') >> 3) * RECIP_BPF

      def getrandbits(self, k, x="int"):
      """getrandbits(k) -> x. generates an integer with k random bits"""
      if k <= 0:
      raise ValueError("Number of bits should be greater than 0")
      if k != int(k):
      raise ValueError("Number of bits should be an integer")
      out = bits_to_bytes(arr_to_bits(self.qc.run_and_measure(self.p, trials=k)[0]))
      if x in ('int', 'INT'):
      return int.from_bytes(out, 'big')
      elif x in ('bytes', 'b'):
      return out
      else:
      raise ValueError(str(x) + ' not a valid type (int, bytes)')

      def _test_generator(n, func, args):
      import time
      print(n, 'times', func.__name__)
      total = 0.0
      sqsum = 0.0
      smallest = 1e10
      largest = -1e10
      t0 = time.time()
      for i in range(n):
      x = func(*args)
      total += x
      sqsum = sqsum + x*x
      smallest = min(x, smallest)
      largest = max(x, largest)
      t1 = time.time()
      print(round(t1 - t0, 3), 'sec,', end=' ')
      avg = total/n
      stddev = _sqrt(sqsum / n - avg*avg)
      print('avg %g, stddev %g, min %g, max %gn' %
      (avg, stddev, smallest, largest))


      def _test(N=2000):
      _test_generator(N, random, ())
      # Create one instance, seeded from current time, and export its methods
      # as module-level functions. The functions share state across all uses
      #(both in the user's code and in the Python libraries), but that's fine
      # for most programs and is easier for the casual user than making them
      # instantiate their own QRandom() instance.

      _inst = QRandom()
      #seed = _inst.seed
      random = _inst.random
      randint = _inst.randint
      randrange = _inst.randrange
      getstate = _inst.getstate
      setstate = _inst.setstate
      getrandbits = _inst.getrandbits

      if __name__ == '__main__':
      _test(2)


      vm.py



      import os

      def start_servers():
      try:
      os.system("gnome-terminal -e 'qvm -S'")
      os.system("gnome-terminal -e 'quilc -S'")
      except:
      try:
      os.system("terminal -e 'qvm -S'")
      os.system("terminal -e 'quilc -S'")
      except:
      exit()






      python-3.x random generator quantum-computing






      share|improve this question







      New contributor




      Noah Wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Noah Wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Noah Wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 11 mins ago









      Noah WoodNoah Wood

      1




      1




      New contributor




      Noah Wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Noah Wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Noah Wood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          0






          active

          oldest

          votes












          Your Answer





          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "196"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          Noah Wood is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f216756%2fquantum-random-number-generator%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Noah Wood is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          Noah Wood is a new contributor. Be nice, and check out our Code of Conduct.












          Noah Wood is a new contributor. Be nice, and check out our Code of Conduct.











          Noah Wood is a new contributor. Be nice, and check out our Code of Conduct.














          Thanks for contributing an answer to Code Review Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f216756%2fquantum-random-number-generator%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          名間水力發電廠 目录 沿革 設施 鄰近設施 註釋 外部連結 导航菜单23°50′10″N 120°42′41″E / 23.83611°N 120.71139°E / 23.83611; 120.7113923°50′10″N 120°42′41″E / 23.83611°N 120.71139°E / 23.83611; 120.71139計畫概要原始内容臺灣第一座BOT 模式開發的水力發電廠-名間水力電廠名間水力發電廠 水利署首件BOT案原始内容《小檔案》名間電廠 首座BOT水力發電廠原始内容名間電廠BOT - 經濟部水利署中區水資源局

          Prove that NP is closed under karp reduction?Space(n) not closed under Karp reductions - what about NTime(n)?Class P is closed under rotation?Prove or disprove that $NL$ is closed under polynomial many-one reductions$mathbfNC_2$ is closed under log-space reductionOn Karp reductionwhen can I know if a class (complexity) is closed under reduction (cook/karp)Check if class $PSPACE$ is closed under polyonomially space reductionIs NPSPACE also closed under polynomial-time reduction and under log-space reduction?Prove PSPACE is closed under complement?Prove PSPACE is closed under union?

          Is my guitar’s action too high? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)Strings too stiff on a recently purchased acoustic guitar | Cort AD880CEIs the action of my guitar really high?Μy little finger is too weak to play guitarWith guitar, how long should I give my fingers to strengthen / callous?When playing a fret the guitar sounds mutedPlaying (Barre) chords up the guitar neckI think my guitar strings are wound too tight and I can't play barre chordsF barre chord on an SG guitarHow to find to the right strings of a barre chord by feel?High action on higher fret on my steel acoustic guitar