Skip to content

Commit

Permalink
fix: recover theta back to paras
Browse files Browse the repository at this point in the history
  • Loading branch information
chensgit169 committed Nov 19, 2023
1 parent c3d8f50 commit 182782c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions quafu/elements/element_gates/rotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
class RXGate(ParametricGate, SingleQubitGate):
name = "RX"

def __init__(self, pos: int, theta: float = 0.):
ParametricGate.__init__(self, pos, paras=theta)
def __init__(self, pos: int, paras: float = 0.):
ParametricGate.__init__(self, pos, paras=paras)

@property
def matrix(self):
Expand All @@ -20,8 +20,8 @@ def matrix(self):
class RYGate(ParametricGate, SingleQubitGate):
name = "RY"

def __init__(self, pos: int, theta: float = 0.):
ParametricGate.__init__(self, pos, paras=theta)
def __init__(self, pos: int, paras: float = 0.):
ParametricGate.__init__(self, pos, paras=paras)

@property
def matrix(self):
Expand All @@ -32,8 +32,8 @@ class RZGate(ParametricGate, SingleQubitGate):
name = "RZ"


def __init__(self, pos: int, theta: float = 0.):
ParametricGate.__init__(self, pos, paras=theta)
def __init__(self, pos: int, paras: float = 0.):
ParametricGate.__init__(self, pos, paras=paras)

@property
def matrix(self):
Expand All @@ -43,8 +43,8 @@ def matrix(self):
class RXXGate(ParametricGate):
name = "RXX"

def __init__(self, q1: int, q2: int, theta: float = 0.):
ParametricGate.__init__(self, [q1, q2], paras=theta)
def __init__(self, q1: int, q2: int, paras: float = 0.):
ParametricGate.__init__(self, [q1, q2], paras=paras)

@property
def matrix(self):
Expand All @@ -58,8 +58,8 @@ def named_pos(self) -> Dict:
class RYYGate(ParametricGate):
name = "RYY"

def __init__(self, q1: int, q2: int, theta: float = 0.):
ParametricGate.__init__(self, [q1, q2], paras=theta)
def __init__(self, q1: int, q2: int, paras: float = 0.):
ParametricGate.__init__(self, [q1, q2], paras=paras)

@property
def matrix(self):
Expand All @@ -73,8 +73,8 @@ def named_pos(self) -> Dict:
class RZZGate(ParametricGate):
name = "RZZ"

def __init__(self, q1: int, q2: int, theta: float = 0.):
ParametricGate.__init__(self, [q1, q2], paras=theta)
def __init__(self, q1: int, q2: int, paras: float = 0.):
ParametricGate.__init__(self, [q1, q2], paras=paras)

@property
def matrix(self):
Expand Down

0 comments on commit 182782c

Please sign in to comment.