Skip to content

Commit

Permalink
Merge pull request #538 from qiboteam/stdraw
Browse files Browse the repository at this point in the history
Add S and T gates to `circuit.draw()`
  • Loading branch information
scarrazza committed Jan 24, 2022
2 parents c82b11a + 492807d commit 3eb675b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/qibo/abstractions/circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def on_qubits(self, *q):
q (int): Qubit ids that the gates should act.
Example:
.. testcode::
from qibo import gates, models
Expand Down Expand Up @@ -664,7 +664,7 @@ def summary(self) -> str:
cx: 2
ccx: 1
'''
.. testoutput::
:hide:
Expand Down Expand Up @@ -767,7 +767,7 @@ def from_qasm(cls, qasm_code: str, **kwargs):
specified by the given QASM script.
Example:
.. testcode::
from qibo import models, gates
Expand Down Expand Up @@ -948,6 +948,7 @@ def draw(self, line_wrap=70) -> str:
String containing text circuit diagram.
"""
labels = {"h": "H", "x": "X", "y": "Y", "z": "Z",
"s": "S", "sdg": "SDG", "t": "T", "tdg": "TDG",
"rx": "RX", "ry": "RY", "rz": "RZ",
"u1": "U1", "u2": "U2", "u3": "U3",
"cx": "X", "swap": "x", "cz": "Z",
Expand Down

0 comments on commit 3eb675b

Please sign in to comment.