microsoft / microsoft/azure-quantum-python

Cirq Job __repr__ method

Open
#158 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue help wanted
Dominant language
Python
Stars
160
Forks
113
Avg merge
6d 23h
Merged PRs (30d)
1

Description

@vtomole pointed out that the Job.__repr__ method should be modified according to the following:

The class has a repr method that produces a python expression that evaluates to an object equal to the original value. The expression assumes that cirq, sympy, numpy as np, and pandas as pd have been imported.

If the repr is cumbersome, gates should specify a repr_pretty method. This method will be used preferentially by Jupyter notebooks, ipython, etc.

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#L247

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the package's Job class and compare its repr behavior with the Cirq gate-and-operation guidelines linked in the issue. Review the referenced cirq_ionq/job.py implementation and confirm the expected representation with maintainers; done means the agreed Job representation is implemented and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.