Safe Haskell | None |
---|---|
Language | Haskell2010 |
Interfaces for "gadgets," decomposition, and error correction.
Documentation
class Ring u => Gadget gad u where Source
Gadget vectors, parameterized by an index type.
gadget :: Tagged gad [u] Source
The gadget vector over u
.
encode :: u -> Tagged gad [u] Source
Yield an error-tolerant encoding of an element with respect to the gadget. (Mathematically, this should just be the product of the input with the gadget, but it is a class method to allow for optimized implementations.)
(Gadget k gad a, Gadget k gad b) => Gadget k gad (a, b) Source | |
(ReflectsTI k q z, Additive z) => Gadget * TrivGad (ZqBasic k q z) Source | |
(Gadget k gad zq, Fact m, CElt t zq) => Gadget k gad (Cyc t m zq) Source | |
(ReflectsTI k1 q z, RealIntegral z, Reflects k b z) => Gadget * (BaseBGad k b) (ZqBasic k q z) Source |
class (Gadget gad u, Reduce (DecompOf u) u) => Decompose gad u where Source
Decomposition relative to a gadget.
(Decompose k gad a, Decompose k gad b, (~) * (DecompOf a) (DecompOf b)) => Decompose k gad (a, b) Source | |
(ReflectsTI k q z, Ring z) => Decompose * TrivGad (ZqBasic k q z) Source | |
(Decompose k gad zq, Fact m, CElt t zq, CElt t (DecompOf zq)) => Decompose k gad (Cyc t m zq) Source | |
(ReflectsTI k1 q z, Ring z, ZeroTestable z, Reflects k b z) => Decompose * (BaseBGad k b) (ZqBasic k q z) Source |
class Gadget gad u => Correct gad u where Source
Error correction relative to a gadget.
correct :: Tagged gad [u] -> (u, [LiftOf u]) Source
Error-correct a "noisy" encoding of an element (see encode
),
returning the encoded element and the error vector.
(Correct k gad a, Correct k gad b, Mod a, Mod b, Field a, Field b, Lift' a, Lift' b, ToInteger (LiftOf a), ToInteger (LiftOf b)) => Correct k gad (a, b) Source | |
(ReflectsTI k q z, Ring z) => Correct * TrivGad (ZqBasic k q z) Source | |
(Correct k gad zq, Fact m, CElt t zq) => Correct k gad (Cyc t m zq) Source | |
(ReflectsTI k1 q z, Ring z, Reflects k b z) => Correct * (BaseBGad k b) (ZqBasic k q z) Source |
Dummy type representing the gadget [1]
.
Dummy type representing the gadget [1,b,b^2,...]
.
(ReflectsTI k1 q z, Ring z, Reflects k b z) => Correct * (BaseBGad k b) (ZqBasic k q z) Source | |
(ReflectsTI k1 q z, Ring z, ZeroTestable z, Reflects k b z) => Decompose * (BaseBGad k b) (ZqBasic k q z) Source | |
(ReflectsTI k1 q z, RealIntegral z, Reflects k b z) => Gadget * (BaseBGad k b) (ZqBasic k q z) Source |