Skip to content

Commit

Permalink
Adding index info into Q matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
joelgdwave committed Apr 28, 2020
1 parent 4517bd2 commit 8cc1db8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@ Code Specifics

Some notes on the code:

* We use a one-dimensional vector to store the two-dimensional (nurse, day)
QUBO matrix. The (nurse, day) tuples are stored in the one-dimensional
vector in the following order, where nurse is first index, and day is
second index, in the tuples:
* We use a two-dimensional QUBO matrix, Q[``i``, ``j``], in which both
indices ``i`` and ``j`` are composite indices. Each composite index
is used to represent the combinations of the variables ``nurse`` and
``day``. The (``nurse``, ``day``) tuples are placed into the
one-dimensional index in the following order, where nurse is first
index, and day is second index, in the tuples:

(0, 0) (0, 1) (0, 2)... (0, D) (1, 0) (1, 1)... (1, D)

Expand Down

0 comments on commit 8cc1db8

Please sign in to comment.