Removes the pair extension from the list with referenced circuit elements.
(refs, pairExt, convType)
| 1283 | return instr |
| 1284 | |
| 1285 | def _pairReferences(refs, pairExt, convType): |
| 1286 | """ |
| 1287 | Removes the pair extension from the list with referenced circuit elements. |
| 1288 | """ |
| 1289 | lenExt = len(pairExt[0]) |
| 1290 | for i in range(len(refs)): |
| 1291 | if len(refs[i]) > lenExt and refs[i][-lenExt:] in pairExt: |
| 1292 | ref = refs[i][:-lenExt] |
| 1293 | if convType == 'dd' or convType == 'dc': |
| 1294 | ref += '_D' |
| 1295 | elif convType == 'cc'or convType == 'cd': |
| 1296 | ref += '_C' |
| 1297 | refs[i] = ref |
| 1298 | refs = list(set(refs)) |
| 1299 | return refs |
| 1300 | |
| 1301 | def _convertMatrices(instr): |
| 1302 | """ |