call_cbloq_classically#
View source on GitHub
|
Propagate on_classical_vals calls through a composite bloq’s contents.
qualtran.simulation.classical_sim.call_cbloq_classically(
signature: qualtran.Signature,
vals: Mapping[str, Union[sympy.Symbol, ClassicalValT]],
binst_graph: nx.DiGraph,
random_handler: '_ClassicalValHandler' = _RandomClassicalValHandler(rng=np.random.default_rng())
) -> Tuple[Dict[str, ClassicalValT], Dict[Soquet, ClassicalValT]]
While we’re handling the plumbing, we also do error checking on the arguments; see
_update_assign_from_vals.
Args
signatureThe cbloq’s signature for validating inputs
valsMapping from register name to classical values
binst_graphThe cbloq’s binst graph.
random_handlerThe classical random number handler to use for use in measurement-based outcomes (e.g. MBUC).
View source on GitHub