final first commit
This commit is contained in:
14
qibojit-benchmarks/graphs/generate_random_bitstrings.py
Normal file
14
qibojit-benchmarks/graphs/generate_random_bitstrings.py
Normal file
@@ -0,0 +1,14 @@
|
||||
"""Generate random bitstrings for Hidden Shift circuit benchmarks."""
|
||||
import numpy as np
|
||||
|
||||
|
||||
file = open("random_bitstrings.dat", "w")
|
||||
|
||||
for nqubits in range(3, 31):
|
||||
bitstring = np.random.randint(0, 2, (nqubits,))
|
||||
bitstring = "".join(str(x) for x in bitstring)
|
||||
file.write(bitstring)
|
||||
file.write("\n")
|
||||
print(bitstring)
|
||||
|
||||
file.close()
|
||||
Reference in New Issue
Block a user