Skip to content

ot handling in lattice + composition #146

@daknuett

Description

@daknuett

This is an issue to track progress of the new ot handling when composing lattices using +.

Current Status

  • g.core.expr.factor_unary is ignored by + [1]
  • Adding g.singlet lattices to int, float, complex is not supported [2]
  • Automatic or explicit embedding or projection is not supported.

Possible solutions

  • Add addition lookup table to ot_base similar to multiplication lookup table.
    • Some automatic embedding can be done, particularly complex to ot_singlet lattice.
    • Automatic embedding / projection appears dangerous.
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions