|
Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
|
#include <base.hpp>
Inheritance diagram for q3::Flavor:Public Member Functions | |
| virtual | ~Flavor ()=default |
| generated::Results | run (const InputData &input) |
Protected Member Functions | |
| virtual generated::Results | run_calculation (const InputData &input)=0 |
|
virtualdefault |
|
inline |
Execute the calculation described by the input and return results, stamped with the provenance of the run that produced them, the material it ran on, and the band edges and gap its eigenvalues give.
Not virtual, and the reason is the stamp. Provenance attached at the call sites instead would mean every present and future caller had to remember to attach it, and the one that forgot would emit a results file indistinguishable from an unattributable one. Here it is structural: a flavor cannot run without being attributed.
Re-reading the pseudopotential files to identify them costs milliseconds against a calculation that has already finished, which is the right trade for a subclass never having to carry provenance plumbing of its own.
Definition at line 37 of file base.hpp.
References q3::add_band_edge_records(), q3::build_material_json(), q3::build_provenance_json(), and run_calculation().
|
protectedpure virtual |
Execute the calculation described by the input and return results.
Implementations must be self-contained: they set up, run, and finalize the calculation entirely. The caller receives fully-populated results, minus what run() adds.
Implemented in q3::NonSelfConsistentFieldFlavor, q3::SelfConsistentFieldFlavor, and q3::VerificationFlavor.
Referenced by run().