You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The optimize_pulse API takes in a lot of optional arguments. Wouldn't it make more sense to use a builder pattern to define a control problem in a ControlProblem class?
The text was updated successfully, but these errors were encountered:
Hi, I was reading about builder patterns and came across this discussion which seems to suggest that builder patterns are not necessarily needed in Python. Instead, all the functions could probably be bundled into a single PulseOptimizer class and whatever the wrapper functions are doing right now can be methods of this class. The input arguments can be initialised in the init of this class. This you could have something like
I would agree with what @quantshah had said. Builder patterns are useful in those languages like Java, where named parameters is not in-built. All functions bundled into a single class would be better alternative. This would help when adding new methods that differs in optimization algorithm to the class.
The
optimize_pulse
API takes in a lot of optional arguments. Wouldn't it make more sense to use a builder pattern to define a control problem in aControlProblem
class?The text was updated successfully, but these errors were encountered: