Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
afbedf0
Update the HI-VQE docs for the 4.0.0 function
seihyun-jeong Oct 7, 2026
e20928a
Save the HI-VQE results file under its own name before opening it
seihyun-jeong Oct 7, 2026
de8f74b
Let the HI-VQE licence example run on the reader's own backend
seihyun-jeong Oct 7, 2026
a639813
Document usage-based billing and the 5.0.x function
seihyun-jeong Oct 7, 2026
a1174a7
Format the FeP-NO CASCI reference the way ruff wants it
seihyun-jeong Oct 7, 2026
e2e2367
Add a 5.0.0 entry to the HI-VQE Changelog
seihyun-jeong Oct 7, 2026
cd03013
Submit the guide's Li2S example at the size it needs
seihyun-jeong Oct 7, 2026
df6d375
Size HI-VQE runs locally instead of with estimate_only
seihyun-jeong Oct 7, 2026
9dc44c3
Pass every basis option to PySCF in the guide's qubit count
seihyun-jeong Oct 7, 2026
84afc09
Document sizing as a rule plus a billed estimate_only, as Qedma does
seihyun-jeong Oct 7, 2026
a018b60
Document HI-VQE 5.0.3: argument checking and the fixed options
seihyun-jeong Oct 12, 2026
b00e33e
Publish the HI-VQE size estimator in the guide
seihyun-jeong Oct 12, 2026
7f9c427
Hold licensed runs to the size, and size with the estimator alone
seihyun-jeong Oct 12, 2026
e3d5adf
Say the size rules once, and check arguments where run() is called
seihyun-jeong Oct 12, 2026
c0c4ac0
Give the size estimator a section of its own
seihyun-jeong Oct 12, 2026
769678a
Check the arguments before run(), and say it does not check the size
seihyun-jeong Oct 12, 2026
adfc9c6
Match the API reference to the schema, and link the options from the …
seihyun-jeong Oct 12, 2026
a92dfce
Keep each benchmark time on one line
seihyun-jeong Oct 12, 2026
ead71bb
Shorten the size estimator's docstring, as in the function's copy
seihyun-jeong Oct 12, 2026
d573802
Fix a stale changelog link, and split the size rules by case
seihyun-jeong Oct 12, 2026
4908c68
Say the guide's backend must be one you can access, not its qubit count
seihyun-jeong Oct 14, 2026
e550534
Add error code 4631 and the 5.0.4 changelog
seihyun-jeong Oct 14, 2026
b6a86a5
Document running from an uploaded FCIDUMP file
seihyun-jeong Oct 14, 2026
81a11de
Restructure the HI-VQE guide around the reader's questions
seihyun-jeong Oct 15, 2026
3ee4d40
Fold the size estimator's code into an accordion
seihyun-jeong Oct 15, 2026
0ac4320
Separate the licensed example's wrapper from its run
seihyun-jeong Oct 15, 2026
381e3a0
Call the size fee the per-execution fee, as IBM's pricing does
seihyun-jeong Oct 15, 2026
b093048
Give the qubit count as one formula, with the NH3 example
seihyun-jeong Oct 15, 2026
d5c33c3
Say the size estimator is the function's own size check, without IBM
seihyun-jeong Oct 15, 2026
f55f206
Merge the unreleased 5.0.x changelog entries into one, for 5.0.4
seihyun-jeong Oct 15, 2026
b509b86
List only the main changes of 5.0.4 in the changelog
seihyun-jeong Oct 15, 2026
a8e9f38
Say a licensed run is still checked against its function size
seihyun-jeong Oct 15, 2026
414e926
Say the function size sets a licensed run's classical compute cost
seihyun-jeong Oct 15, 2026
4aa04e8
Format the size estimator cell with ruff
seihyun-jeong Oct 15, 2026
2400ce0
Correct three passages of the HI-VQE API reference
seihyun-jeong Oct 15, 2026
98e193b
Fix the HI-VQE tutorial so it runs as written
seihyun-jeong Oct 15, 2026
f2f4de2
Keep the tutorial's title, and the shared index and toc, unchanged
seihyun-jeong Oct 15, 2026
07707d7
Give size "l" as more than 20 qubits, not "no limit"
seihyun-jeong Oct 15, 2026
3f69822
Add the 5.0.5 changelog
seihyun-jeong Oct 16, 2026
dd6187b
Update the HI-VQE docs for 5.0.6 to 5.0.8
seihyun-jeong Oct 23, 2026
7689bb9
Leave the per-execution fee amounts out of the HI-VQE docs
seihyun-jeong Oct 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 66 additions & 16 deletions docs/api/functions/qunova-chemistry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,26 @@ description: API reference for HI-VQE Chemistry, a Qiskit Function by Qunova Com

## Inputs

