Skip to content

V4: The rest of the non control-flow instructions #1568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
3 changes: 3 additions & 0 deletions pyquil/quilatom.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,9 @@ def _from_parameter_str(cls, memory_reference_str: str) -> "MemoryReference":
return cls._from_rs_memory_reference(expression.to_address())
raise ValueError(f"{memory_reference_str} is not a memory reference")

def _to_rs_memory_reference(self) -> quil_rs.MemoryReference:
return quil_rs.MemoryReference(self.name, self.offset)

def out(self) -> str:
if self.declared_size is not None and self.declared_size == 1 and self.offset == 0:
return "{}".format(self.name)
Expand Down
Loading