active_space_for_ctrl_spec#
View source on GitHub
|
Returns the “active” subspace corresponding to signature and ctrl_spec.
qualtran.simulation.tensor.active_space_for_ctrl_spec(
signature: qualtran.Signature,
ctrl_spec: qualtran.CtrlSpec
) -> Tuple[Union[int, slice], ...]
Assumes first n-registers for signature are control registers corresponding to ctrl_spec.
Returns a tuple of indices/slices that can be used to address into the ndarray, representing
tensor data of shape tensor_shape_from_signature(signature), and access the active subspace.
View source on GitHub