vgoliber / embedding-pictures

A demonstration of embedding QUBOs using Ocean onto the D-Wave QPUs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Embedding Pictures

This exercise contains six small programs which illustrate embedding topics in Ocean and on the D-Wave QPUs, for Training features.

Exercise 1

To run the demo, at the command line, type:

python embedding_clique_chimera.py 8

If you're running in the Leap IDE, open a Terminal, and then run this command.

The program will produce a file embedding_clique_chimera.png in your working directory. This file contains a picture with a left and right side. The left side is an 8-clique and the right picture is an example Chimera embedding of an 8-clique.

Exercise 2

To run the demo, at the command line, type:

python embedding_clique_pegasus.py 8

If you're running in the Leap IDE, open a Terminal, and then run this command.

The program will produce a file embedding_clique_pegasus.png in your working directory. The file contains a picture with a left and right side. The left side is an 8-clique and the right picture is an example Pegasus embedding of an 8-clique.

Exercise 3

To run the demo, at the command line, type:

python explore_embed_clique_chimera.py 4

If you're running in the Leap IDE, open a Terminal, and then run this command.

The output of the program will be a typical Chimera embedding of a 4-clique.

Exercise 4

To run the demo, at the command line, type:

python explore_embed_clique_pegasus.py 4

If you're running in the Leap IDE, open a Terminal, and then run this command.

The output of the program will be a typical Pegasus embedding of a 4-clique.

Exercise 5

To run the demo, at the command line, type:

python clique_embedding_chimera.py 8

If you're running in the Leap IDE, open a Terminal, and then run this command.

The program will produce a file clique_embedding_chimera.png in your working directory. This file contains a picture with a left and right side. The left side is an 8-clique and the right picture is an example Chimera clique embedding, using the 2015 clique embedding algorithm, of an 8-clique.

Exercise 6

To run the demo, at the command line, type:

python clique_embedding_pegasus.py 8

If you're running in the Leap IDE, open a Terminal, and then run this command.

The program will produce a file clique_embedding_pegasus.png in your working directory. This file contains a picture with a left and right side. The left side is an 8-clique and the right picture is an example Pegasus clique embedding, using the 2015 clique embedding algorithm, of an 8-clique.

License

Released under the Apache License 2.0. See LICENSE file.

About

A demonstration of embedding QUBOs using Ocean onto the D-Wave QPUs.

License:Apache License 2.0


Languages

Language:Python 100.0%