Skip to content

Commit 8330fe2

Browse files
authored
Merge pull request #10 from qiskit-community/another_mol
Add case of using another molecule
2 parents 94e3ba7 + 8858ca2 commit 8330fe2

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ The following command-line options are available when running `capi-demo`. These
184184
| --adet_comm_size <int> | Number of nodes used to split the alpha-determinants. | 1 |
185185
| --bdet_comm_size <int> | Number of nodes used to split the beta-determinants. | 1 |
186186
| --task_comm_size <int> | MPI communicator size for task-level parallelism. | 1 |
187+
| --energy_target <float> | Target energy for convergence (optional). | -326.6 (Fe4S4) |
188+
| --energy_variance <float> | Target energy variance for convergence (optional). | 1.0 (Fe4S4) |
187189

188190

189191
## Input Data
@@ -195,6 +197,13 @@ These parameters can also be obtained using `ffsim`.
195197

196198
- The values in the `initial_occupancies_fe4s4.json` file are the eigenvalues obtained by diagonalizing the contracted one-electron density matrix from the MP2 method.
197199

200+
## Case of Using another molecule
201+
To simulate a different molecule, you need to prepare the following files:
202+
1. An FCIDUMP file containing the molecular integrals for the target molecule.
203+
2. A JSON file containing the parameters for the LUCJ circuit, including the number of orbitals, number of electrons, and other relevant settings.
204+
3. A JSON file defining the initial orbital occupancies.
205+
4. Set appropriate values for `--energy_target` and `--energy_variance` based on the target molecule.
206+
5. Change the file paths in the main.cpp.
198207

199208
## Contributing
200209

src/sbd_helper.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,14 @@ SBD generate_sbd_data(int argc, char *argv[])
9090
sbd.task_comm_size = std::atoi(argv[i + 1]);
9191
i++;
9292
}
93+
if (std::string(argv[i]) == "--energy_target") {
94+
sbd.init = std::atoi(argv[i + 1]);
95+
i++;
96+
}
97+
if (std::string(argv[i]) == "--energy_variance") {
98+
sbd.init = std::atoi(argv[i + 1]);
99+
i++;
100+
}
93101
}
94102
return sbd;
95103
}

0 commit comments

Comments
 (0)