Closed BrunoRosendo closed 4 months ago
A similar thing happens with cplex:
Traceback (most recent call last):
File "/home/brosendo/.local/lib/python3.10/site-packages/scipy/optimize/_cobyla_py.py", line 35, in wrapper
return func(*args, **kwargs)
File "/home/brosendo/.local/lib/python3.10/site-packages/scipy/optimize/_cobyla_py.py", line 278, in _minimize_cobyla
sf = _prepare_scalar_function(fun, x0, args=args, jac=_jac)
File "/home/brosendo/.local/lib/python3.10/site-packages/scipy/optimize/_optimize.py", line 383, in _prepare_scalar_function
sf = ScalarFunction(fun, x0, args, grad, hess,
File "/home/brosendo/.local/lib/python3.10/site-packages/scipy/optimize/_differentiable_functions.py", line 158, in __init__
self._update_fun()
File "/home/brosendo/.local/lib/python3.10/site-packages/scipy/optimize/_differentiable_functions.py", line 251, in _update_fun
self._update_fun_impl()
File "/home/brosendo/.local/lib/python3.10/site-packages/scipy/optimize/_differentiable_functions.py", line 155, in update_fun
self.f = fun_wrapped(self.x)
File "/home/brosendo/.local/lib/python3.10/site-packages/scipy/optimize/_differentiable_functions.py", line 137, in fun_wrapped
fx = fun(np.copy(x), *args)
File "/home/brosendo/.local/lib/python3.10/site-packages/qiskit_algorithms/minimum_eigensolvers/sampling_vqe.py", line 309, in evaluate_energy
).result()
File "/home/brosendo/.local/lib/python3.10/site-packages/qiskit/primitives/primitive_job.py", line 55, in result
return self._future.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 458, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/brosendo/.local/lib/python3.10/site-packages/qiskit_algorithms/minimum_eigensolvers/diagonal_estimator.py", line 118, in _call
sampler_result = job.result()
File "/home/brosendo/.local/lib/python3.10/site-packages/qiskit/primitives/primitive_job.py", line 55, in result
return self._future.result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 451, in result
return self.__get_result()
File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/brosendo/.local/lib/python3.10/site-packages/qiskit/primitives/sampler.py", line 99, in _call
probabilities = [
File "/home/brosendo/.local/lib/python3.10/site-packages/qiskit/primitives/sampler.py", line 100, in <listcomp>
Statevector(bound_circuit_to_instruction(circ)).probabilities_dict(
File "/home/brosendo/.local/lib/python3.10/site-packages/qiskit/quantum_info/states/statevector.py", line 91, in __init__
self._data = Statevector.from_instruction(data).data
File "/home/brosendo/.local/lib/python3.10/site-packages/qiskit/quantum_info/states/statevector.py", line 765, in from_instruction
init = np.zeros(2**instruction.num_qubits, dtype=complex)
ValueError: array is too big; `arr.size * arr.dtype.itemsize` is larger than the maximum possible size.
input:
cvrp = CplexSolver(
2,
None,
[
(456, 320),
(228, 0),
(912, 0),
(0, 80),
(114, 80),
# (570, 160),
# (798, 160),
# (342, 240),
# (684, 240),
# (570, 400),
# (912, 400),
# (114, 480),
# (228, 480),
# (342, 560),
# (684, 560),
# (0, 640),
# (798, 640),
],
[
(2, 1, 6),
(3, 0, 5),
(4, 1, 2),
],
True,
False,
)
The dwave error is not a problem, it only happens with the exact solver which is not made for large problems
As for IBM, it happens only with the local sampler (not the classical optimizer), so I think it might be a similar case. I'm now waiting to test this in a real machine. I might use too many minutes but I think it's worth it to discard this problem
After running an iteration in a real IBM machine, I conclude this is in fact not a problem (free stress :D )
The error is the following:
A possible input: