Skip to content

Commit 36ea09c

Browse files
author
Leonardo Ranzani
committed
fixed swap gate
1 parent 6984ff4 commit 36ea09c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

QGL/PulsePrimitives.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -579,12 +579,16 @@ def TRIG(marker_chan, length):
579579

580580
def iSWAP(Q1,Q2, **kwargs):
581581
edge = ChannelLibraries.EdgeFactory(Q1,Q2)
582-
582+
edge.pulse_params['piAmp'] = edge.pulse_params['amp']
583+
# add "pi2Amp" too so that Utheta can construct its angle2amp lookup table
584+
edge.pulse_params['pi2Amp'] = edge.pulse_params['amp'] / 2
583585
p = X(edge, **kwargs)
584586
return p._replace(label="iSWAP")
585587

586588
def SQRTiSWAP(Q1,Q2, **kwargs):
587589
edge = ChannelLibraries.EdgeFactory(Q1,Q2)
588-
590+
edge.pulse_params['piAmp'] = edge.pulse_params['amp']
591+
# add "pi2Amp" too so that Utheta can construct its angle2amp lookup table
592+
edge.pulse_params['pi2Amp'] = edge.pulse_params['amp'] / 2
589593
p = X90(edge, **kwargs)
590-
return p._replace(label="SQRTSWAP")
594+
return p._replace(label="iSWAP")
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)