Hi,
could you please post your code as code so I can play with it. It is easier for me that way.
In addition, recall what the instructions say about not needing to define the cost and the optimizer functions again, you can just call them. Just so the code is much simpler. You can also call the function build_hamiltonian() that was just implemented above.
Thanks.