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.
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 retrievingprecomputed_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.