Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
init.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * InterpolationExporter — abstract interface for writing an
5 * InterpolationRecord in an external code's format.
6 *
7 * The native record (`<prefix>.save/interpolation.q3ip`, checkpoint.hpp) is
8 * what Q3 itself reads back. An export is for another program: today the
9 * Wannier90 file set, so `wannier90.x` can localize what Q3 built and the
10 * tools built on Wannier90 can consume it; other tight-binding and
11 * interpolation front ends are the natural future additions. Concrete
12 * formats implement this interface and are selected by name through
13 * create_interpolation_exporter() (factory.hpp), so the code that writes a
14 * record never branches on the format -- "none" resolves to the Null
15 * exporter, a silent no-op. Same shape as io/mean_field_export/init.hpp,
16 * for the same reason.
17 */
18
19#include <string>
20
22
23namespace q3 {
24
26 public:
27 virtual ~InterpolationExporter() = default;
28
29 /**
30 * Write this format's files for `record` as `<directory>/<prefix>.*`.
31 * A no-op for the Null exporter.
32 */
33 virtual void export_to_directory(const InterpolationRecord& record,
34 const std::string& directory,
35 const std::string& prefix) const = 0;
36
37 /// Format name as accepted by the input ("none", "wannier90", ...).
38 [[nodiscard]] virtual std::string name() const = 0;
39};
40
41} // namespace q3
virtual ~InterpolationExporter()=default
virtual std::string name() const =0
Format name as accepted by the input ("none", "wannier90", ...).
virtual void export_to_directory(const InterpolationRecord &record, const std::string &directory, const std::string &prefix) const =0