def getCPMGAxisDesc(pulseSpacing, numPulses, calRepeats): return [ # NOTE: numPulses is not a numpy array, so cannot multiply by a float # But thankfully, np.array(np.array) = np.array so this is always a good move here. delay_descriptor(pulseSpacing * np.array(numPulses)), cal_descriptor(('qubit', ), calRepeats) ]
def getRAmpNQAD(qubits, amps, calRepeats): return [{ 'name': 'amplitude', 'unit': None, 'points': list(amps), 'partition': 1 }, cal_descriptor(qubits, calRepeats)]
def getECAAxisDesc(amps, calRepeats): return [ { 'name': 'amplitude', 'unit': None, 'points': list(amps)+list(amps), 'partition': 1 }, cal_descriptor(('controlQ', 'targetQ'), calRepeats) ]
def getECPAxisDesc(phases, calRepeats): return [ { 'name': 'phase', 'unit': 'radians', 'points': list(phases)+list(phases), 'partition': 1 }, cal_descriptor(('controlQ', 'targetQ'), calRepeats) ]
def getSimRBACAD(seqs, add_cals, qubits): axis_descriptor = [{ 'name': 'length', 'unit': None, 'points': list(map(len, seqs)), 'partition': 1 }] if add_cals: axis_descriptor.append(cal_descriptor((qubits), 2)) return axis_descriptor
def getTwoQubitRBAD(seqs, add_cals): axis_descriptor = [{ 'name': 'length', 'unit': None, 'points': list(map(len, seqs)), 'partition': 1 }] if add_cals: axis_descriptor.append(cal_descriptor(('q1', 'q2'), 2)) return axis_descriptor
def getSingleQubitRBAD(seqs, add_cals): ad = [{ 'name': 'length', 'unit': None, 'points': list(map(len, seqs)), 'partition': 1 }] if add_cals: ad.append(cal_descriptor(('qubit',), 2)) return ad
def getHahnAxisDesc(pulseSpacings, calRepeats): return [ delay_descriptor(2 * pulseSpacings), cal_descriptor(('qubit', ), calRepeats) ]
def getCRtAxisDesc(lengths): return [ delay_descriptor(np.concatenate((np.repeat(lengths,3), np.repeat(lengths,3)))), cal_descriptor(('targetQ',), 2) ]
def getECLAxisDesc(lengths, calRepeats): return [ delay_descriptor(np.concatenate((lengths, lengths))), # Hard code there are 2 qubits cal_descriptor(('controlQ', 'targetQ'), calRepeats) ]
def rAD(pulseSpacings, calRepeats): return [ delay_descriptor(pulseSpacings), cal_descriptor(('qubit',), calRepeats) ]
def irAD(delays, calRepeats): return [ delay_descriptor(delays), cal_descriptor(('qubit',), calRepeats) ]