Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
version.hpp
Go to the documentation of this file.
1#pragma once
2
3/**
4 * Q3's own build identity, for the provenance block of a results file.
5 *
6 * The commit comes from q3_git_commit.h, which the build regenerates on every
7 * compile (cmake/write_git_commit_header.cmake) rather than capturing once when
8 * cmake last ran. A captured value goes stale the moment anything is committed
9 * afterwards, and a provenance record that confidently names the wrong source
10 * is worse than one that admits it does not know: the first is
11 * indistinguishable from a real answer, the second is not. For the same reason
12 * the generator reports nothing for a dirty worktree, which is not the commit
13 * it sits on, and nothing when there is no repository to ask.
14 *
15 * The version string is the release identity and tracks the one declared in
16 * pyproject.toml; they are checked against each other by a unit test, because
17 * two version strings that drift apart are worse than one.
18 */
19
20#if __has_include(<q3_git_commit.h>)
21#include <q3_git_commit.h>
22#endif
23
24namespace q3 {
25
26inline constexpr const char* version = "0.1.0";
27
28#ifdef Q3_GIT_COMMIT
29inline constexpr const char* commit = Q3_GIT_COMMIT;
30#else
31inline constexpr const char* commit = "";
32#endif
33
34/// The BLAS/LAPACK libraries this build links, as CMake found them; empty if unknown.
35#ifdef Q3_LINEAR_ALGEBRA_LIBRARIES
36inline constexpr const char* linear_algebra_libraries = Q3_LINEAR_ALGEBRA_LIBRARIES;
37#else
38inline constexpr const char* linear_algebra_libraries = "";
39#endif
40
41} // namespace q3
constexpr const char * commit
Definition version.hpp:31
constexpr const char * version
Definition version.hpp:26
constexpr const char * linear_algebra_libraries
The BLAS/LAPACK libraries this build links, as CMake found them; empty if unknown.
Definition version.hpp:38