Skip to content

AsyCost doesn't work for generalized index spaces #306

@Krzmbrzl

Description

@Krzmbrzl

As can be seen in

///
/// Represents a symbolic asymptotic cost in terms of active_occupied
/// and the rest orbitals.
/// eg.
/// - AsyCost{2,4} implies scaling of $O^2V^4$. In other words, the cost
/// scales by the second power in the number of active_occupied orbitals
/// and the fourth power in the number of the rest orbitals.
/// - AsyCost{sequant::rational{1,2}, 2, 4} implies the same scaling as
/// above except the numeric value obtained by substituting $O$ and $V$
/// numbers is then halved.
///
class AsyCost {
private:
class AsyCostEntry {
size_t occ_; // power of active_occupied
size_t virt_; // power of the rest orbitals

the AsyCost class is hardcoded to work for exactly two index spaces that can be categorized into occupied and virtual.

This model breaks down in multireference theories where expressions will involve at least a third index space (active). And for more general cases (e.g. mixing of fermionic and bosonic vector spaces) this will obviously fail as well.

To be more general, the class should eventually be refactored to use a map<IndexSpace, std::size_t> instead of explicit member variables for every space.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions