Skip to content

Knapsack Problem #33

Discussion options

You must be logged in to vote

Oh I understand the question now. You just put everything in the same vector and matrix and read the output only at locations corresponding to $X$.

For instance, let's say you pack your variable spins and your ancillary spins in a vector as follows.

$$V = \begin{pmatrix} X \\ Y \end{pmatrix}$$

Let $A$ be the matrix embedding the interactions between your variable spins, let $B$ be the matrix embedding the interactions between your ancillary spins, let $C$ be the matrix embedding the interactions between your variable spins and your ancillary spins, and let $C_1$, $C_2$ be two matrices such that $C = C_1 + C_2$. Usually $C_2 = 0$ or $C_2 = C_1$ depending on what is the easiest to generate.…

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
3 replies
@Kashyapaman2812
Comment options

@BusyBeaver-42
Comment options

Answer selected by bqth29
@Kashyapaman2812
Comment options

Comment options

You must be logged in to vote
5 replies
@Kashyapaman2812
Comment options

@Kashyapaman2812
Comment options

@bqth29
Comment options

@Kashyapaman2812
Comment options

@bqth29
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants