final first commit

This commit is contained in:
2026-05-19 17:19:36 +08:00
commit b199e2105e
114 changed files with 6844 additions and 0 deletions

View 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()

View File

@@ -0,0 +1,10 @@
"""Generate random regular graphs for MaxCut QAOA benchmark."""
import json
import networkx
for nqubits in range(4, 31, 2):
graph = networkx.random_regular_graph(3, nqubits)
data = networkx.readwrite.json_graph.node_link_data(graph)
with open(f"randomgraph_3_{nqubits}.json", "w") as file:
json.dump(data, file)

View File

@@ -0,0 +1,28 @@
000
0110
00010
011010
0010011
10111000
101000010
1110011010
01001000110
010011111010
0011001110100
01101110111100
110001101010101
0000110011101011
00110100010101000
000010011001111100
1110111100110011000
01101111001101001001
111110101000010010001
1011010011001011101001
10011000100101000110001
101111110110001101000111
0110111111101111111001001
01000011001001100111110001
000111000000000010100110001
1011010001001001110010000010
11111111010100110110111110011
000101101000010010011000110011

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 1}, {"id": 3}, {"id": 8}, {"id": 0}, {"id": 4}, {"id": 2}, {"id": 7}, {"id": 6}, {"id": 5}, {"id": 9}], "links": [{"source": 1, "target": 3}, {"source": 1, "target": 4}, {"source": 1, "target": 7}, {"source": 3, "target": 8}, {"source": 3, "target": 2}, {"source": 8, "target": 6}, {"source": 8, "target": 9}, {"source": 0, "target": 4}, {"source": 0, "target": 2}, {"source": 0, "target": 5}, {"source": 4, "target": 6}, {"source": 2, "target": 7}, {"source": 7, "target": 5}, {"source": 6, "target": 9}, {"source": 5, "target": 9}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 9}, {"id": 10}, {"id": 2}, {"id": 5}, {"id": 11}, {"id": 6}, {"id": 8}, {"id": 3}, {"id": 4}, {"id": 7}], "links": [{"source": 0, "target": 1}, {"source": 0, "target": 10}, {"source": 0, "target": 3}, {"source": 1, "target": 2}, {"source": 1, "target": 4}, {"source": 9, "target": 10}, {"source": 9, "target": 7}, {"source": 9, "target": 3}, {"source": 10, "target": 8}, {"source": 2, "target": 3}, {"source": 2, "target": 11}, {"source": 5, "target": 11}, {"source": 5, "target": 7}, {"source": 5, "target": 4}, {"source": 11, "target": 8}, {"source": 6, "target": 8}, {"source": 6, "target": 4}, {"source": 6, "target": 7}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 4}, {"id": 12}, {"id": 5}, {"id": 7}, {"id": 10}, {"id": 1}, {"id": 3}, {"id": 2}, {"id": 11}, {"id": 0}, {"id": 8}, {"id": 9}, {"id": 13}, {"id": 6}], "links": [{"source": 4, "target": 12}, {"source": 4, "target": 8}, {"source": 4, "target": 10}, {"source": 12, "target": 5}, {"source": 12, "target": 0}, {"source": 5, "target": 7}, {"source": 5, "target": 10}, {"source": 7, "target": 9}, {"source": 7, "target": 6}, {"source": 10, "target": 13}, {"source": 1, "target": 3}, {"source": 1, "target": 0}, {"source": 1, "target": 11}, {"source": 3, "target": 8}, {"source": 3, "target": 2}, {"source": 2, "target": 11}, {"source": 2, "target": 6}, {"source": 11, "target": 0}, {"source": 8, "target": 13}, {"source": 9, "target": 13}, {"source": 9, "target": 6}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 4}, {"id": 12}, {"id": 5}, {"id": 13}, {"id": 15}, {"id": 3}, {"id": 10}, {"id": 8}, {"id": 1}, {"id": 6}, {"id": 0}, {"id": 14}, {"id": 2}, {"id": 11}, {"id": 9}, {"id": 7}], "links": [{"source": 4, "target": 12}, {"source": 4, "target": 15}, {"source": 4, "target": 14}, {"source": 12, "target": 8}, {"source": 12, "target": 9}, {"source": 5, "target": 13}, {"source": 5, "target": 10}, {"source": 5, "target": 9}, {"source": 13, "target": 3}, {"source": 13, "target": 15}, {"source": 15, "target": 0}, {"source": 3, "target": 9}, {"source": 3, "target": 2}, {"source": 10, "target": 11}, {"source": 10, "target": 2}, {"source": 8, "target": 2}, {"source": 8, "target": 7}, {"source": 1, "target": 6}, {"source": 1, "target": 0}, {"source": 1, "target": 14}, {"source": 6, "target": 11}, {"source": 6, "target": 7}, {"source": 0, "target": 14}, {"source": 11, "target": 7}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 4}, {"id": 12}, {"id": 0}, {"id": 2}, {"id": 5}, {"id": 9}, {"id": 17}, {"id": 11}, {"id": 6}, {"id": 8}, {"id": 15}, {"id": 3}, {"id": 16}, {"id": 14}, {"id": 10}, {"id": 13}, {"id": 1}, {"id": 7}], "links": [{"source": 4, "target": 12}, {"source": 4, "target": 8}, {"source": 4, "target": 7}, {"source": 12, "target": 15}, {"source": 12, "target": 9}, {"source": 0, "target": 2}, {"source": 0, "target": 5}, {"source": 0, "target": 3}, {"source": 2, "target": 11}, {"source": 2, "target": 13}, {"source": 5, "target": 3}, {"source": 5, "target": 14}, {"source": 9, "target": 17}, {"source": 9, "target": 16}, {"source": 17, "target": 6}, {"source": 17, "target": 1}, {"source": 11, "target": 6}, {"source": 11, "target": 16}, {"source": 6, "target": 3}, {"source": 8, "target": 14}, {"source": 8, "target": 16}, {"source": 15, "target": 7}, {"source": 15, "target": 13}, {"source": 14, "target": 10}, {"source": 10, "target": 13}, {"source": 10, "target": 1}, {"source": 1, "target": 7}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 12}, {"id": 16}, {"id": 4}, {"id": 9}, {"id": 14}, {"id": 17}, {"id": 10}, {"id": 18}, {"id": 0}, {"id": 11}, {"id": 2}, {"id": 6}, {"id": 8}, {"id": 7}, {"id": 19}, {"id": 3}, {"id": 15}, {"id": 5}, {"id": 1}, {"id": 13}], "links": [{"source": 12, "target": 16}, {"source": 12, "target": 4}, {"source": 12, "target": 5}, {"source": 16, "target": 7}, {"source": 16, "target": 15}, {"source": 4, "target": 0}, {"source": 4, "target": 7}, {"source": 9, "target": 14}, {"source": 9, "target": 17}, {"source": 9, "target": 3}, {"source": 14, "target": 2}, {"source": 14, "target": 6}, {"source": 17, "target": 11}, {"source": 17, "target": 8}, {"source": 10, "target": 18}, {"source": 10, "target": 8}, {"source": 10, "target": 13}, {"source": 18, "target": 0}, {"source": 18, "target": 11}, {"source": 0, "target": 11}, {"source": 2, "target": 1}, {"source": 2, "target": 6}, {"source": 6, "target": 8}, {"source": 7, "target": 19}, {"source": 19, "target": 13}, {"source": 19, "target": 15}, {"source": 3, "target": 15}, {"source": 3, "target": 5}, {"source": 5, "target": 1}, {"source": 1, "target": 13}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 6}, {"id": 12}, {"id": 3}, {"id": 4}, {"id": 7}, {"id": 13}, {"id": 19}, {"id": 18}, {"id": 8}, {"id": 15}, {"id": 0}, {"id": 14}, {"id": 21}, {"id": 1}, {"id": 9}, {"id": 20}, {"id": 10}, {"id": 5}, {"id": 2}, {"id": 11}, {"id": 16}, {"id": 17}], "links": [{"source": 6, "target": 12}, {"source": 6, "target": 20}, {"source": 6, "target": 19}, {"source": 12, "target": 13}, {"source": 12, "target": 2}, {"source": 3, "target": 4}, {"source": 3, "target": 7}, {"source": 3, "target": 19}, {"source": 4, "target": 18}, {"source": 4, "target": 2}, {"source": 7, "target": 0}, {"source": 7, "target": 9}, {"source": 13, "target": 20}, {"source": 13, "target": 18}, {"source": 19, "target": 0}, {"source": 18, "target": 15}, {"source": 8, "target": 15}, {"source": 8, "target": 21}, {"source": 8, "target": 14}, {"source": 15, "target": 20}, {"source": 0, "target": 14}, {"source": 14, "target": 21}, {"source": 21, "target": 5}, {"source": 1, "target": 9}, {"source": 1, "target": 11}, {"source": 1, "target": 17}, {"source": 9, "target": 10}, {"source": 10, "target": 11}, {"source": 10, "target": 16}, {"source": 5, "target": 11}, {"source": 5, "target": 17}, {"source": 2, "target": 16}, {"source": 16, "target": 17}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 6}, {"id": 15}, {"id": 22}, {"id": 23}, {"id": 3}, {"id": 13}, {"id": 12}, {"id": 5}, {"id": 16}, {"id": 9}, {"id": 14}, {"id": 0}, {"id": 8}, {"id": 10}, {"id": 18}, {"id": 11}, {"id": 17}, {"id": 1}, {"id": 7}, {"id": 19}, {"id": 4}, {"id": 21}, {"id": 20}, {"id": 2}], "links": [{"source": 6, "target": 15}, {"source": 6, "target": 5}, {"source": 6, "target": 10}, {"source": 15, "target": 8}, {"source": 15, "target": 1}, {"source": 22, "target": 23}, {"source": 22, "target": 12}, {"source": 22, "target": 13}, {"source": 23, "target": 4}, {"source": 23, "target": 19}, {"source": 3, "target": 13}, {"source": 3, "target": 21}, {"source": 3, "target": 14}, {"source": 13, "target": 2}, {"source": 12, "target": 9}, {"source": 12, "target": 2}, {"source": 5, "target": 16}, {"source": 5, "target": 21}, {"source": 16, "target": 7}, {"source": 16, "target": 11}, {"source": 9, "target": 14}, {"source": 9, "target": 21}, {"source": 14, "target": 20}, {"source": 0, "target": 8}, {"source": 0, "target": 17}, {"source": 0, "target": 4}, {"source": 8, "target": 7}, {"source": 10, "target": 18}, {"source": 10, "target": 20}, {"source": 18, "target": 1}, {"source": 18, "target": 2}, {"source": 11, "target": 17}, {"source": 11, "target": 19}, {"source": 17, "target": 4}, {"source": 1, "target": 20}, {"source": 7, "target": 19}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 6}, {"id": 18}, {"id": 14}, {"id": 25}, {"id": 4}, {"id": 24}, {"id": 17}, {"id": 21}, {"id": 0}, {"id": 20}, {"id": 16}, {"id": 19}, {"id": 15}, {"id": 7}, {"id": 5}, {"id": 3}, {"id": 9}, {"id": 22}, {"id": 8}, {"id": 12}, {"id": 10}, {"id": 11}, {"id": 13}, {"id": 1}, {"id": 2}, {"id": 23}], "links": [{"source": 6, "target": 18}, {"source": 6, "target": 3}, {"source": 6, "target": 19}, {"source": 18, "target": 12}, {"source": 18, "target": 24}, {"source": 14, "target": 25}, {"source": 14, "target": 10}, {"source": 14, "target": 1}, {"source": 25, "target": 7}, {"source": 25, "target": 13}, {"source": 4, "target": 24}, {"source": 4, "target": 5}, {"source": 4, "target": 8}, {"source": 24, "target": 5}, {"source": 17, "target": 21}, {"source": 17, "target": 15}, {"source": 17, "target": 8}, {"source": 21, "target": 23}, {"source": 21, "target": 0}, {"source": 0, "target": 20}, {"source": 0, "target": 16}, {"source": 20, "target": 22}, {"source": 20, "target": 12}, {"source": 16, "target": 19}, {"source": 16, "target": 23}, {"source": 19, "target": 7}, {"source": 15, "target": 5}, {"source": 15, "target": 2}, {"source": 7, "target": 12}, {"source": 3, "target": 9}, {"source": 3, "target": 23}, {"source": 9, "target": 13}, {"source": 9, "target": 2}, {"source": 22, "target": 11}, {"source": 22, "target": 1}, {"source": 8, "target": 10}, {"source": 10, "target": 11}, {"source": 11, "target": 1}, {"source": 13, "target": 2}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 24}, {"id": 27}, {"id": 6}, {"id": 15}, {"id": 18}, {"id": 20}, {"id": 12}, {"id": 16}, {"id": 21}, {"id": 22}, {"id": 19}, {"id": 11}, {"id": 14}, {"id": 0}, {"id": 17}, {"id": 8}, {"id": 13}, {"id": 9}, {"id": 23}, {"id": 3}, {"id": 5}, {"id": 7}, {"id": 25}, {"id": 4}, {"id": 1}, {"id": 2}, {"id": 10}, {"id": 26}], "links": [{"source": 24, "target": 27}, {"source": 24, "target": 8}, {"source": 24, "target": 23}, {"source": 27, "target": 19}, {"source": 27, "target": 5}, {"source": 6, "target": 15}, {"source": 6, "target": 5}, {"source": 6, "target": 25}, {"source": 15, "target": 20}, {"source": 15, "target": 5}, {"source": 18, "target": 20}, {"source": 18, "target": 21}, {"source": 18, "target": 7}, {"source": 20, "target": 19}, {"source": 12, "target": 16}, {"source": 12, "target": 19}, {"source": 12, "target": 11}, {"source": 16, "target": 9}, {"source": 16, "target": 2}, {"source": 21, "target": 22}, {"source": 21, "target": 0}, {"source": 22, "target": 13}, {"source": 22, "target": 17}, {"source": 11, "target": 14}, {"source": 11, "target": 4}, {"source": 14, "target": 13}, {"source": 14, "target": 26}, {"source": 0, "target": 17}, {"source": 0, "target": 1}, {"source": 17, "target": 1}, {"source": 8, "target": 10}, {"source": 8, "target": 13}, {"source": 9, "target": 23}, {"source": 9, "target": 3}, {"source": 23, "target": 10}, {"source": 3, "target": 26}, {"source": 3, "target": 2}, {"source": 7, "target": 25}, {"source": 7, "target": 4}, {"source": 25, "target": 26}, {"source": 4, "target": 1}, {"source": 2, "target": 10}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 6}, {"id": 18}, {"id": 7}, {"id": 17}, {"id": 3}, {"id": 4}, {"id": 20}, {"id": 24}, {"id": 29}, {"id": 5}, {"id": 13}, {"id": 23}, {"id": 28}, {"id": 0}, {"id": 9}, {"id": 26}, {"id": 19}, {"id": 1}, {"id": 12}, {"id": 10}, {"id": 15}, {"id": 16}, {"id": 25}, {"id": 11}, {"id": 21}, {"id": 27}, {"id": 8}, {"id": 14}, {"id": 2}, {"id": 22}], "links": [{"source": 6, "target": 18}, {"source": 6, "target": 24}, {"source": 6, "target": 26}, {"source": 18, "target": 29}, {"source": 18, "target": 16}, {"source": 7, "target": 17}, {"source": 7, "target": 20}, {"source": 7, "target": 14}, {"source": 17, "target": 0}, {"source": 17, "target": 19}, {"source": 3, "target": 4}, {"source": 3, "target": 12}, {"source": 3, "target": 11}, {"source": 4, "target": 11}, {"source": 4, "target": 23}, {"source": 20, "target": 9}, {"source": 20, "target": 28}, {"source": 24, "target": 19}, {"source": 24, "target": 0}, {"source": 29, "target": 8}, {"source": 29, "target": 21}, {"source": 5, "target": 13}, {"source": 5, "target": 0}, {"source": 5, "target": 21}, {"source": 13, "target": 26}, {"source": 13, "target": 10}, {"source": 23, "target": 28}, {"source": 23, "target": 19}, {"source": 28, "target": 15}, {"source": 9, "target": 26}, {"source": 9, "target": 16}, {"source": 1, "target": 12}, {"source": 1, "target": 2}, {"source": 1, "target": 22}, {"source": 12, "target": 14}, {"source": 10, "target": 15}, {"source": 10, "target": 2}, {"source": 15, "target": 2}, {"source": 16, "target": 25}, {"source": 25, "target": 11}, {"source": 25, "target": 27}, {"source": 21, "target": 27}, {"source": 27, "target": 22}, {"source": 8, "target": 14}, {"source": 8, "target": 22}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 1}, {"id": 2}, {"id": 3}], "links": [{"source": 0, "target": 1}, {"source": 0, "target": 3}, {"source": 0, "target": 2}, {"source": 1, "target": 2}, {"source": 1, "target": 3}, {"source": 2, "target": 3}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 2}, {"id": 4}, {"id": 1}, {"id": 0}, {"id": 3}, {"id": 5}], "links": [{"source": 2, "target": 4}, {"source": 2, "target": 1}, {"source": 2, "target": 5}, {"source": 4, "target": 0}, {"source": 4, "target": 3}, {"source": 1, "target": 5}, {"source": 1, "target": 3}, {"source": 0, "target": 3}, {"source": 0, "target": 5}]}

View File

@@ -0,0 +1 @@
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"id": 0}, {"id": 7}, {"id": 1}, {"id": 2}, {"id": 4}, {"id": 3}, {"id": 5}, {"id": 6}], "links": [{"source": 0, "target": 7}, {"source": 0, "target": 4}, {"source": 0, "target": 3}, {"source": 7, "target": 1}, {"source": 7, "target": 4}, {"source": 1, "target": 2}, {"source": 1, "target": 6}, {"source": 2, "target": 6}, {"source": 2, "target": 5}, {"source": 4, "target": 5}, {"source": 3, "target": 6}, {"source": 3, "target": 5}]}