Skip to content

Unwrap Tensor objects from Qiskit Nature as necessary#408

Closed
garrison wants to merge 6 commits into
mainfrom
fix-dev-tests
Closed

Unwrap Tensor objects from Qiskit Nature as necessary#408
garrison wants to merge 6 commits into
mainfrom
fix-dev-tests

Conversation

@garrison
Copy link
Copy Markdown
Member

@garrison garrison commented Sep 8, 2023

This doesn't quite pass CI yet. At least one more change is needed somewhere.

Fixes #406.

@garrison garrison added forging cicd Related to the CICD pipeline labels Sep 8, 2023
@garrison garrison added this to the 0.4.1 milestone Sep 13, 2023
@garrison
Copy link
Copy Markdown
Member Author

The remaining error is with this code block:

https://github.com/Qiskit-Extensions/circuit-knitting-toolbox/blob/84e2b14df16a6c8fce67003985d357389c595ff3/circuit_knitting/forging/cholesky_decomposition.py#L347-L353

Historically, two_body_overlap_integrals was indeed an ndarray, but using the latest qiskit-nature, is it now S8Integrals (from qiskit_nature/second_q/operators/symmetric_two_body.py) at this point. If I focus on the test_entanglement_forging_H2O test, then in both cases we have two_body_overlap_integrals.shape == (7, 7, 7, 7). However, the reshape fails on S8Integrals:

>       w_op = two_body_overlap_integrals.reshape(n_basis_states**2, n_basis_states**2)
E       ValueError: cannot reshape array of size 406 into shape (49,49)

@garrison garrison mentioned this pull request Oct 9, 2023
1 task
@garrison garrison modified the milestones: 0.4.1, 0.5.1 Oct 31, 2023
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 13, 2023

Pull Request Test Coverage Report for Build 7012534907

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 3 of 5 (60.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.05%) to 92.385%

Changes Missing Coverage Covered Lines Changed/Added Lines %
circuit_knitting/forging/cholesky_decomposition.py 3 5 60.0%
Totals Coverage Status
Change from base Build 6845196627: -0.05%
Covered Lines: 2960
Relevant Lines: 3204

💛 - Coveralls

We'll probably also need to bump the version to 0.7 or higher,
but let's do that once the code is ready.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cicd Related to the CICD pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Forging is not yet compatible with Qiskit Nature 0.7 and higher

2 participants