-
Notifications
You must be signed in to change notification settings - Fork 92
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
Cirq Job __repr__ method #158
Comments
Also, feel free to use cirq.testing.assert_equivalent_repr to assist in testing this. |
Yes.
Yes. CC: @dabacon |
Following up on the Cirq sync: I find
I'll leave it on your court as to if you want Here is a rough guide we can start with if you do decide to implement Starting with the created Cirq job from the service job = service.create_job(
program=circuit,
repetitions=100,
target="ionq.simulator"
) If I call class Job:
def __repr__(self) -> str:
return f"azure.quantum.plugins.cirq.job.Job(azure_job={self._azure_job!r},
program={self._program!r}, measurement_dict={self._measurement_dict!r}" This class Job(BaseJob, FilteredJob):
def __repr__(self) -> str:
return f"azure.quantum.Job(workspace={self.workspace!r}, job_details={self.details!r}" We'll need to define a class Workspace:
def __repr__(self) -> str:
return f"azure.quantum.workspace.Workspace(credential={self.credentials!r}, name={self.name!r},
resource_group={self.resource_group!r}, subscription_id={self.subscription_id!r},
storage={sef.storage!r}, user_agent={self.user_agent!r}, location={self.location!r}"
Please let me know your thoughts and concerns about this. |
Thanks @vtomole for the clarification and examples! I think this makes a lot of sense. Let me take it back to the team and see how it aligns with our internal guidelines for Azure Client packages; if it doesn't conflict then I think it's worth adding to the backlog, especially if it is something Cirq users are expecting. |
@vtomole pointed out that the
Job.__repr__
method should be modified according to the following:See https://github.com/quantumlib/Cirq/blob/51b56288fa9a84dff9697524da9ab0a4d57a56f5/docs/dev/gates.md#gate-and-operation-guidelines
@vtomole, I was wondering if the above is a correct recap of our conversation, could you please verify? Also, is it a correct observation that
cirq_ionq.Job
is similarly missing a__repr__
method? See: https://github.com/quantumlib/Cirq/blob/1f14edf6bae39b4146e3f25f04ca4f26effc6773/cirq-ionq/cirq_ionq/job.py#L247The text was updated successfully, but these errors were encountered: