gpt
gpt copied to clipboard
`ot` handling in lattice `+` composition
This is an issue to track progress of the new ot handling when composing lattices using +.
Current Status
- [ ]
g.core.expr.factor_unaryis ignored by+[1] - [ ] Adding
g.singletlattices toint,float,complexis not supported [2] - [ ] Automatic or explicit embedding or projection is not supported.
Possible solutions
- Add addition lookup table to
ot_basesimilar to multiplication lookup table.- Some automatic embedding can be done, particularly
complextoot_singletlattice. - Automatic embedding / projection appears dangerous.
- Some automatic embedding can be done, particularly
- Add explicit casting functions that allow for explicit embedding / projection
- This may catch some mistakes by the user.
Notes
[1] g.core.expr.factor_unary: Reproduce as such:
grid = g.grid([8,8,8,16], g.double)
v = g.vspincolor(grid)
g(g.adj(v) + v) # lattice(ot_vector_spin_color(4,3),double)
g((g.adj(v) + v) * v) # GPT : xx.xx s : Missing entry in multiplication table: ot_vector_spin_color(4,3) x ot_vector_spin_color(4,3)
g(g.adj(g.adj(v) + v) * v) # GPT : xx.xx s : Missing entry in multiplication table: ot_vector_spin_color(4,3) x ot_vector_spin_color(4,3)
g(g.adj(g(g.adj(v) + v)) * v) # lattice(ot_singlet,double)
[2]
g(g.singlet(grid) + 2.0j) # ERR: Assert term.factors.size() > 0 failed in file lib/eval.cc:199