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

Avoid precomputing energies outside of the simulator #35

Open
HaoTy opened this issue Jan 26, 2024 · 0 comments
Open

Avoid precomputing energies outside of the simulator #35

HaoTy opened this issue Jan 26, 2024 · 0 comments

Comments

@HaoTy
Copy link
Contributor

HaoTy commented Jan 26, 2024

In certain conditions, when precomputed_costs is not provided by the user, qokit would calculate it with CPU-version functions outside of the simulator. This is intractable when the number of qubits is high. Instead, precomputed_costs should be either user-provided or calculated in fur with the user-specified backend, whenever possible. The explicit retrieving precomputed_costs from the simulator and re-passing-in when calling the simulator objective functions should also be avoided, which, when the backend is GPU, can eliminate an unnecessary copy of the large energy vector in the CPU memory and reduce communication time.

#34 needs to be addressed to correctly implement this. Constraint-related values (e.g. portfolio optimization overlap) will be tricky for the simulator to calculate and have to be done outside of the simulator for now.

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