Beispiel #1
0
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)
Beispiel #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))
Beispiel #3
0
 def convert(self, left, right):
     return ClassicalConvert(left, right)
Beispiel #4
0
 def exitConvert(self, ctx):
     # type: (QuilParser.ConvertContext) -> None
     self.result.append(
         ClassicalConvert(_addr(ctx.addr(0)), _addr(ctx.addr(1))))