Skip to content

Commit 9292d7a

Browse files
Leonardo RanzaniLeonardo Ranzani
Leonardo Ranzani
authored and
Leonardo Ranzani
committed
changed parametric 2-qubit gate parameter name
1 parent eed160f commit 9292d7a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

QGL/BasicSequences/RB.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ def TwoQubitRB(q1: Channels.LogicalChannel,
261261
cliff_type: str = 'std',
262262
showPlot: bool = False,
263263
suffix: str = "",
264-
add_cals: bool = True,swap: bool = False) -> str:
264+
add_cals: bool = True,parametric: bool = False) -> str:
265265
"""
266266
Two qubit randomized benchmarking using 90 and 180 single qubit generators
267267
and ZX90.
@@ -303,7 +303,7 @@ def TwoQubitRB(q1: Channels.LogicalChannel,
303303
seqsBis = []
304304
for seq in seqs:
305305
seqsBis.append(reduce(operator.add,
306-
[TwoQubitClifford(q2, q1, c, kind=cliff_type,swap)
306+
[TwoQubitClifford(q2, q1, c, kind=cliff_type,parametric)
307307
for c in seq]))
308308

309309
#Add the measurement to all sequences

QGL/Cliffords.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -376,11 +376,11 @@ def Cx2(c1, c2, q1, q2, kind='std'):
376376
#Create the pulse block
377377
return seq1 * seq2
378378

379-
def entangling_seq(gate, q1, q2,swap=False):
379+
def entangling_seq(gate, q1, q2,parametric=False):
380380
"""
381381
Helper function to create the entangling gate sequence
382382
"""
383-
if swap==False:
383+
if parametric==False:
384384
if gate == "CNOT":
385385
return ZX90_CR(q2, q1)
386386
elif gate == "iSWAP":
@@ -397,15 +397,15 @@ def entangling_seq(gate, q1, q2,swap=False):
397397
return [X90(q1),Z90(q1) * Z90m(q2),iSWAP(q1,q2),X90(q2),iSWAP(q1,q2),Z90(q1),
398398
Y90(q2),X(q2),Z90m(q1) * Z90m(q2),iSWAP(q1,q2),Y90(q1),X(q1)]
399399

400-
def TwoQubitClifford(q1, q2, cliffNum, kind='std',swap=False):
400+
def TwoQubitClifford(q1, q2, cliffNum, kind='std',parametric=False):
401401

402402
if kind.upper() not in clifford_map.keys():
403403
raise ValueError(f"Unknown clifford type: must be one of {clifford.map.keys()}.")
404404

405405
c = C2Seqs[cliffNum]
406406
seq = [Cx2(c[0][0], c[0][1], q1, q2, kind=kind)]
407407
if c[1]:
408-
seq += entangling_seq(c[1], q1, q2,swap)
408+
seq += entangling_seq(c[1], q1, q2,parametric)
409409
if c[2]:
410410
seq += [Cx2(c[2][0], c[2][1], q1, q2, kind=kind)]
411411
return seq

0 commit comments

Comments
 (0)