From 492807d98a81418a0f13f8055a8a225826fa5c45 Mon Sep 17 00:00:00 2001 From: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> Date: Thu, 20 Jan 2022 16:17:18 +0400 Subject: [PATCH] Add S and T gates to circuit.draw() --- src/qibo/abstractions/circuit.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qibo/abstractions/circuit.py b/src/qibo/abstractions/circuit.py index 4f61b1d5e5..7398bc5c09 100644 --- a/src/qibo/abstractions/circuit.py +++ b/src/qibo/abstractions/circuit.py @@ -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 @@ -664,7 +664,7 @@ def summary(self) -> str: cx: 2 ccx: 1 ''' - + .. testoutput:: :hide: @@ -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 @@ -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",