示例#1
0
文件: gates.py 项目: timasq/pyquil
def CONVERT(classical_reg1, classical_reg2):
    """
    Produce a CONVERT instruction.

    :param classical_reg1: MemoryReference to store to.
    :param classical_reg2: MemoryReference to read from.
    :return: A ClassicalCONVERT instance.
    """
    return ClassicalConvert(classical_reg1, classical_reg2)
示例#2
0
def CONVERT(classical_reg1: MemoryReferenceDesignator, classical_reg2: MemoryReferenceDesignator) -> ClassicalConvert:
    """
    Produce a CONVERT instruction.

    :param classical_reg1: MemoryReference to store to.
    :param classical_reg2: MemoryReference to read from.
    :return: A ClassicalConvert instance.
    """
    return ClassicalConvert(unpack_classical_reg(classical_reg1), unpack_classical_reg(classical_reg2))
示例#3
0
 def convert(self, left, right):
     return ClassicalConvert(left, right)
示例#4
0
 def exitConvert(self, ctx):
     # type: (QuilParser.ConvertContext) -> None
     self.result.append(
         ClassicalConvert(_addr(ctx.addr(0)), _addr(ctx.addr(1))))