QuEraComputing / bloqade-python

QuEra's Neutral Atom SDK for Analog QPUs
https://bloqade.quera.com/
Other
54 stars 14 forks source link

Visitor Pattern for Bokeh plots. #672

Open weinbe58 opened 11 months ago

weinbe58 commented 11 months ago

Currently the Bokeh plots is a bit hard to understand because of the fragmented functions that are used. I think using the visitor framework should help clean this up a bit and make it easier to inject Bokeh as an optional dependency.

kaihsin commented 11 months ago

Need to take a look on this design.

Sometimes you need to share tools between different plot objects (for example sync crosshair between timeline channels you need to pass the tools around, or sync data between register and pulse channels... etc)

weinbe58 commented 11 months ago

Sometimes you need to share tools between different plot objects (for example sync crosshair between timeline channels you need to pass the tools around, or sync data between register and pulse channels... etc)

I think using a visitor should be ideal for that because you can set it as an attribute of the visitor, then reference it when you need to.

kaihsin commented 11 months ago

Yeah, we can try to do visitor way and see how it goes.