-
Notifications
You must be signed in to change notification settings - Fork 35
Add DUCC to qdk-chemistry #602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Agam Shayit (agamshayit-ms)
wants to merge
240
commits into
main
Choose a base branch
from
feature/agamshayit/ducc_prototype
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 236 commits
Commits
Show all changes
240 commits
Select commit
Hold shift + click to select a range
4c00ac8
Flexible basis sets and initial guess (#224)
mmoerchen 1b482e9
Limit Parallelism in Dev Container Build (#228)
v-georgen b1df0bc
Add upper bound on numpy version (#240)
v-georgen 2f253bd
Move CaseInsensitiveStrEnum to utils.enum module (#236)
Copilot 44eac61
Refactor Top Level Documentation (#229)
wavefunction91 438d438
Consistent Capitalization in references.bib (#246)
wavefunction91 cc74792
Fix documentation problems (#251)
sobolevnrm cb58937
Add Pauli Math to QDK/Chemistry (#218)
wavefunction91 2b1be20
Fix spelling errors in docs (#253)
ConradJohnston 6e111fc
Fix spelling errors in codebase (#254)
ConradJohnston 831f89a
Refactor doc examples to load structures from XYZ files (#252)
ConradJohnston ebfe72e
(De)serialization for rdms (#256)
puckvg 77eaa62
Unify json / hdf5 serialization (#262)
puckvg e81e927
Bug in naming of coupled cluster container (#265)
puckvg 54d7d3d
Refactor Hamiltonian into a Container Model (#221)
rainli323 b6cc8df
Add test to example/sample_rdkit_structure.py (#231)
rainli323 d3ae335
Update demo notebook scf_solver.run() arguments to latest version. (#…
sobolevnrm ea213da
Add modified GDM code and trial energy function (#222)
3f405c9
Remove deprecated names (#227)
mmoerchen 117f22e
Update qiskit dependency version constraints (#274)
wavefunction91 eaba4f6
Add @ConradJohnston as a global code owner (#272)
wavefunction91 3c2828c
Adapt QDK/Chemistry to Qiskit 2.3.0 (#281)
MarcoEckhoff b596541
Add trademarks section to README (#270)
wavefunction91 2c3b417
Fix conversion from QDK/Chemistry Orbitals to PySCF SCF (#280)
MarcoEckhoff d284d12
Add SUPPORT.md (#282)
wavefunction91 98936d8
Add CI/CD for macOS build (#263)
v-georgen 90605a9
Fix Sample SCI Workflow (#288)
MarcoEckhoff f9d879c
Allow to load ansatz from separate wfn / hamiltonian files (#276)
puckvg 1924654
fix: preserve active space indices after orbital localization (#259)
ConradJohnston 096558a
Expose ConfigurationSet in python (#289)
puckvg 0ecfd4f
provide an example in passing QDK electronic Hamiltonian to OpenFermi…
rainli323 99ff193
Add stability analysis in QDK Chemistry (#230)
175c40c
Add time evolution unitary dataclass and constructor algorithms (#219)
RushiGong 1b2ab5e
Add N2 iterative QPE demo (#291)
RushiGong 33672bc
Autocas Docs (#261)
mmoerchen 99966d1
Add `merge_group` trigger to CI/CD workflows (#307)
ConradJohnston 34b9f4d
Improve robustness of Python CI/CD (#311)
v-georgen 520ab76
Bind _data_type_name for cpp data classes (#279)
puckvg 7cd3b0f
Fix minor issues (#317)
nabbelbabbel e88b4a4
Reorganize examples into new directory setups (#312)
rainli323 becc963
Add QDK-native QubitMapper (#255)
wavefunction91 b2b1c86
Add macOS wheels (#285)
v-georgen e8ce53d
QDK-Chemistry Insights: Usage Tracking (#271)
awoodwa 72f6d9d
PMC Docs (#260)
mmoerchen bccb157
Clarify Telemetry discussion forum instructions (#322)
sobolevnrm 1d85aa4
Add tests and overflow guards for factorial and binomial_coefficient …
Copilot 5998dc1
Better logging in active space selector algorithms (#319)
mmoerchen 82c74af
Move get_top_determinants, fix citations originating in cpp docs and …
nabbelbabbel 20727c1
MCSCF docs (#233)
mmoerchen 0770017
Add Schatten norm property to QubitHamiltonian (#320)
Copilot c447b1d
Basisset Docs (#257)
mmoerchen 04cd302
Docs: restructure `algorithm` classes `toctree` to match `data` class…
ConradJohnston 1af660d
Fix edge cases in single atom calculations (#315)
MarcoEckhoff 22a6b86
Add tests for example notebooks (#323)
nabbelbabbel 4433d44
Add changelog and wavefunction truncation helper (#328)
nabbelbabbel c4f5a7c
Add encoding metadata to prevent silent bugs from mixed fermion-to-qu…
Copilot 806e3a1
Refactor quantum phase estimation implementation (#310)
RushiGong f742d38
Update top level name in README.md (#330)
v-georgen 3ae7e4b
Bump qdk dependency version (#331)
RushiGong 9fe246b
Style 'AutoCAS' as 'autoCAS' in user-facing text (#334)
ConradJohnston 1817d87
ECPs in atom initial guess (#309)
mmoerchen 4ffc1d9
QDK/Chemistry v1.0.0 (#327)
wavefunction91 a11d660
Remove failing filter (#344)
nabbelbabbel 674af80
Enhance INSTALL.md with clearer installation steps (#341)
sobolevnrm ae53aa8
Add support for Python 3.10 (#343)
wavefunction91 65ac09c
QDK/Chemistry v1.0.1 (#345)
wavefunction91 a2641b2
Update plugins optional dependencies (#346)
RushiGong 1e32db6
Fix installation instructions for Ubuntu compatibility (#347)
Copilot d79e3db
More efficient CI/CD & Nightly Release Builds (#348)
v-georgen 843d65e
QDK/Chemistry 1.0.2 (#349)
wavefunction91 2ef4fad
Update iQPE example to match demo (#325)
sobolevnrm 8468d6a
Bump version to 1.0.2 and update changelog (#352)
ConradJohnston 3334c63
Add dedicated [jupyter] extra to `pip install` and update notebook (#…
ConradJohnston 51e3744
Limit pyscf version to <2.12.1 for ARM/Python 3.14 compatibility (#355)
ConradJohnston e2b7bb9
Prevent oscillations during ASCI refinement (#359)
MarcoEckhoff 5a41a7f
Add cholesky decomposition for ao2mo (#360)
mmoerchen 1f1a923
Add arXiv paper citation (#356)
ConradJohnston 1c80495
Raise MACIS sCI active-orbital limit from 127 to 255 (#362)
ConradJohnston e74d70c
Add Qdrift and partial scheme (#354)
nabbelbabbel ce2a791
Centralize version in single VERSION file (#353)
ConradJohnston bf8ce1b
Release Pipeline Hardening (#374)
v-georgen 57b2ef9
S1 entropies and mutual information in MACIS (#358)
mmoerchen c13f6a0
Add check for unrestricted orbitals in MACIS calculators (#369)
mmoerchen 0806acb
Add DIIS ROHF (#361)
f756ca5
Update trial wavefunction generation in sample script to use pmc calc…
RushiGong f470bf5
Add CI coefficients for CC/MP2 (#226)
nabbelbabbel e94c083
Add Path wrappers to Wavefunction Cpp bindings (#378)
nabbelbabbel c8ae754
Add accuracy-aware Trotter parameterization with unified commutator i…
Copilot e9f37e0
fixed vvhv bug by reimplementing proto_hv construction (#367)
3d1d436
Add `qdk-chemistry-data` companion repo references (#380)
ConradJohnston 8783fda
Add Model Hamiltonians (#373)
mmoerchen 557e28a
Remove year from LICENSE.txt (#387)
wavefunction91 e26ebd1
Replacing proto hv canonicalization by proper one-shot localization (…
d2888c1
Implement Q# circuit generation (#363)
RushiGong d2fdc1f
Internal Debug Symbol Publishing (#393)
v-georgen 84d85a7
Add logging and stability checks to Cholesky decomp (#399)
mmoerchen f9b7e17
Fix serialization in time evolution container (#394)
nabbelbabbel 18d0dea
Initial OpenFermion Plugin and Introduction of "Symmetries" Data Clas…
wavefunction91 748957e
2nd order Trotter and Corresponding Error Bounds (#384)
0b48ab7
Documentation Improvements + Python Installation QoL (#402)
wavefunction91 832835b
Add Ising and Heisenberg Hamiltonians (#401)
mmoerchen 2ed7e67
Make ERI threshold configurable (#403)
mmoerchen f8d7d44
Fix Active space MP2 orbital energies (#404)
rainli323 d9512cf
Add dimension check for inactive Fock when constructing Hamiltonian (…
rainli323 aebc932
Telemetry Sanitization (#398)
wavefunction91 f4a5ec1
Raise MACIS orbital limit to 2048 (#410)
ConradJohnston 318703c
Add Q# factory data support in Circuit (#397)
RushiGong 6353700
Arbitrary Order Trotter (#389)
ecd2c47
Fix SCF logging suppression and logger flush policy (#407)
ConradJohnston 2eaba5a
Minor documentation fixes (#413)
lorisercole 91c0a6d
Refactor energy estimator and update qiskit to an optional dependency…
RushiGong 3a0e748
Refactor High-Level Framing in the Documentation (#415)
wavefunction91 6913b48
PyPI: Development Releases (#414)
v-georgen aef4b46
Fix: Entropy Threshold for normalized entropies (#423)
mmoerchen 6fa6a8a
Original CI/CD Build Order (#425)
v-georgen 606974e
Update energy estimator to include commuting grouping (#426)
RushiGong 29042c2
Encapsulate `qsharp.estimate` into `Circuit` (#428)
wavefunction91 050128a
CI/CD hardening (#424)
nabbelbabbel bf554f9
Model Hamiltonian Docs (#411)
mmoerchen 290705e
Version 1.1 (#422)
wavefunction91 5df5f42
Support newer PyQIR versions (#436)
swernli fef12b7
Fix bug in ScfSolver for ROHF stability check (#433)
24c0aea
Store Cholesky MO integrals and save them in serialization (#440)
rainli323 372656f
Remove _to_fcidump_file method from Hamiltonian (#445)
nabbelbabbel 095aaa4
Fix int32 overflow in two-body integral and RDM indexing (#439)
ConradJohnston 43d8fc7
Add qubit loss support in QuantumErrorProfile and noise config suppor…
RushiGong f5434e2
Add tolerance configration to PySCF AVAS module (#442)
wavefunction91 6e3d611
Bugfix: Add ECP Contributions (#447)
wavefunction91 27e0f3a
Add dense solver path for MACIS CAS (#443)
wavefunction91 bf58de7
Bump dev version to 2.0.0 (#458)
wavefunction91 adf012b
Algorithm nesting update (#455)
nabbelbabbel 84ad809
Nightly rebuilds of Ubuntu 24.04 image use for runner pools (#460)
priyanshu6246 93c587e
Generalize `TimeEvolutionUnitary` and related builders to `Unitary` (…
YingrongChen a3ed603
Fix conflict between Orbital instance and the custom basis (#469)
d5e916d
Add Lattice Edge Coloring and Subsequent Trotter Optimizations (#467)
wavefunction91 8a70207
Fix Slow Tests (#472)
wavefunction91 33039d3
Include double-d-shell orbitals in valence space selection (#451)
ConradJohnston 52a1bdc
Migrating to HB120v3 + Switch to Ubuntu nightly image (#481)
priyanshu6246 8424c88
Fix python-wheels ADO pipeline to use internal artifact feed (#476)
lorisercole 833268f
Adding time-dependent Hamiltonian evolution (#431)
e447a6a
Support qdk 1.29 API migrations (#493)
RushiGong 618a34f
Replace Pyenv with Anaconda / ms-ensureconda in pip-wheels CI (#487)
wavefunction91 24a3972
Update CODEOWNERS to include @RushiGong (#494)
wavefunction91 43b9c55
Fix bug in stability checker (#491)
ef5d260
print available options for factory settings (#496)
rainli323 217da28
Refactor + Optimize Fermion-to-Qubit Infrastructure with MajoranaMapp…
wavefunction91 fa72c2c
Docs: Python Structure constructor wrong units (#501)
eimrek c67ad17
Enable slow CI test runs and fix identity-only energy-estimator workf…
Copilot 27c4c6c
CI/CG: switch to ms-ensureconda everywhere, fix CVE-flagged transitiv…
lorisercole 0be20b0
Fix requirement.txt for Py3.10 compatibility + slow test (#504)
lorisercole 3efb205
Separate QPE circuit builder with simulator (#471)
YingrongChen 80633d0
Add SymmetryBlockedTensor (#497)
wavefunction91 a56002f
Add target_accuracy/Campbell-bound auto-N to qDRIFT builder (#503)
feisuxiaozhu 6f2ea4a
Add deterministic content hashing and local caching for algorithms (#…
nabbelbabbel 1ea203b
fix 2RDM spin component order to `(aaaa, aabb, bbbb)` (#499)
eimrek 51a43b7
draft with exachem ducc integration and reference ducc implementation
58f0d1d
draft with exachem ducc integration and reference ducc implementation
8048acd
added up-to-doubly projection
0693c96
added up-to-doubly projection
70d8736
Temporarily disable PR coverage comment to unblock hackathon PRs (#531)
windowtothewest 5161fa0
Flatten Wavefunction Containers and Introduce Sector Lookup (#523)
wavefunction91 f520909
Specialized QubitMapper paths for sparse/factorized Hamiltonians (#47…
luffy-orf af6e587
Add qrev3 resource estimation in example notebook (#524)
YingrongChen 5177fb2
GH action to package examples zip with release (#537)
eimrek 5b79c52
Add qdk standard QPE circuit builder (#511)
RushiGong ef6c10c
Verstraete-Cirac mapping (#505)
nirajvenkat b053297
BCH order 0
a251a27
BCH order 0
03e0981
added reference ducc
5590fc2
added reference ducc
77fd910
Zassenhaus time evolution `HamiltonianUnitaryBuilder` (#526)
nirajvenkat cb55f8e
Docs: switch default example tab from C++ to Python (#546)
eimrek 83ba2c6
Add Hadamard test algorithm (#405)
783d546
Optimize ASCI workflow (#464)
e2502cf
Add block encoding algorithm (#468)
YingrongChen 4040dee
Add Windows build support with MSVC/clang-cl and vcpkg (#450)
lorisercole 5311e06
Temporarily disable Py3.10 in CI/CD (#538)
YingrongChen 7c46fb3
CI/CD improvements (#547)
lorisercole 55a42a7
Add MO visualization widget's occupations and entropies to `qpe_stret…
cb67d0d
Add ROHF GDM (#453)
BoqinZhang 7e592a8
Docs: replace xyz files with xyz strings (#545)
eimrek af9ba3f
Adding `EulerEvolutionCircuitBuilder`, refactoring `EulerIntegrator`,…
0e50366
Add natural orbital localizer (#456)
mmoerchen 99830d7
Add Windows CI/CD (#552)
wavefunction91 e516f02
Update EsrpRelease task to v12 with required PyPI inputs (#557)
lorisercole 265d640
Merge remote-tracking branch 'origin/main' into feature/agamshayit/du…
7fe14d5
Merge remote-tracking branch 'origin/main' into feature/agamshayit/du…
cf773cc
Merge origin/main into feature/agamshayit/ducc_sequant
6a2a671
Merge remote-tracking branch 'origin/feature/agamshayit/ducc_sequant'…
76b6b8d
bigfix basis mapping to exachem
5d9ec67
added test file
dbf6a82
added comments to ducc wicked file
ff6ab29
started spin-traced ducc
3b770e1
WIP: spin-integrated DUCC (wicked_ducc_si) - level 0 works, levels 1,…
a344833
spin-blocked ducc
7472cd9
active-space only assembly
d4e4d23
4-space implemetation
ec4f002
skippin inactive blocks and 0 Ts in 4-space
803d917
started ambit implementation
agamshayit-ms 9db5d3b
Feed exachem the basis set file used by qdk-chemistry, eliminating AO…
agamshayit-ms 6d14bde
add ducc level 3, add assemble_active_hamiltonian to handle orbital m…
agamshayit-ms 5bbfc76
started adding support for open-shell
agamshayit-ms eaaf75f
open-shell with ambit
agamshayit-ms 88a5c6e
cleanup
agamshayit-ms 144f653
cleanup
agamshayit-ms 2affadd
openfermion 2e-ints 8-fold symmetry bugfix
agamshayit-ms 99e841b
plumbing, sequant+btas in cmake
agamshayit-ms 7b0ac1a
working end-to-end sequant+btas SO implementation
agamshayit-ms 79d851f
ducc with BTAS codegen
agamshayit-ms d64d8c1
Merge remote-tracking branch 'origin/main' into feature/agamshayit/du…
agamshayit-ms c9c3ec4
changed test API
agamshayit-ms 04c3e00
fixing BTAS cmake
agamshayit-ms 3f38b8e
better fix for BTAS cmake
agamshayit-ms 9350b59
Merge branch 'main' into feature/agamshayit/ducc_prototype
agamshayit-ms a9e3f2c
fixing Windows build
agamshayit-ms fd8dfec
fixing Windows build
agamshayit-ms ebedd21
Merge branch 'main' into feature/agamshayit/ducc_prototype
agamshayit-ms 25093e9
fixing Windows build
agamshayit-ms 561d345
Fixing Windows build
agamshayit-ms d9aff5a
retired depricated functions
agamshayit-ms 0c368c9
adding boost random to vcpkg
agamshayit-ms 928baea
fixing Windows build
agamshayit-ms b4bee38
fixing Windows build
agamshayit-ms b803343
add hardcoded reference values to test
agamshayit-ms c12b707
fixing Windows build
agamshayit-ms 14becc3
Merge branch 'main' into feature/agamshayit/ducc_prototype
agamshayit-ms ba9bd5f
enabling windows C++ tests
agamshayit-ms 65dad41
spin-blocked ducc implementation
agamshayit-ms 7ec90cb
using sequants native spin-blocking
agamshayit-ms d4077ef
Merge branch 'main' into feature/agamshayit/ducc_prototype
agamshayit-ms 3e85ff0
fixing default effective hamiltonian algorithm
agamshayit-ms 7a345d9
copilot comments
agamshayit-ms b527488
Potential fix for pull request finding
agamshayit-ms 0f6619b
pre-commit
agamshayit-ms def8cc1
fixed test message
agamshayit-ms 5c34704
Merge branch 'main' into feature/agamshayit/ducc_prototype
agamshayit-ms f1c14d6
Merge origin/main into feature/agamshayit/ducc_prototype
agamshayit-ms 63b0a69
fixing docs
agamshayit-ms c37d7ac
Merge branch 'main' into feature/agamshayit/ducc_prototype
agamshayit-ms 0c6bede
cleanup
agamshayit-ms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 117 additions & 0 deletions
117
cpp/include/qdk/chemistry/algorithms/effective_hamiltonian.hpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. See LICENSE.txt in the project root for | ||
| // license information. | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <memory> | ||
| #include <qdk/chemistry/algorithms/algorithm.hpp> | ||
| #include <qdk/chemistry/data/hamiltonian.hpp> | ||
| #include <qdk/chemistry/data/symmetry/symmetry_blocked_index_set.hpp> | ||
| #include <qdk/chemistry/data/wavefunction.hpp> | ||
| #include <string> | ||
|
|
||
| namespace qdk::chemistry::algorithms { | ||
|
|
||
| /** | ||
| * @class EffectiveHamiltonianConstructor | ||
| * @brief Abstract base for constructing an effective Hamiltonian. | ||
| * | ||
| * Given a reference wavefunction and an input Hamiltonian, a concrete | ||
| * implementation constructs an effective Hamiltonian in an explicitly | ||
| * specified target P-space. | ||
| * | ||
| * Typical usage: | ||
| * @code | ||
| * auto constructor = | ||
| * EffectiveHamiltonianConstructorFactory::create("algorithm_name"); | ||
| * auto effective_hamiltonian = | ||
| * constructor->run(reference, hamiltonian, p_indices); | ||
| * @endcode | ||
| * | ||
| * @see EffectiveHamiltonianConstructorFactory for creating instances | ||
| * @see data::Wavefunction for the reference wavefunction input | ||
| * @see data::Hamiltonian for the input and output Hamiltonians | ||
| * @see data::SymmetryBlockedIndexSet for the target P-space indices | ||
| */ | ||
| class EffectiveHamiltonianConstructor | ||
| : public Algorithm<EffectiveHamiltonianConstructor, | ||
| std::shared_ptr<data::Hamiltonian>, | ||
| std::shared_ptr<data::Wavefunction>, | ||
| std::shared_ptr<data::Hamiltonian>, | ||
| std::shared_ptr<const data::SymmetryBlockedIndexSet>> { | ||
| public: | ||
| /** | ||
| * @brief Default constructor. | ||
| */ | ||
| EffectiveHamiltonianConstructor() = default; | ||
|
|
||
| /** | ||
| * @brief Virtual destructor. | ||
| */ | ||
| virtual ~EffectiveHamiltonianConstructor() = default; | ||
|
|
||
| /** | ||
| * @brief Construct the effective Hamiltonian acting on the target space P. | ||
| * | ||
| * \cond DOXYGEN_SUPRESS (Doxygen warning suppression for argument packs) | ||
|
agamshayit-ms marked this conversation as resolved.
|
||
| * @param reference Reference wavefunction providing the reference state. | ||
| * @param hamiltonian Input Hamiltonian built over the whole window W = P u Q. | ||
| * @param p_indices The target space P (indices into the window's active | ||
| * space W). | ||
| * \endcond | ||
| * @return The effective Hamiltonian acting on the target space P. | ||
| * @throws qdk::chemistry::data::SettingsAreLocked if attempting to modify | ||
| * settings after run() is called. | ||
| * @note Settings are automatically locked when this method is called and | ||
| * cannot be modified during or after execution. | ||
| */ | ||
| using Algorithm::run; | ||
|
|
||
| /** | ||
| * @brief Access the algorithm's name. | ||
| */ | ||
| virtual std::string name() const override = 0; | ||
|
|
||
| /** | ||
| * @brief Access the algorithm's type name. | ||
| */ | ||
| std::string type_name() const override { | ||
| return "effective_hamiltonian_constructor"; | ||
| } | ||
|
|
||
| protected: | ||
| /** | ||
| * @brief Implementation of the effective-Hamiltonian construction. | ||
| * | ||
| * Contains the actual construction logic. It is automatically called by | ||
| * run() after settings have been locked, and must be implemented by derived | ||
| * classes. | ||
| * | ||
| * @param reference Reference wavefunction providing the reference state. | ||
| * @param hamiltonian Input Hamiltonian built over the whole window W = P u Q. | ||
| * @param p_indices The target space P (indices into the window's active | ||
| * space W). | ||
| * @return The effective Hamiltonian acting on the target space P. | ||
| */ | ||
| virtual std::shared_ptr<data::Hamiltonian> _run_impl( | ||
| std::shared_ptr<data::Wavefunction> reference, | ||
| std::shared_ptr<data::Hamiltonian> hamiltonian, | ||
| std::shared_ptr<const data::SymmetryBlockedIndexSet> p_indices) | ||
| const override = 0; | ||
| }; | ||
|
|
||
| /** | ||
| * @brief Factory for effective-Hamiltonian constructor instances. | ||
| */ | ||
| struct EffectiveHamiltonianConstructorFactory | ||
| : public AlgorithmFactory<EffectiveHamiltonianConstructor, | ||
| EffectiveHamiltonianConstructorFactory> { | ||
| static std::string algorithm_type_name() { | ||
| return "effective_hamiltonian_constructor"; | ||
| } | ||
| static void register_default_instances(); | ||
| static std::string default_algorithm_name() { return "ducc"; } | ||
| }; | ||
|
|
||
| } // namespace qdk::chemistry::algorithms | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
cpp/src/qdk/chemistry/algorithms/effective_hamiltonian.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. See LICENSE.txt in the project root for | ||
| // license information. | ||
|
|
||
| #include <qdk/chemistry/algorithms/effective_hamiltonian.hpp> | ||
| #include <qdk/chemistry/utils/logger.hpp> | ||
|
|
||
| #include "microsoft/ducc/ducc.hpp" | ||
|
|
||
| namespace qdk::chemistry::algorithms { | ||
|
|
||
| /** | ||
| * @brief Factory function to create the BTAS DUCC solver. | ||
| */ | ||
| std::unique_ptr<EffectiveHamiltonianConstructor> make_ducc_solver() { | ||
| QDK_LOG_TRACE_ENTERING(); | ||
| return std::make_unique<qdk::chemistry::algorithms::microsoft::DuccSolver>(); | ||
| } | ||
|
|
||
| /** | ||
| * @brief Register default effective-Hamiltonian implementations. | ||
| */ | ||
| void EffectiveHamiltonianConstructorFactory::register_default_instances() { | ||
| QDK_LOG_TRACE_ENTERING(); | ||
| EffectiveHamiltonianConstructorFactory::register_instance(make_ducc_solver); | ||
| } | ||
|
|
||
| } // namespace qdk::chemistry::algorithms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.