Core Algorithms
AutoTight
AutoTemplate
- class popcor.AutoTemplate(lifter: StateLifter)[source]
Class to incrementally learn and augment constraint templates until we reach tightness.
- apply(lifter: StateLifter, use_known: bool = False) list [source]
Apply the learned templates to a new lifter.
- run(use_known: bool = True, use_incremental: bool = False, variable_list: list[list[str]] | None = None, verbose: bool = False, plot: bool = False)[source]
Run the template learning algorithm until we reach tightness, or run out of variables to add.
- Parameters:
use_known – whether to use the known constraints of the lfiter (must have get_A_known).
use_incremental – whether to keep adding the learned tempaltes to the set of known constraints, to enforce we find orthogonal ones.
variable_list – list of lists of variables to consider. If not given, will use the VARIABLE_LIST parameter of the lifter class.