From 6a55047a2436a6a737cfa863dfedadfbf257bdb1 Mon Sep 17 00:00:00 2001 From: ElStabilini Date: Wed, 20 Nov 2024 18:38:35 +0400 Subject: [PATCH 1/3] added RX90 native gate and modified R method --- src/qibolab/_core/native.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/qibolab/_core/native.py b/src/qibolab/_core/native.py index fd1131f0b..fbc37f32d 100644 --- a/src/qibolab/_core/native.py +++ b/src/qibolab/_core/native.py @@ -66,6 +66,8 @@ class SingleQubitNatives(NativeContainer): RX: Optional[Native] = None """Pulse to drive the qubit from state 0 to state 1.""" + RX90: Optional[Native] = None + """Pulse to drive the qubit from state 0 to state +""" RX12: Optional[Native] = None """Pulse to drive to qubit from state 1 to state 2.""" MZ: Optional[Native] = None @@ -78,8 +80,11 @@ def R(self, theta: float = np.pi, phi: float = 0.0) -> PulseSequence: ``theta`` will be the angle of the rotation, while ``phi`` the angle that the rotation axis forms with x axis. """ - assert self.RX is not None - return rotation(self.RX, theta, phi) + if self.RX90 != None: + return rotation(self.RX, 2 * theta, phi) + else: + assert self.RX is not None + return rotation(self.RX, theta, phi) class TwoQubitNatives(NativeContainer): From 2078fd94726be9fa52695af73e1a06c08e944f3d Mon Sep 17 00:00:00 2001 From: Elisa Stabilini Date: Tue, 26 Nov 2024 05:32:04 +0100 Subject: [PATCH 2/3] Update src/qibolab/_core/native.py Co-authored-by: Alessandro Candido --- src/qibolab/_core/native.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qibolab/_core/native.py b/src/qibolab/_core/native.py index fbc37f32d..400e58384 100644 --- a/src/qibolab/_core/native.py +++ b/src/qibolab/_core/native.py @@ -82,9 +82,8 @@ def R(self, theta: float = np.pi, phi: float = 0.0) -> PulseSequence: """ if self.RX90 != None: return rotation(self.RX, 2 * theta, phi) - else: - assert self.RX is not None - return rotation(self.RX, theta, phi) + assert self.RX is not None + return rotation(self.RX, theta, phi) class TwoQubitNatives(NativeContainer): From 88d0fd10cd5cbf685997f5acd26defb38b5e6927 Mon Sep 17 00:00:00 2001 From: Elisa Stabilini Date: Tue, 26 Nov 2024 05:33:43 +0100 Subject: [PATCH 3/3] Update src/qibolab/_core/native.py Co-authored-by: Stavros Efthymiou <35475381+stavros11@users.noreply.github.com> --- src/qibolab/_core/native.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qibolab/_core/native.py b/src/qibolab/_core/native.py index 400e58384..53410f1a0 100644 --- a/src/qibolab/_core/native.py +++ b/src/qibolab/_core/native.py @@ -80,8 +80,8 @@ def R(self, theta: float = np.pi, phi: float = 0.0) -> PulseSequence: ``theta`` will be the angle of the rotation, while ``phi`` the angle that the rotation axis forms with x axis. """ - if self.RX90 != None: - return rotation(self.RX, 2 * theta, phi) + if self.RX90 is not None: + return rotation(self.RX90, 2 * theta, phi) assert self.RX is not None return rotation(self.RX, theta, phi)