circkit.const_manager¶
- class circkit.const_manager.ArithmeticConstManager(circuit)¶
Bases:
ConstManagerGeneric manager for arithmetic constants. Should cover most cases, including SageMath’s Zmod, GF(p), GF(q)
- For validation:
the input value should be of type int or .parent() should return the base_ring
- For conversion:
int -> const tries base_ring.fetch_int(int), otherwise base_ring(int)
const -> int tries base_ring.integer_representation(int), otherwise int(const)
- __init__(circuit)¶
- create(value)¶
Create a constant of unified type from value of possibly various types
Default implementation: no checks, no conversion
- output(value)¶
Convert a constant of unified type to simple representation (e.g. int or string?) AU: maybe have different output formats?
Default implementation: no conversion
- class circkit.const_manager.BooleanConstManager(circuit)¶
Bases:
ConstManagerSimple Boolean constant manager (0 or 1 only).
- __init__(circuit)¶
- create(value)¶
Create a constant of unified type from value of possibly various types
Default implementation: no checks, no conversion
- output(value)¶
Convert a constant of unified type to simple representation (e.g. int or string?) AU: maybe have different output formats?
Default implementation: no conversion