Skip to content

Commit

Permalink
Optional meas channels for RB
Browse files Browse the repository at this point in the history
Input logical channels (if any) instead of string or full channel library
  • Loading branch information
Diego Ristè committed May 8, 2020
1 parent c5a076f commit ae1e2db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions QGL/BasicSequences/RB.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def SingleQubitLeakageRB(qubit, seqs, pi2args, cliff_type='std',



def TwoQubitRB(q1, q2, seqs, meas_qubits='all',
def TwoQubitRB(q1, q2, seqs, meas_qubits=None,
cliff_type='std',
showPlot=False,
suffix="",
Expand All @@ -264,8 +264,8 @@ def TwoQubitRB(q1, q2, seqs, meas_qubits='all',
Logical channel to implement RB
seqs : int iterable
list of lists of Clifford group integers produced by create_RB_seqs
meas_qubits : iterableof strings, string, optional
list of qubits to measure or 'ALL' to measure all qubits
meas_qubits : iterable of Channels.LogicalChannel, optional
list of qubits to measure or None (default) to measure all qubits
cliff_type : string, optional
Clifford library to use for RB -> ['STD', 'DIAC', 'AC', 'XYX']
showPlot : boolean, optional
Expand Down Expand Up @@ -298,7 +298,7 @@ def TwoQubitRB(q1, q2, seqs, meas_qubits='all',

#Add the measurement to all sequences
for seq in seqsBis:
if meas_qubits.upper() == "ALL":
if not meas_qubits:
seq.append(MEAS(q1) * MEAS(q2))
else:
seq.append(reduce(operator.mul, [MEAS(q) for q in meas_qubits]))
Expand Down

0 comments on commit ae1e2db

Please sign in to comment.