How to use pyqubo - 3 common examples

To help you get started, we’ve selected a few pyqubo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DurhamSmith / snaQe / snaqe.py View on Github external
def create_vars(self):
       vars ={}
       print('===========MAPPINGS==============')
       for i, edge in enumerate(self.graph.edges.data()):
           e=(edge[0],edge[1])
           print(f'edge: {e} \t data: {edge[2]}')
           label = f'({edge[0]}, {edge[1]})'
           vars[e] = Binary(label)
       return vars

pyqubo

PyQUBO allows you to create QUBOs or Ising models from mathematical expressions.

Apache-2.0
Latest version published 12 days ago

Package Health Score

69 / 100
Full package analysis

Popular pyqubo functions