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
* QuantumSystemExecutionPolicy — introduces band semantics on top of the
5
* representation-agnostic ExecutionPolicy.
6
*
7
* Layer 0 provides collective operations over an anonymous process group; it
8
* deliberately knows nothing about bands, k-points, or any physical basis.
9
* This interface fixes the meaning of that group at the quantum-system level:
10
* a *band group* is the set of processes that diagonalize the same quantum
11
* states together, sharing the work of one diagonalization. The layer-0
12
* process group IS the band group — dot_product, norm, reduce_within_group,
13
* and the group broadcast/allgather primitives all operate over it.
14
*
15
* Representation-specific topology (e.g. k-point pools and G-vector slab
16
* distribution in the planewave representation) is layered on further down,
17
* in layer_4_computation/iterator/kohn_sham/planewave/execution/init.hpp.
18
*
19
* No MPI headers — the band accessors are thin, band-named views of the
20
* layer-0 group topology.
21
*/
22
23
#include "
layer_0_core/execution/init.hpp
"
24
25
namespace
q3
{
26
namespace
execution {
27
28
class
QuantumSystemExecutionPolicy
:
public
virtual
ExecutionPolicy
{
29
public
:
30
~QuantumSystemExecutionPolicy
()
override
=
default
;
31
32
/**
33
* Number of processes collaborating within this band group.
34
*
35
* 1 means each process diagonalizes its quantum states alone (no band
36
* parallelism); >1 means the diagonalization work of each quantum state
37
* is shared across the group.
38
*/
39
int
band_size
()
const
{
40
return
group_size
();
41
}
42
43
/**
44
* Index of this process within its band group (0 = band root).
45
*/
46
int
band_rank_index
()
const
{
47
return
group_rank_index
();
48
}
49
};
50
51
}
// namespace execution
52
}
// namespace q3
q3::execution::ExecutionPolicy
Definition
init.hpp:85
q3::execution::ExecutionPolicy::group_size
virtual int group_size() const =0
q3::execution::ExecutionPolicy::group_rank_index
virtual int group_rank_index() const =0
q3::execution::QuantumSystemExecutionPolicy
Definition
init.hpp:28
q3::execution::QuantumSystemExecutionPolicy::band_size
int band_size() const
Definition
init.hpp:39
q3::execution::QuantumSystemExecutionPolicy::~QuantumSystemExecutionPolicy
~QuantumSystemExecutionPolicy() override=default
q3::execution::QuantumSystemExecutionPolicy::band_rank_index
int band_rank_index() const
Definition
init.hpp:46
init.hpp
q3
Definition
q3_core_api.hpp:33
src
layer_2_quantum_system
execution
init.hpp
Generated by
1.9.8