Improve __str__
and __repr__
for SingleQubitCliffordGate
#6326
Closed
Description
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
Metadata
Assignees
Labels
This issue can be resolved by someone who is not familiar with the codebase. A good starting issue.For beginners in QC, this will help picking up some knowledge. Bit harder than "good first issues"Describes new functionalityA consensus emerged that this bug report, feature request, or other action should be worked on