-
Notifications
You must be signed in to change notification settings - Fork 11
Match grape infidelity with manually computed one #51
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
base: main
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 16796973140Details
💛 - Coveralls |
I’ve fixed the issue with looping over the objectives. The problem with using evo_full_final is that it returns the final evolution operator, not the evolved state. This matches what is done in qutip_qtrl/dynamics.py and is probably the reason why it is deprecated. |
If we are doing state transfer then surely these are the same thing? |
What has been deprecated? |
if qt.isoper(objective.initial) and qt.isoper(objective.target): | ||
if np.isclose((objective.initial).tr(), 1) and np.isclose((objective.target).tr(), 1): | ||
if np.isclose(objective.initial.tr(), 1) and np.isclose(objective.target.tr(), 1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a strange way to check if something is a density matrix
In no way is a criticism of what @rochisha0 has done to fix the issue, but this all seems like a bit of a mess. Seems strange that we don't ask the user to be more specific about what their objective is rather than us trying to guess based on what they have input, especially if we have no elegant way to distinguish between a density matrix and unitary matrix say. Also, does this code allow for the initial / target to be a CPT map? I am minded to merge this, as it seems to fix the issue, but open another issue that records the concerns raised above. |
@ajgpitch , we are considering both |
Fix #46
With this PR the GRAPE-reported infidelity matches the manually computed one by evolving the system using the optimized control pulses.
key change enable this consistency:
For state transfer problems, the correct fidelity normalization (
scale_factor
= 1/dim) is applied in the QOC interface, using existingoptimization_type
checks