Repository navigation
[Review before IBM] HI-VQE docs for the 4.0.0 function - #6
Closed
seihyun-jeong wants to merge 3 commits into
Closed
seihyun-jeong wants to merge 3 commits into
seihyun-jeong wants to merge 3 commits into
Conversation
In 4.0.0 the result no longer carries "states" or "eigenvector". They are written to an HDF5 results file instead, alongside "final_energy", "final_energy_variance" and "energy_history". The result names that file in "results_file_name". - API reference: drop "states" and "eigenvector" from the result table, add "results_file_name", and point "energy_variance" at the states in the results file. - Guide: show the 4.0.0 result, list what the results file holds, and add examples that create a QiskitServerless client, download the file and read it with h5py. Add a Changelog section that starts at 4.0.0. - Tutorial: install h5py, and download and read the results file for each calculation. Co-authored-by: Shane McFarthing <shane.mcfarthing@gmail.com> Co-authored-by: Rowan Pellow-Jarman <rowanpellow@gmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
The guide downloaded the results file with serverless.file_download(results_file_name, function) and then opened results_file_name. That fails with FileNotFoundError: without target_name, qiskit-serverless saves the file as downloaded_<8 hex>_<name> (qiskit_serverless/core/files.py, 0.36.0). The comment above the call, "saved ... under the same name", was wrong for the same reason. Pass target_name=results_file_name so the file lands under the name the next line opens, and make the comment say what the call does. The tutorial still asks for the path by hand and is left alone for now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 tasks done
jaewan-qunova
approved these changes
Oct 7, 2026
The licensed-use example passed backend_name="ibm_torino". Current qiskit-ibm-catalog checks backend access before it submits a job, so on an instance without ibm_torino the example stops with "Backend 'ibm_torino' is not available or you do not have access to it". It now passes backend_name, as the rest of the guide does, with a comment giving the 14 qubits that H2O in STO-3G needs (7 orbitals). The example also built its catalog from token and instance placeholders, unlike "Get started", which uses the saved account. It now does the same: QiskitFunctionsCatalog(channel="ibm_quantum_platform"). Checked against production 4.0.0 from a test instance. With a placeholder licence token, the job reaches the function and is refused with TokenNotFoundError (1201), as expected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 tasks done
supalert-qunova
approved these changes
Oct 7, 2026
supalert-qunova
left a comment
Collaborator
There was a problem hiding this comment.
After testing with the Fake-backend(test_eagle_us-east), the printed job.result() and file downloads work perfectly after modifying
serverless.file_download(
results_file_name, function)
to
serverless.file_download(
results_file_name, function, target_name=results_file_name)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
Do not merge. This PR is the review copy of what we will send to IBM (Qiskit/documentation). Its base,
upstream-main, is a copy of IBM'smain, so Files changed shows exactly what IBM will receive. Once it is approved, this same branch goes to IBM as the upstream PR.What changes for users in 4.0.0
From the Changelog this PR adds to the guide:
"states"or"eigenvector". They are now saved in an HDF5 results file, together with"final_energy","final_energy_variance", and"energy_history"."results_file_name"to the result. It gives the name of the results file, which you can download withserverless.file_download(). Reading the file requires theh5pypackage.Three pages change: the API reference, the guide, and the tutorial. Nothing else (for example the
./startfix from #4) is included.Before and after
Screenshots come from the local docs preview (
./start), which uses the same renderer as the IBM docs site. Before is IBM's currentmain; after is this branch.API reference: result table
The table drops
"states"and"eigenvector"and adds"results_file_name".Guide: reading the result
The printed result shows the 4.0.0 response. The guide lists what the results file holds and adds two examples: creating a
QiskitServerlessclient, then downloading the file and reading it withh5py. The download passestarget_nameso the file is saved under the name the next line opens (see Changes after review).Guide: new Changelog section
Added between "Fetch error messages" and "Get support".
Tutorial: setup
h5pyis added to the install line, and aQiskitServerlessclient is created next to the catalog.Tutorial: results files
Each calculation's results file is downloaded and read with
h5py.Where these changes came from
3bad603bb0, pushed tomainThis branch was cut from IBM's
mainand holds those three files as they are on ourmain, in a single commit.Changes after review
serverless.file_download(results_file_name, function)and then openedresults_file_name. Withouttarget_name, qiskit-serverless saves the file asdownloaded_<8 hex>_<name>(qiskit_serverless/core/files.py, 0.36.0), so the open failed withFileNotFoundError. It now passestarget_name=results_file_name. The screenshot above shows the fixed version.backend_name="ibm_torino". Currentqiskit-ibm-catalogchecks backend access before it submits, so withoutibm_torinothe example stops with "Backend 'ibm_torino' is not available or you do not have access to it". It now passesbackend_name=backend_name, # can use any device with at least 14 qubitslike the rest of the guide (H2O in STO-3G: 7 orbitals, 14 qubits). Its catalog now uses the saved account (QiskitFunctionsCatalog(channel="ibm_quantum_platform")), as "Get started" does, instead oftoken=/instance=placeholders.Run against production 4.0.0
The guide was run cell by cell against
qunova/hivqe-chemistry(reported version 4.0.0) from a test instance ontest_eagle_us-east:TokenNotFoundError(1201), as expected. No real licence was used.Please confirm
6f12d716e1). IBM's CI excludes both Qunova notebooks from execution, so nobody runs them on IBM's side either. Should we re-run against the 4.0.0 function before sending?The guide and the tutorial read the file differently.The guide was the one that was wrong and is fixed above. The tutorial still asks the reader to fill in"PATH_TO_DOWNLOADED_RESULTS_FILE", which works. It is left as is for now.### 4.0.0 (YYYY-MM-DD)?Checks
npm run check:spelling,check:markdown,check:internal-linkspass on this branch.squeaky --checkandqiskit-docs-notebook-normalizer --checkpass (the tox lint tools).git diff upstream-main hivqe-4.0.0touches only the three Qunova doc files.After approval
🤖 Generated with Claude Code