Description
Code I used:
import qrng
qrng.set_provider_as_IBMQ("TOKEN GOES HERE") #the IBMQ API token from your dashboardqrng.set_backend('ibmq_london') #connect to the 5 qubit 'ibmq_london' quantum computer
qrng.get_random_int32() #generate a random 32 bit integer
3834878552
qrng.get_random_float(0,1) #generate a random 32 bit float between 0 to 1
0.6610504388809204
TypeError Traceback (most recent call last)
in
----> 1 import qrng
2 qrng.set_provider_as_IBMQ('93ed74ab24bd54d2596d269986ca8c4b2086704c07cb815c977590b1410b23a315ea83470e3bb3f3cc766e5170b7ae7613344218010fae2a3671497d17b4b906') #the IBMQ API token from your dashboardqrng.set_backend('ibmq_london') #connect to the 5 qubit 'ibmq_london' quantum computer
3 qrng.get_random_int32() #generate a random 32 bit integer
4 3834878552
5 qrng.get_random_float(0,1) #generate a random 32 bit float between 0 to 1
/usr/local/lib/python3.8/dist-packages/qrng/init.py in
130 # Returns a random complex with both real and imaginary parts
131 # from the given ranges. If no imaginary range specified, real range used.
--> 132 def get_random_complex_rect(real_min: float = 0, real_max: float = 0, img_min: float | None = None, img_max: float | None = None) -> complex:
133 """
134 Returns a random complex number with:
TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'