Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions for Lab 1 #32

Open
dr-kinder opened this issue Jun 10, 2024 · 0 comments
Open

Suggestions for Lab 1 #32

dr-kinder opened this issue Jun 10, 2024 · 0 comments

Comments

@dr-kinder
Copy link

I found the function requirements difficult to interpret in Part 2 of this lab. The callback_dict is referenced in the cost_func function, but it was not explained or defined until after the cost_func function was graded.

One might reasonably argue that I should have read the whole notebook first, rather than struggling through one cell at a time. However, I would suggest moving the following text immediately before the "Exercise 6" box:

Callback functions are a standard way for users to obtain additional information about the status of an iterative algorithm (such as VQE). However, it is possible to do much more than this. Here, we use a mutable object (dictionary), to store resulting vector at each iteration of our algorithm, in case we need to restart the routine due to failure or return the another iteration number.

callback_dict = {
"prev_vector": None,
"iters": 0,
"cost_history": [],
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant