Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions .cra/.fileignore

This file was deleted.

3 changes: 0 additions & 3 deletions .whitesource

This file was deleted.

22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Demonstration of SQD using Qiskit CAPI
# Demonstration of SQD using the Qiskit C API

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).

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

Expand All @@ -23,12 +23,12 @@ This demo shows how to post-process noisy quantum samples to approximate the gro
│ └── parameters_fe4s4.json # JSON file containing parameters for the LUCJ circuit
├── deps
│ ├── boost # Boost C++ dependency
│ ├── boost # Boost C++ dependency (for dynamic_bitset)
│ ├── qiskit # Qiskit core library
│ ├── qiskit-addon-sqd-hpc # Qiskit extension for SQD
│ ├── qiskit-addon-sqd-hpc # Qiskit addon for SQD (C++ version)
│ ├── qiskit-cpp # C++ bindings for Qiskit
│ ├── qrmi # QRMI (quantum resource management interface)
│ └── sbd # SBD module
│ └── sbd # SBD eigensolver
├── ffsim                 # C++ header files for the ffsim library
Expand All @@ -37,7 +37,6 @@ This demo shows how to post-process noisy quantum samples to approximate the gro
│ ├── main.cpp # Main entry point of the executable
│ ├── sbd_helper.hpp # Helper functions for SBD
│ └── sqd_helper.hpp # Helper functions for SQD

```

## Requirements
Expand Down Expand Up @@ -152,13 +151,12 @@ mpirun -np 96 ./capi-demo \
```

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

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

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

## Deprecation policy

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


## Contributing

Expand Down
8 changes: 1 addition & 7 deletions src/sqd_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ struct SQD {
std::string run_id = date_str;
uint64_t n_recovery = 3; // number of configuration recovery iterations
uint64_t samples_per_batch = 1000; // number of samples per batch
uint64_t n_batches = 1; // number of batches per iteration
bool verbose = false; // print messages to stdout
bool with_hf = true; // use Hartree-Fock as a reference state

Expand All @@ -309,7 +308,6 @@ struct SQD {
ss << "# run_id:" << run_id << std::endl;
ss << "# n_recovery: " << n_recovery << std::endl;
ss << "# samples_per_batch: " << samples_per_batch << std::endl;
ss << "# n_batches: " << n_batches << std::endl;
ss << "# backend_name: " << backend_name << std::endl;
ss << "# num_shots: " << num_shots << std::endl;
return ss.str();
Expand Down Expand Up @@ -345,10 +343,6 @@ SQD generate_sqd_data(int argc, char *argv[])
sqd.n_recovery = std::stoi(argv[i + 1]);
i++;
}
if (std::string(argv[i]) == "--number_of_batch") {
sqd.n_batches = std::stoi(argv[i + 1]);
i++;
}
if (std::string(argv[i]) == "--number_of_samples") {
sqd.samples_per_batch = std::stoi(argv[i + 1]);
i++;
Expand Down Expand Up @@ -469,4 +463,4 @@ std::string write_alphadets_file(
return alphadets_bin_file;
}

#endif
#endif
Loading