qiskit-community / qiskit-application-modules-demo-sessions

Demo notebooks for Qiskit application modules demo sessions (Oct 8 & 15):
https://www.youtube.com/playlist?list=PLOFEBzvs-VvrKOTLs5ESjAmg9Lz8G1PON
49 stars 42 forks source link

max-cut-qiskit-optimization-demo- Graph Output #3

Closed arian-code closed 2 years ago

arian-code commented 2 years ago

Hi, While running the code, I get the solution : [[0, 1, 4], [2, 3]]

However, when I draw it using maxcut.draw(result, pos=pos):

nodes 0,1,3 are red, while 2, 4 are blue.

I have attached my jupyuter file for reference please. Kindly guide my-max-cut-qiskit-optimization-demo.pdf .

delodealexandre commented 2 years ago

Hi,

I have a very similar issue but:

nodes 0,2,4 are red, while 1, 3 are blue.

delodealexandre commented 2 years ago

I have made this change:

https://github.com/a-matsuo/qiskit-optimization/commit/4e9279ea367b76fcac2f58e9bc7423ef30143c42

It works for me now.

HuangJunye commented 2 years ago

@arian-code @delodealexandre Sorry for the late reply. Do you still face this issue?

garrison commented 2 years ago

It sounds from @delodealexandre's post that this is most likely solved by https://github.com/Qiskit/qiskit-optimization/pull/263, which appears to have made it into Qiskit Optimization 0.3.0.

HuangJunye commented 2 years ago

@garrison Thanks for the pointer. Closing this issue. @arian-code @delodealexandre Please let us know if you still face the same issue with the latest Qiskit Optimization.