Skip to content

Commit

Permalink
update qiskit/qasm/libs/qelib1.inc according to Qiskit#2755
Browse files Browse the repository at this point in the history
  • Loading branch information
Luciano Bello committed Nov 15, 2019
1 parent 04cc7a1 commit cd8def7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions qiskit/extensions/standard/cu3.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@ def __init__(self, theta, phi, lam):
def _define(self):
"""
gate cu3(theta,phi,lambda) c, t
{ u1((lambda+phi)/2) c; u1((lambda-phi)/2) t; cx c,t;
u3(-theta/2,0,-(phi+lambda)/2) t; cx c,t;
{ u1((lambda+phi)/2) c;
u1((lambda-phi)/2) t;
cx c,t;
u3(-theta/2,0,-(phi+lambda)/2) t;
cx c,t;
u3(theta/2,phi,0) t;
}
"""
Expand Down
1 change: 1 addition & 0 deletions qiskit/qasm/libs/qelib1.inc
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ gate cu1(lambda) a,b
gate cu3(theta,phi,lambda) c, t
{
// implements controlled-U(theta,phi,lambda) with target t and control c
u1((lambda+phi)/2) c;
u1((lambda-phi)/2) t;
cx c,t;
u3(-theta/2,0,-(phi+lambda)/2) t;
Expand Down

0 comments on commit cd8def7

Please sign in to comment.