Quantum 3xplorer (Q3)
An AI-native quantum simulation engine
Loading...
Searching...
No Matches
q3::UltrasoftPseudopotentialOverlapOperator Class Reference

#include <init.hpp>

+ Inheritance diagram for q3::UltrasoftPseudopotentialOverlapOperator:

Public Member Functions

void apply (int number_of_plane_waves, const Complex *wavefunction, Complex *overlap_wavefunction) const override
 
void apply_batch (int number_of_plane_waves, int number_of_vectors, const Complex *wavefunctions, Complex *overlap_wavefunctions) const override
 
void build_dense_matrix (int number_of_plane_waves, std::vector< Complex > &overlap_matrix) const override
 
bool is_identity () const override
 
 PseudopotentialOverlapOperator (const Crystal &crystal_structure, const NormConservingPlanewaveKohnShamQuantumSystem &quantum_system, const Matrix< Complex > &kleinman_bylander_potential, const execution::ExecutionPolicy &execution_policy)
 
- Public Member Functions inherited from q3::PseudopotentialOverlapOperator
 PseudopotentialOverlapOperator (const Crystal &crystal_structure, const NormConservingPlanewaveKohnShamQuantumSystem &quantum_system, const Matrix< Complex > &kleinman_bylander_potential, const execution::ExecutionPolicy &execution_policy)
 
- Public Member Functions inherited from q3::OverlapOperator
virtual ~OverlapOperator ()=default
 

Additional Inherited Members

- Protected Attributes inherited from q3::PseudopotentialOverlapOperator
const Crystal & crystal_structure_
 
const execution::ExecutionPolicy & execution_policy_
 
const Matrix< Complex > & kleinman_bylander_potential_
 
const NormConservingPlanewaveKohnShamQuantumSystem & quantum_system_
 

Detailed Description

Definition at line 26 of file init.hpp.

Member Function Documentation

◆ apply()

void q3::UltrasoftPseudopotentialOverlapOperator::apply ( int  number_of_plane_waves,
const Complex *  wavefunction,
Complex *  overlap_wavefunction 
) const
inlineoverridevirtual

◆ apply_batch()

void q3::UltrasoftPseudopotentialOverlapOperator::apply_batch ( int  number_of_plane_waves,
int  number_of_vectors,
const Complex *  wavefunctions,
Complex *  overlap_wavefunctions 
) const
inlineoverridevirtual

Efficient batched S|ψ⟩ for ultrasoft pseudopotentials.

Uses zgemm for computing all <β|ψ> projections across all vectors at once, then applies the q-matrix and adds back via zgemm.

Step 1: Compute all projections projector_overlaps(total_projectors, number_of_vectors) = β^H × ψ

G = 0 correction: the origin is removed from the double count on the rank whose plane-wave list begins with it, and nowhere else.

Step 2: Apply q-matrix: projector_overlaps_with_q_matrix(i, vec) = Σ_j q_ij * projector_overlaps(j, vec)

Reimplemented from q3::OverlapOperator.

Definition at line 176 of file init.hpp.

References q3::PlanewaveKohnShamQuantumSystem::basis(), q3::Matrix< T >::data(), q3::blas::dgemm_(), q3::PseudopotentialOverlapOperator::execution_policy_, q3::PlanewaveBasis::gamma_origin_is_local(), q3::PlanewaveBasis::is_gamma_only(), q3::PseudopotentialOverlapOperator::kleinman_bylander_potential_, q3::PseudopotentialOverlapOperator::quantum_system_, q3::execution::ExecutionPolicy::reduce_within_group(), q3::Matrix< T >::rows(), and q3::blas::zgemm_().

◆ build_dense_matrix()

void q3::UltrasoftPseudopotentialOverlapOperator::build_dense_matrix ( int  number_of_plane_waves,
std::vector< Complex > &  overlap_matrix 
) const
inlineoverridevirtual

◆ is_identity()

bool q3::UltrasoftPseudopotentialOverlapOperator::is_identity ( ) const
inlineoverridevirtual

Returns true if S = I (norm-conserving case). When true, Davidson can skip S·ψ ZGEMM and S_sub construction.

Reimplemented from q3::PseudopotentialOverlapOperator.

Definition at line 30 of file init.hpp.

◆ PseudopotentialOverlapOperator()

q3::PseudopotentialOverlapOperator::PseudopotentialOverlapOperator ( const Crystal &  crystal_structure,
const NormConservingPlanewaveKohnShamQuantumSystem &  quantum_system,
const Matrix< Complex > &  kleinman_bylander_potential,
const execution::ExecutionPolicy &  execution_policy 
)
inline

Definition at line 30 of file init.hpp.


The documentation for this class was generated from the following file: