def exitNop(self, ctx): # type: (QuilParser.NopContext) -> None self.result.append(Nop())
""" Reset all qubits or just a specific qubit at qubit_index. :param Optional[int] qubit_index: The address of the qubit to reset. If None, reset all qubits. :returns: A Reset or ResetQubit Quil AST expression corresponding to a global or targeted reset, respectively. :rtype: Union[Reset, ResetQubit] """ if qubit_index is not None: return ResetQubit(Qubit(qubit_index)) else: return Reset() NOP = Nop() """ This instruction applies no operation at that timestep. Typically these are ignored in error-models. :returns: A Nop object. """ HALT = Halt() """ This instruction ends the program. :returns: A Halt object. """ def MEASURE(qubit, classical_reg=None):