Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add S and T gates to circuit.draw() #538

Merged
merged 1 commit into from
Jan 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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