Arguments are checked when you call `run()`, before a job is created: one with
the wrong name, type or range raises an exception describing what failed, and
nothing is billed. `function.validate_arguments({...})` runs the same check without
running anything, and `function.arguments_schema` lists every argument with its
type, range and default.

### `geometry`
<Attribute attributeTypeHint="`Union[List[List[Union[str, Tuple[float, float, float]]]], str]`">
This can be either a string or structured lists containing atom and coordinate pairs. If this is given as a string, it must be a molecule geometry in Cartesian Coordinate Format. If this is given as a list, it should be given as a list of lists that each contain an atom string and coordinate tuple.
- Required: Yes
- Required: Yes, unless `fcidump_file_name` is given
- Example: `[['O', (0, 0, 0)], ['H', (0, 1, 0)], ['H', (0, 0, 1)]]` or `"O 0 0 0; H 0 1 0; H 0 0 1"`
</Attribute>

### `fcidump_file_name`
<Attribute attributeTypeHint="`str`">
The name of an FCIDUMP file you uploaded to the function with `file_upload`, without a directory part, to use in place of `geometry`. The integrals of the file are used as they are, and `geometry` and `molecule_options` are ignored. The file can be plain text or gzip-compressed, and must describe a closed-shell singlet. See [Run from an FCIDUMP file](/docs/guides/qunova-chemistry#run-from-an-fcidump-file).
- Required: Yes, unless `geometry` is given
- Example: `"nh3.FCIDUMP"`
</Attribute>

### `backend_name`
<Attribute attributeTypeHint="`str`">
Name of the backend to make the query.
Expand All @@ -34,13 +47,15 @@ Name of the backend to make the query.
<Attribute attributeTypeHint="`int`">
The maximum subspace dimension for the diagonalization. Fewer states will be used if the number is not a perfect square.
- Required: Yes
- Valid range: Between 1 and 400 000 000
- Example: `100`
</Attribute>

### `max_expansion_states`
<Attribute attributeTypeHint="`int`">
The maximum number of classically-generated CI states to be included in each iteration.
- Required: Yes
- Valid range: At least 1
- Example: `10`
</Attribute>

Expand All @@ -63,19 +78,19 @@ A string specifying the basis type; these are passed to pyscf. For example: `"st

#### `active_orbitals`
<Attribute attributeTypeHint="`List[int]`" attributeValue="Every orbital index">
A list of active orbital indices in the interval [0, n) where n is the number of qubits used in the problem. If this is specified, then the frozen_orbitals argument must also be specified.
- Valid range: The spatial orbital indices valid for the problem
A list of active orbital indices in the interval [0, n) where n is the number of orbitals in the basis. If this is specified, then the frozen_orbitals argument must also be specified.
- Valid range: The spatial orbital indices valid for the problem, each at most once
</Attribute>

#### `frozen_orbitals`
<Attribute attributeTypeHint="`List[int]`" attributeValue="`No indices`">
A list of frozen orbital indices in the same range as active_orbitals. If specified, then active_orbitals must also be specified. Note that only occupied orbitals should be frozen as the number of active electrons is reduced by 2 for every occupied orbital that is frozen.
- Valid range: The spatial orbital indices valid for the problem, excluding active orbitals
- Valid range: The spatial orbital indices valid for the problem, excluding active orbitals, each at most once
</Attribute>

#### `orbital_coeffs`
<Attribute attributeTypeHint="`List[List[float]]`" attributeValue="`Hartree-Fock molecular orbitals`">
The coefficients for the spatial orbitals used in the calculation of the electronic repulsion integrals for the system. Some valid examples are Hartree-Fock molecular orbitals, natural orbitals, and AVAS orbitals.
<Attribute attributeTypeHint="`Union[List[List[float]], numpy.ndarray]`" attributeValue="`Hartree-Fock molecular orbitals`">
The coefficients for the spatial orbitals used in the calculation of the electronic repulsion integrals for the system. Some valid examples are Hartree-Fock molecular orbitals, natural orbitals, and AVAS orbitals. Give a matrix as a list of equal-length rows or as a 2-D NumPy array, such as PySCF's `mo_coeff`.
- Valid range: Various
</Attribute>

Expand Down Expand Up @@ -116,21 +131,20 @@ Specifies whether to use cartesian GTOs as the angular momentum basis functions
</Attribute>

#### `magmom`
<Attribute attributeTypeHint="`(`Optional[List[Union[int, float]]]`" attributeValue="`1_000`">
<Attribute attributeTypeHint="`Optional[List[Union[int, float]]]`" attributeValue="`None`">
Sets the colinear spin magnetic moment of each atom. By default, this is None and each atom is initialized with a spin of zero.
- Valid range: See [pyscf documentation](https://pyscf.org/pyscf_api_docs/pyscf.gto.html#pyscf.gto.mole.MoleBase.build)
</Attribute>

#### `avas_aolabels`
<Attribute attributeTypeHint="`Optional[List[str]]`" attributeValue="`None`">
This defines Atomic Orbital to be included in AVAS scheme. See [AVAS documentation](https://arxiv.org/abs/1701.07862).
- Valid range: i.e., ["H 1s", "O 2p"] for H$_2$O
- Valid range: i.e., ["H 1s", "O 2p"] for H$_2$O, each label at most once
</Attribute>

#### `avas_threshold`
<Attribute attributeTypeHint="`float`" attributeValue="`0.2`">
This specifies the cutoff value used to determine which Atomic Orbitals (AOs) are retained in the active space.
- Valid range: Between 0.0 and 2.0
</Attribute>

#### `noons_level`
Expand Down Expand Up @@ -224,17 +238,53 @@ The tolerance for predicting which states should be screened out of the subspace
- Example: `{"shots": 10_000, "max_iter": 10 }`
</Attribute>



### `use_session`
<Attribute attributeTypeHint="`bool`" attributeValue="`False`">
Runs the function's quantum jobs in one Qiskit Runtime session, so that jobs
after the first do not wait in the queue again.
- Required: No
- Example: `True`
</Attribute>

### `function_size`
<Attribute attributeTypeHint="`str`" attributeValue="`m`">
Which resources the job runs on, and what the run is billed. It is passed to
`run()` like the arguments above, though it belongs to the platform rather than
to this function.

| `function_size` | Qubits | `max_states` | Compute profile |
|-----|-----|-----|-----|
| `"s"` | Up to 20 | Up to 1,000 | 8 CPUs, 32 GB |
| `"m"` | Up to 48 | Up to 10,000,000 | 16 CPUs, 128 GB |
| `"l"` | More than 48 | More than 10,000,000 | 48 CPUs, 768 GB |

A problem needs the smallest size that fits both its qubits and its
`max_states`. A size smaller than the problem needs is rejected before any QPU
time is spent, with error code 1221 naming the size to use; the rejected run is
still billed at the size it was submitted at. A size larger than it needs runs,
and is billed at that larger size. To check the size before submitting, see
[Size your problem needs](/docs/guides/qunova-chemistry#size-your-problem-needs).
Licensed runs are checked the same way, and the size sets their compute, and so
their classical compute cost, but no per-execution fee is charged. Runs with
trial access are limited to `"s"`, and are rejected with error code 4500 above
it.
- Required: No
- Example: `"l"`
</Attribute>

## Outputs

The function returns a dictionary with four keys and values. The keys and values are documented in the following table:
The function returns a dictionary with the following keys and values:

| Key | Value Type| Explanation |
|-----|---------------|---------------------------------------------------------------------------------------------------------------------------|
| `"energy"` | `float` | The approximate ground state energy of the molecule. |
| `"states"` | `List[str]` | The selected determinants that form the subspace used to solve for the energy. They are in alternating alpha-beta format. |
| `"eigenvector"` | `List[float]` | The eigenvector corresponding to the ground state of the subspace composed of `"states"`.|
| `"energy_variance"` | `float` | The energy variance of the ground state of the subspace composed of `"states"`, giving an indication of the quality of the solution. This value is non-negative and a lower value means that the ground state of the subspace more closely approximates an eigenstate of the system's Hamiltonian. |
| `"energy_history"` | `List[float]` | The energies computed each iteration during the hybrid optimization process, in the same order that they were computed. Two energies are computed per iteration as part of the SPSA optimization process. |
| `"results_file_name"` | `string` | The name of the hdf5 results file that can be downloaded using Qiskit Serverless. The file contains `"states"`, `"eigenvector"`, `"energy_history"`, `"final_energy"`, and `"final_energy_variance"`. |
| `"energy_variance"` | `float` | The energy variance of the ground state of the subspace composed of the `"states"` saved in the results file, giving an indication of the quality of the solution. This value is non-negative and a lower value means that the ground state of the subspace more closely approximates an eigenstate of the system's Hamiltonian. |
| `"energy_history"` | `List[float]` | The energies computed each iteration during the hybrid optimization process, in the same order that they were computed. Two energies are computed per iteration as part of the SPSA optimization process. |
| `"function_version"` | `string` | The version of the function that ran the job. Quote it in a support request. |
| `"metadata"` | `dict` | Contains `"resource_usage"`, giving the time spent in each stage of the job, including QPU time. |

A job stopped with `job.cancel()` returns what the run had computed by then
instead, with `"status": "canceled"`, and writes no results file. See
[Results of a stopped job](/docs/guides/qunova-chemistry#results-of-a-stopped-job).
Loading