Skip to content

Commit b36d8ff

Browse files
authored
V4: The rest of the non control-flow instructions (#1568)
* ClassicalConvert tests * tests for Classical(Exchange|Load|Move) * ClassicalStore tests * test ClassicalComparison classes * test UnaryClassicalInstructions * Include implementation and test * Wait, Halt, Nop test and implementation * implement ClassicalConvert * re-implement ClassicalLoad * re-implement ClassicalStore * re-implement ClassicalComparison * re-implement Exchange * re-implement ClassicalUnary * back ClassicalMove, ClassicalExchange with quil-rs * fix recursive implementation of SimpleInstruction.__str__
1 parent 4a06343 commit b36d8ff

File tree

5 files changed

+521
-93
lines changed

5 files changed

+521
-93
lines changed

pyquil/quilatom.py

+3
Original file line numberDiff line numberDiff line change
@@ -834,6 +834,9 @@ def _from_parameter_str(cls, memory_reference_str: str) -> "MemoryReference":
834834
return cls._from_rs_memory_reference(expression.to_address())
835835
raise ValueError(f"{memory_reference_str} is not a memory reference")
836836

837+
def _to_rs_memory_reference(self) -> quil_rs.MemoryReference:
838+
return quil_rs.MemoryReference(self.name, self.offset)
839+
837840
def out(self) -> str:
838841
if self.declared_size is not None and self.declared_size == 1 and self.offset == 0:
839842
return "{}".format(self.name)

0 commit comments

Comments
 (0)