Open GuillermoAbadLopez opened 1 week ago
Max cut problem in Ansatze and Variational Forms of the Variational Algorithm Design badge
Ansatze and Variational Forms
Variational Algorithm Design
Hey! I was doing the Variational Algorithm Design badge, from IBM Quantum learning, and I noticed that in the max-cut problem, the SparsePauliOp that is given as a Hamiltonian, looked a bit off:
(notice the Z's positions in each term [from right to left], indicate an edge (the connectivity) between two nodes: IIZZ means there are 4 qubits, and that qubit 0 is connected to qubit 1)
IIZZ
I think this comes from a copypaste from this other graph in another page, where its actually correct (different graph)
This IIIZZ+IIZIZ+IZIIZ+ZIIIZ, has to change into IIZZ+IZIZ+IZZI+ZIIZ+ZZII, both in:
IIIZZ+IIZIZ+IZIIZ+ZIIIZ
IIZZ+IZIZ+IZZI+ZIIZ+ZZII
(or the graph image has to change, but that would be weird, since in the next page we use it...)
I searched a bit, and found this old documentation, from Qiskit textbook, which has what I would have guessed is correct:
Also, a bit later, I arrived at the next page of the Badge (Cost Functions), and there it was correctly written as well:
Opening the Issue here, since I didn't know where else to open it..
@Eric-Arellano told me that later, he would tag the relevant people 👍
URL to the relevant documentation
Max cut problem in
Ansatze and Variational Forms
of theVariational Algorithm Design
badgeSelect all that apply
Problem
Hey! I was doing the Variational Algorithm Design badge, from IBM Quantum learning, and I noticed that in the max-cut problem, the SparsePauliOp that is given as a Hamiltonian, looked a bit off:
(notice the Z's positions in each term [from right to left], indicate an edge (the connectivity) between two nodes:
IIZZ
means there are 4 qubits, and that qubit 0 is connected to qubit 1)Possible origin of the Problem
I think this comes from a copypaste from this other graph in another page, where its actually correct (different graph)
Solution
This
IIIZZ+IIZIZ+IZIIZ+ZIIIZ
, has to change intoIIZZ+IZIZ+IZZI+ZIIZ+ZZII
, both in:(or the graph image has to change, but that would be weird, since in the next page we use it...)
Checks:
I searched a bit, and found this old documentation, from Qiskit textbook, which has what I would have guessed is correct:
Also, a bit later, I arrived at the next page of the Badge (Cost Functions), and there it was correctly written as well: