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

utils.test_linalg fails when use_symmetry_reduced_integrals is set True #1169

Closed
woodsp-ibm opened this issue May 16, 2023 · 0 comments · Fixed by #1248
Closed

utils.test_linalg fails when use_symmetry_reduced_integrals is set True #1169

woodsp-ibm opened this issue May 16, 2023 · 0 comments · Fixed by #1248
Labels

Comments

@woodsp-ibm
Copy link
Member

In looking to remedy the amount of deprecation messages in the unit test logs I had also changed the settings over to the defaults I would expect us to move to in the next version. So I had updated the settings file, e.g.

        self._use_symmetry_reduced_integrals: bool = True

This however causes utils.test_linalg to fail (works fine when set False), as follows:

  File "test/utils/test_linalg.py", line 104, in test_double_factorized_error_threshold_max_vecs
    diag_coulomb_mats, orbital_rotations = double_factorized(
  File "qiskit_nature/utils/linalg.py", line 312, in double_factorized
    reshaped_tensor = np.reshape(two_body_tensor, (n_modes**2, n_modes**2))
  File "<__array_function__ internals>", line 5, in reshape
  File "qiskit_nature/second_q/operators/symmetric_two_body.py", line 159, in __array_function__
    return super().__array_function__(func, types, args, kwargs)
  File "qiskit_nature/second_q/operators/tensor.py", line 179, in __array_function__
    ret = func(*new_args, **kwargs)
  File "<__array_function__ internals>", line 5, in reshape
  File "python3.9/site-packages/numpy/core/fromnumeric.py", line 298, in reshape
    return _wrapfunc(a, 'reshape', newshape, order=order)
  File "python3.9/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
    return bound(*args, **kwds)
ValueError: cannot reshape array of size 231 into shape (36,36)
@mrossinek mrossinek added the bug label May 16, 2023
@kevinsung kevinsung removed their assignment Jun 27, 2023
@mrossinek mrossinek linked a pull request Sep 6, 2023 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants