quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.25k stars 1.01k forks source link

Improve `__str__` and `__repr__` for `SingleQubitCliffordGate` #6326

Open NoureldinYosri opened 11 months ago

NoureldinYosri commented 11 months ago

Is your feature request related to a use case or problem? Please describe. Both the string and repr operators of SingleQubitCliffrodGate fall to its parent class which gives a confusing representaiton e.g.

>>> import cirq
>>> repr(cirq.ops.SingleQubitCliffordGate.X)
"cirq.CliffordGate.from_clifford_tableau(cirq.CliffordTableau(1,rs=np.array([False, True], dtype=np.dtype('bool')), xs=np.array([[True], [False]], dtype=np.dtype('bool')),zs=np.array([[False], [True]], dtype=np.dtype('bool')), initial_state=0))"
>>> str(cirq.ops.SingleQubitCliffordGate.X)
"cirq.CliffordGate.from_clifford_tableau(cirq.CliffordTableau(1,rs=np.array([False, True], dtype=np.dtype('bool')), xs=np.array([[True], [False]], dtype=np.dtype('bool')),zs=np.array([[False], [True]], dtype=np.dtype('bool')), initial_state=0))"

Describe the solution you'd like the representation should be simpler. For example for cirq.ops.SingleQubitCliffordGate.X it should be cirq.ops.SingleQubitCliffordGate(_clifford_tableau=cirq.CliffordTableau(1, xs=np.array([[True], [False]]), zs=np.array([[False], [True]])))

What is the urgency from your perspective for this issue? Is it blocking important work? P3 - I'm not really blocked by it, it is an idea I'd like to discuss / suggestion based on principle

suyashdamle commented 11 months ago

I'd like to take this one up

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days

github-actions[bot] commented 9 months ago

Issue closed due to inactivity.

telescopic commented 8 months ago

I'd like to take this up

NoureldinYosri commented 8 months ago

@telescopic thanks for volunteering to help with this issue. I assigned it to you.


on a second look, looks like this task was already assigned to @suyashdamle. If they don't wanna continue working on this you can take it on.

@suyashdamle do you wanna continue working on this or do you wanna leave it to @telescopic ?

telescopic commented 8 months ago

@NoureldinYosri thanks for the reply!

I was looking at a couple of other issues that had assignees from a while back - Curious on if there is some staleness limit post which issues are eligible for re-assignment? Thanks in advance!

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days

pavoljuhas commented 6 months ago

I was looking at a couple of other issues that had assignees from a while back - Curious on if there is some staleness limit post which issues are eligible for re-assignment? Thanks in advance!

@telescopic - we have a bot marking issues as stale after 30 days of inactivity; after that we should consider reassignment. This issue has been dormant way longer; sorry about that, sometimes lower-priority issues may fall through the cracks. If you are still interested, I'll be happy to reassign your way.

telescopic commented 6 months ago

@pavoljuhas - sure, please go ahead and assign this to me if that's okay!

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days