Skip to main content

View on GitHub

Open this notebook in GitHub to run it yourself
This notebook implements the quantum-based resiliency planning using QAOA.

Create the graph

Output:
output
Output:
Output:
For convience and easy visualization, let’s add a helper function that prints the solution into the graph. This function gets our assigned solution (the 2D array of binary variables).
Output:
output
Output:

Helper Functions

Define Objective Function

Define Single Assignment Cosntraint

Create QAOA Code

Output:
Output:

Execute QAOA

Output:
Output:
Output:
output
Output:
output
Output:
output
Output:
output
Output: