Skip to content

Commit 27df66f

Browse files
authored
Merge pull request #7 from qiskit-community/minor-edits
Minor edits, primarily to the README
2 parents 1b8375a + 85f612c commit 27df66f

File tree

5 files changed

+8
-30
lines changed

5 files changed

+8
-30
lines changed

.cra/.fileignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.whitesource

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Demonstration of SQD using Qiskit CAPI
1+
# Demonstration of SQD using the Qiskit C API
22

33
This demo shows how to post-process noisy quantum samples to approximate the ground state energy of the Fe₄S₄ cluster, using the [Sample-based Quantum Diagonalization (SQD) algorithm](https://www.science.org/doi/10.1126/sciadv.adu9991).
44

@@ -9,7 +9,7 @@ This demo shows how to post-process noisy quantum samples to approximate the gro
99
- Integration with Qiskit C++, QRMI, and qiskit-addon-sqd-hpc.
1010
- Support for hybrid quantum-classical workflows, including:
1111
- Quantum sampling on real backends.
12-
- Classical post-processing using the SQD.
12+
- Classical post-processing using the SQD addon.
1313
- Diagonalization using the SBD eigensolver.
1414
- Designed for scalable execution on high-performance computing (HPC) clusters.
1515

@@ -23,12 +23,12 @@ This demo shows how to post-process noisy quantum samples to approximate the gro
2323
│ └── parameters_fe4s4.json # JSON file containing parameters for the LUCJ circuit
2424
2525
├── deps
26-
│ ├── boost # Boost C++ dependency
26+
│ ├── boost # Boost C++ dependency (for dynamic_bitset)
2727
│ ├── qiskit # Qiskit core library
28-
│ ├── qiskit-addon-sqd-hpc # Qiskit extension for SQD
28+
│ ├── qiskit-addon-sqd-hpc # Qiskit addon for SQD (C++ version)
2929
│ ├── qiskit-cpp # C++ bindings for Qiskit
3030
│ ├── qrmi # QRMI (quantum resource management interface)
31-
│ └── sbd # SBD module
31+
│ └── sbd # SBD eigensolver
3232
3333
├── ffsim                 # C++ header files for the ffsim library
3434
@@ -37,7 +37,6 @@ This demo shows how to post-process noisy quantum samples to approximate the gro
3737
│ ├── main.cpp # Main entry point of the executable
3838
│ ├── sbd_helper.hpp # Helper functions for SBD
3939
│ └── sqd_helper.hpp # Helper functions for SQD
40-
4140
```
4241

4342
## Requirements
@@ -152,13 +151,12 @@ mpirun -np 96 ./capi-demo \
152151
```
153152

154153
## Run Options
155-
The following command-line options are available when running capi-demo. These control the behavior of the SQD simulation and quantum sampling:
154+
The following command-line options are available when running `capi-demo`. These control the behavior of the SQD simulation and quantum sampling:
156155

157156
### SQD Options
158157
| Option | Description | Default Value |
159158
|------------------------------|--------------------------------------------------------------------|---------------|
160159
| --recovery <int> | Number of configuration recovery iterations. | 3 |
161-
| --number_of_batch <int> | Number of batches per recovery iteration. | 1 |
162160
| --number_of_samples <int> | Number of samples per batch. | 1000 |
163161
| --backend_name <str> | Name of the quantum backend to use (e.g., "ibm_torino").| "" |
164162
| --num_shots <int> | Number of shots per quantum circuit execution. | 10000 |
@@ -187,14 +185,6 @@ These parameters can also be obtained using `ffsim`.
187185

188186
- 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.
189187

190-
## Deprecation policy
191-
192-
We follow [semantic versioning](https://semver.org/) and are guided by the principles in
193-
[Qiskit's deprecation policy](https://github.com/Qiskit/qiskit/blob/main/DEPRECATION.md).
194-
We may occasionally make breaking changes in order to improve the user experience.
195-
When possible, we will keep old interfaces and mark them as deprecated, as long as they can co-exist with the
196-
new ones.
197-
198188

199189
## Contributing
200190

src/sqd_helper.hpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,6 @@ struct SQD {
291291
std::string run_id = date_str;
292292
uint64_t n_recovery = 3; // number of configuration recovery iterations
293293
uint64_t samples_per_batch = 1000; // number of samples per batch
294-
uint64_t n_batches = 1; // number of batches per iteration
295294
bool verbose = false; // print messages to stdout
296295
bool with_hf = true; // use Hartree-Fock as a reference state
297296

@@ -309,7 +308,6 @@ struct SQD {
309308
ss << "# run_id:" << run_id << std::endl;
310309
ss << "# n_recovery: " << n_recovery << std::endl;
311310
ss << "# samples_per_batch: " << samples_per_batch << std::endl;
312-
ss << "# n_batches: " << n_batches << std::endl;
313311
ss << "# backend_name: " << backend_name << std::endl;
314312
ss << "# num_shots: " << num_shots << std::endl;
315313
return ss.str();
@@ -345,10 +343,6 @@ SQD generate_sqd_data(int argc, char *argv[])
345343
sqd.n_recovery = std::stoi(argv[i + 1]);
346344
i++;
347345
}
348-
if (std::string(argv[i]) == "--number_of_batch") {
349-
sqd.n_batches = std::stoi(argv[i + 1]);
350-
i++;
351-
}
352346
if (std::string(argv[i]) == "--number_of_samples") {
353347
sqd.samples_per_batch = std::stoi(argv[i + 1]);
354348
i++;
@@ -469,4 +463,4 @@ std::string write_alphadets_file(
469463
return alphadets_bin_file;
470464
}
471465

472-
#endif
466+
#endif

0 commit comments

Comments
 (0)