diff --git a/.cra/.fileignore b/.cra/.fileignore deleted file mode 100644 index cf4c267..0000000 --- a/.cra/.fileignore +++ /dev/null @@ -1,3 +0,0 @@ -pyproject.toml -requirements.txt -package-lock.json \ No newline at end of file diff --git a/.whitesource b/.whitesource deleted file mode 100644 index 1dc084b..0000000 --- a/.whitesource +++ /dev/null @@ -1,3 +0,0 @@ -{ - "settingsInheritedFrom": "ibm-q-research/whitesource-config@main" -} \ No newline at end of file diff --git a/README.md b/README.md index ef32d65..2454c88 100644 --- a/README.md +++ b/README.md @@ -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). @@ -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. @@ -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 │ @@ -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 @@ -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 | Number of configuration recovery iterations. | 3 | -| --number_of_batch | Number of batches per recovery iteration. | 1 | | --number_of_samples | Number of samples per batch. | 1000 | | --backend_name | Name of the quantum backend to use (e.g., "ibm_torino").| "" | | --num_shots | Number of shots per quantum circuit execution. | 10000 | @@ -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 diff --git a/deps/qiskit-addon-sqd-hpc b/deps/qiskit-addon-sqd-hpc index 71617c8..8ede7ac 160000 --- a/deps/qiskit-addon-sqd-hpc +++ b/deps/qiskit-addon-sqd-hpc @@ -1 +1 @@ -Subproject commit 71617c80bff31c3185a0867325f24dd8b0d8c9a6 +Subproject commit 8ede7ac5857166597da01f700c21dbe502509f61 diff --git a/src/sqd_helper.hpp b/src/sqd_helper.hpp index 77d78a4..471e2b6 100644 --- a/src/sqd_helper.hpp +++ b/src/sqd_helper.hpp @@ -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 @@ -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(); @@ -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++; @@ -469,4 +463,4 @@ std::string write_alphadets_file( return alphadets_bin_file; } -#endif \ No newline at end of file +#endif