Skip to content

Commit

Permalink
fixed missing definition of z
Browse files Browse the repository at this point in the history
  • Loading branch information
dynexcoin authored May 8, 2024
1 parent 861c433 commit 74298ae
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions aircraft-loading-optim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "7cdda786-f949-4921-b997-3edc27b1f7e9",
"metadata": {},
"outputs": [],
Expand All @@ -74,6 +74,9 @@
" \n",
"K = n + N + (len(bin(W))-2) # number of slack variables: K = n + N + number of bits of binary expansion of W\n",
"\n",
"# len(z) equals the number of qubits in QAOA circuit\n",
"z=[sym.Symbol(f'z_{i}') for i in range(n*N+K)]\n",
"\n",
"# Load results obtained from Mathematica notebook airbus.nb\n",
"def read_quadratic(path):\n",
" lines=[]\n",
Expand Down Expand Up @@ -118,7 +121,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"id": "52cc9f3d-ced0-49fc-becd-0024cb85863a",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -146,7 +149,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"id": "27bd9fb8-3f68-4f40-b9cb-fe373d92d61b",
"metadata": {},
"outputs": [
Expand All @@ -173,7 +176,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"id": "d981f899-0de3-48c0-b556-3b7ff8d0917e",
"metadata": {},
"outputs": [],
Expand All @@ -183,7 +186,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 8,
"id": "a1e9dec1-e652-4999-8ebc-2289624681d9",
"metadata": {},
"outputs": [
Expand All @@ -195,18 +198,9 @@
"[DYNEX] PRECISION SET TO 1\n",
"[DYNEX] SAMPLER INITIALISED\n",
"[DYNEX|TESTNET] *** WAITING FOR READS ***\n",
"╭────────────┬─────────────┬───────────┬───────────────────────────┬─────────┬─────────┬────────────────╮\n",
"│ DYNEXJOB │ BLOCK FEE │ ELAPSED │ WORKERS READ │ CHIPS │ STEPS │ GROUND STATE │\n",
"├────────────┼─────────────┼───────────┼───────────────────────────┼─────────┼─────────┼────────────────┤\n",
"│ -1 │ 0 │ │ *** WAITING FOR READS *** │ │ │ │\n",
"╰────────────┴─────────────┴───────────┴───────────────────────────┴─────────┴─────────┴────────────────╯\n",
"\n",
"[DYNEX] FINISHED READ AFTER 0.00 SECONDS\n",
"[DYNEX] SAMPLESET READY\n",
"[DYNEX] Keyboard interrupt\n",
"Result:\n",
" 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 770 energy num_oc.\n",
"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ... 0 -1600039155.75 1\n",
"['BINARY', 1 rows, 1 samples, 771 variables]\n"
"{'error': 'Keyboard interrupt'}\n"
]
}
],
Expand Down

0 comments on commit 74298ae

Please sign in to comment.