microsoft / microsoft/azure-quantum-python
Cirq Job __repr__ method
Nobody has claimed this yet.
- 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.
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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