make_ctrl_system_with_correct_metabloq#
View source on GitHub
|
The default fallback for `Bloq.make_ctrl_system.
qualtran.make_ctrl_system_with_correct_metabloq(
bloq: 'Bloq', ctrl_spec: 'CtrlSpec'
) -> Tuple['_ControlledBase', 'AddControlledT']
This intelligently selects the correct implemetation of _ControlledBase based
on the control spec.
A 1-qubit, positive control (i.e.
CtrlSpec()) usesControlled, which uses a “total control” decomposition.Complex quantum controls (i.e.
CtrlSpec(...)with quantum data types) usesControlledViaAnd, which computes the activation function once and re-uses it for each subbloq in the decomposition ofbloq.
View source on GitHub