Get an iterable over all identifiers are captured by this circuit scope from a containing scope. This excludes input variables (see :meth:`iter_input_vars`) and locally declared variables and stretches (see :meth:`iter_declared_vars` and :meth:`iter_declared_stretches`).
(self)
| 2711 | return self._data.get_input_vars() |
| 2712 | |
| 2713 | def iter_captures(self) -> typing.Iterable[expr.Var | expr.Stretch]: |
| 2714 | """Get an iterable over all identifiers are captured by this circuit scope from a |
| 2715 | containing scope. This excludes input variables (see :meth:`iter_input_vars`) |
| 2716 | and locally declared variables and stretches (see :meth:`iter_declared_vars` |
| 2717 | and :meth:`iter_declared_stretches`).""" |
| 2718 | if self._control_flow_scopes: |
| 2719 | return itertools.chain( |
| 2720 | self._control_flow_scopes[-1].iter_captured_vars(), |
| 2721 | self._control_flow_scopes[-1].iter_captured_stretches(), |
| 2722 | ) |
| 2723 | return itertools.chain(self._data.get_captured_vars(), self._data.get_captured_stretches()) |
| 2724 | |
| 2725 | def iter_captured_vars(self) -> typing.Iterable[expr.Var]: |
| 2726 | """Get an iterable over all real-time classical variables that are captured by this circuit |