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
bloq.controlled() gives a controlled version of a Bloq with a single control wire added. Another very common use-case is to construct a controlled version of a Bloq with n controls. Right now, the way to achieve that is bloq.controlled(CtrlSpec(cvs=[1]*num_controls)).
This feature request is to make the latter use case less verbose for users. For example, maybe bloq.controlled(num_controls) or, at the very least, something like bloq.controlled(CtrlSpec(num_controls=num_controls))
tanujkhattar
changed the title
Make it easier to construct multi-controlled Bloqs.
Make it less verbose to construct multi-controlled Bloqs.
Feb 27, 2024
Yes, I think having a variant of CtrlSpec that supports just a number of controls would be a good extension. Whether we should provide syntactic sugar via the Bloq.controlled() method is up for debate. I'd say start with no sugar, and evaluate whether to add it in later.
bloq.controlled()
gives a controlled version of a Bloq with a single control wire added. Another very common use-case is to construct a controlled version of a Bloq withn
controls. Right now, the way to achieve that isbloq.controlled(CtrlSpec(cvs=[1]*num_controls))
.This feature request is to make the latter use case less verbose for users. For example, maybe
bloq.controlled(num_controls)
or, at the very least, something likebloq.controlled(CtrlSpec(num_controls=num_controls))
cc @mpharrigan
The text was updated successfully, but these errors were encountered: