libqasm 0.5.2__cp38-cp38-win_amd64.whl → 0.6.1__cp38-cp38-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
libQasm/libQasm.py CHANGED
@@ -513,7 +513,6 @@ ends_cb_ptr = _libQasm.ends_cb_ptr
513
513
  ends = _libQasm.ends
514
514
  flush_cb_ptr = _libQasm.flush_cb_ptr
515
515
  flush = _libQasm.flush
516
- SHARED_PTR_DISOWN = _libQasm.SHARED_PTR_DISOWN
517
516
  class vectori(object):
518
517
  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
519
518
  __repr__ = _swig_repr
@@ -1039,329 +1038,6 @@ class vectors(object):
1039
1038
 
1040
1039
  # Register vectors in _libQasm:
1041
1040
  _libQasm.vectors_swigregister(vectors)
1042
- class NumericalIdentifiers(object):
1043
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1044
- __repr__ = _swig_repr
1045
-
1046
- def __init__(self):
1047
- _libQasm.NumericalIdentifiers_swiginit(self, _libQasm.new_NumericalIdentifiers())
1048
-
1049
- def addToVector(self, *args):
1050
- return _libQasm.NumericalIdentifiers_addToVector(self, *args)
1051
-
1052
- def getIndices(self):
1053
- return _libQasm.NumericalIdentifiers_getIndices(self)
1054
-
1055
- def removeDuplicates(self):
1056
- return _libQasm.NumericalIdentifiers_removeDuplicates(self)
1057
-
1058
- def clear(self):
1059
- return _libQasm.NumericalIdentifiers_clear(self)
1060
-
1061
- def printMembers(self):
1062
- return _libQasm.NumericalIdentifiers_printMembers(self)
1063
- __swig_destroy__ = _libQasm.delete_NumericalIdentifiers
1064
-
1065
- # Register NumericalIdentifiers in _libQasm:
1066
- _libQasm.NumericalIdentifiers_swigregister(NumericalIdentifiers)
1067
- class Qubits(object):
1068
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1069
- __repr__ = _swig_repr
1070
-
1071
- def __init__(self, *args):
1072
- _libQasm.Qubits_swiginit(self, _libQasm.new_Qubits(*args))
1073
-
1074
- def setSelectedQubits(self, indices):
1075
- return _libQasm.Qubits_setSelectedQubits(self, indices)
1076
-
1077
- def getSelectedQubits(self):
1078
- return _libQasm.Qubits_getSelectedQubits(self)
1079
-
1080
- def printMembers(self):
1081
- return _libQasm.Qubits_printMembers(self)
1082
- __swig_destroy__ = _libQasm.delete_Qubits
1083
-
1084
- # Register Qubits in _libQasm:
1085
- _libQasm.Qubits_swigregister(Qubits)
1086
- class Bits(object):
1087
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1088
- __repr__ = _swig_repr
1089
-
1090
- def __init__(self, *args):
1091
- _libQasm.Bits_swiginit(self, _libQasm.new_Bits(*args))
1092
-
1093
- def setSelectedBits(self, indices):
1094
- return _libQasm.Bits_setSelectedBits(self, indices)
1095
-
1096
- def getSelectedBits(self):
1097
- return _libQasm.Bits_getSelectedBits(self)
1098
-
1099
- def printMembers(self):
1100
- return _libQasm.Bits_printMembers(self)
1101
- __swig_destroy__ = _libQasm.delete_Bits
1102
-
1103
- # Register Bits in _libQasm:
1104
- _libQasm.Bits_swigregister(Bits)
1105
- class Operation(object):
1106
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1107
- __repr__ = _swig_repr
1108
-
1109
- def __init__(self, *args):
1110
- _libQasm.Operation_swiginit(self, _libQasm.new_Operation(*args))
1111
-
1112
- def getType(self):
1113
- return _libQasm.Operation_getType(self)
1114
-
1115
- def getStateFilename(self):
1116
- return _libQasm.Operation_getStateFilename(self)
1117
-
1118
- def getQubitsInvolved(self, *args):
1119
- return _libQasm.Operation_getQubitsInvolved(self, *args)
1120
-
1121
- def getRotationAngle(self):
1122
- return _libQasm.Operation_getRotationAngle(self)
1123
-
1124
- def getMeasureParityQubitsAndAxis(self):
1125
- return _libQasm.Operation_getMeasureParityQubitsAndAxis(self)
1126
-
1127
- def getTwoQubitPairs(self):
1128
- return _libQasm.Operation_getTwoQubitPairs(self)
1129
-
1130
- def getToffoliQubitPairs(self):
1131
- return _libQasm.Operation_getToffoliQubitPairs(self)
1132
-
1133
- def isBitControlled(self):
1134
- return _libQasm.Operation_isBitControlled(self)
1135
-
1136
- def allQubitsBits(self):
1137
- return _libQasm.Operation_allQubitsBits(self)
1138
-
1139
- def setControlBits(self, control_bits):
1140
- return _libQasm.Operation_setControlBits(self, control_bits)
1141
-
1142
- def getControlBits(self):
1143
- return _libQasm.Operation_getControlBits(self)
1144
-
1145
- def getDisplayBits(self):
1146
- return _libQasm.Operation_getDisplayBits(self)
1147
-
1148
- def getWaitTime(self):
1149
- return _libQasm.Operation_getWaitTime(self)
1150
-
1151
- def setUMatrixElements(self, input):
1152
- return _libQasm.Operation_setUMatrixElements(self, input)
1153
-
1154
- def getUMatrixElements(self):
1155
- return _libQasm.Operation_getUMatrixElements(self)
1156
-
1157
- def printOperation(self):
1158
- return _libQasm.Operation_printOperation(self)
1159
- __swig_destroy__ = _libQasm.delete_Operation
1160
-
1161
- # Register Operation in _libQasm:
1162
- _libQasm.Operation_swigregister(Operation)
1163
- class OperationsCluster(object):
1164
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1165
- __repr__ = _swig_repr
1166
-
1167
- def __init__(self, *args):
1168
- _libQasm.OperationsCluster_swiginit(self, _libQasm.new_OperationsCluster(*args))
1169
-
1170
- def lastOperation(self):
1171
- return _libQasm.OperationsCluster_lastOperation(self)
1172
-
1173
- def addOperation(self, valid_op):
1174
- return _libQasm.OperationsCluster_addOperation(self, valid_op)
1175
-
1176
- def addParallelOperation(self, valid_op):
1177
- return _libQasm.OperationsCluster_addParallelOperation(self, valid_op)
1178
-
1179
- def isParallel(self):
1180
- return _libQasm.OperationsCluster_isParallel(self)
1181
-
1182
- def getOperations(self):
1183
- return _libQasm.OperationsCluster_getOperations(self)
1184
-
1185
- def setLineNumber(self, linenumber):
1186
- return _libQasm.OperationsCluster_setLineNumber(self, linenumber)
1187
-
1188
- def getLineNumber(self):
1189
- return _libQasm.OperationsCluster_getLineNumber(self)
1190
-
1191
- def printOperations(self):
1192
- return _libQasm.OperationsCluster_printOperations(self)
1193
- __swig_destroy__ = _libQasm.delete_OperationsCluster
1194
-
1195
- # Register OperationsCluster in _libQasm:
1196
- _libQasm.OperationsCluster_swigregister(OperationsCluster)
1197
- class SubCircuit(object):
1198
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1199
- __repr__ = _swig_repr
1200
-
1201
- def __init__(self, *args):
1202
- _libQasm.SubCircuit_swiginit(self, _libQasm.new_SubCircuit(*args))
1203
-
1204
- def numberIterations(self, *args):
1205
- return _libQasm.SubCircuit_numberIterations(self, *args)
1206
-
1207
- def getLineNumber(self):
1208
- return _libQasm.SubCircuit_getLineNumber(self)
1209
-
1210
- def rankSubCircuit(self):
1211
- return _libQasm.SubCircuit_rankSubCircuit(self)
1212
-
1213
- def nameSubCircuit(self):
1214
- return _libQasm.SubCircuit_nameSubCircuit(self)
1215
-
1216
- def addOperationsCluster(self, opclus):
1217
- return _libQasm.SubCircuit_addOperationsCluster(self, opclus)
1218
-
1219
- def lastOperationsCluster(self):
1220
- return _libQasm.SubCircuit_lastOperationsCluster(self)
1221
-
1222
- def getOperationsCluster(self):
1223
- return _libQasm.SubCircuit_getOperationsCluster(self)
1224
-
1225
- def printMembers(self):
1226
- return _libQasm.SubCircuit_printMembers(self)
1227
- __swig_destroy__ = _libQasm.delete_SubCircuit
1228
-
1229
- # Register SubCircuit in _libQasm:
1230
- _libQasm.SubCircuit_swigregister(SubCircuit)
1231
- class SubCircuits(object):
1232
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1233
- __repr__ = _swig_repr
1234
-
1235
- def __init__(self):
1236
- _libQasm.SubCircuits_swiginit(self, _libQasm.new_SubCircuits())
1237
-
1238
- def addSubCircuit(self, subcircuit):
1239
- return _libQasm.SubCircuits_addSubCircuit(self, subcircuit)
1240
-
1241
- def numberOfSubCircuits(self):
1242
- return _libQasm.SubCircuits_numberOfSubCircuits(self)
1243
-
1244
- def lastSubCircuit(self):
1245
- return _libQasm.SubCircuits_lastSubCircuit(self)
1246
-
1247
- def getAllSubCircuits(self):
1248
- return _libQasm.SubCircuits_getAllSubCircuits(self)
1249
-
1250
- def clearSubCircuits(self):
1251
- return _libQasm.SubCircuits_clearSubCircuits(self)
1252
- __swig_destroy__ = _libQasm.delete_SubCircuits
1253
-
1254
- # Register SubCircuits in _libQasm:
1255
- _libQasm.SubCircuits_swigregister(SubCircuits)
1256
- class QasmRepresentation(object):
1257
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1258
- __repr__ = _swig_repr
1259
-
1260
- def __init__(self):
1261
- _libQasm.QasmRepresentation_swiginit(self, _libQasm.new_QasmRepresentation())
1262
-
1263
- def qubitRegister(self, participating_number):
1264
- return _libQasm.QasmRepresentation_qubitRegister(self, participating_number)
1265
-
1266
- def numQubits(self):
1267
- return _libQasm.QasmRepresentation_numQubits(self)
1268
-
1269
- def versionNumber(self, *args):
1270
- return _libQasm.QasmRepresentation_versionNumber(self, *args)
1271
-
1272
- def getSubCircuits(self):
1273
- return _libQasm.QasmRepresentation_getSubCircuits(self)
1274
-
1275
- def addMappings(self, name_key, indices, isQubit):
1276
- return _libQasm.QasmRepresentation_addMappings(self, name_key, indices, isQubit)
1277
-
1278
- def getMappedIndices(self, name_key, isQubit, linenumber):
1279
- return _libQasm.QasmRepresentation_getMappedIndices(self, name_key, isQubit, linenumber)
1280
-
1281
- def setErrorModel(self, error_model_type, error_model_num_params):
1282
- return _libQasm.QasmRepresentation_setErrorModel(self, error_model_type, error_model_num_params)
1283
-
1284
- def getErrorModelType(self):
1285
- return _libQasm.QasmRepresentation_getErrorModelType(self)
1286
-
1287
- def getErrorModelParameters(self):
1288
- return _libQasm.QasmRepresentation_getErrorModelParameters(self)
1289
-
1290
- def printMappings(self):
1291
- return _libQasm.QasmRepresentation_printMappings(self)
1292
-
1293
- def printErrorModel(self):
1294
- return _libQasm.QasmRepresentation_printErrorModel(self)
1295
- __swig_destroy__ = _libQasm.delete_QasmRepresentation
1296
-
1297
- # Register QasmRepresentation in _libQasm:
1298
- _libQasm.QasmRepresentation_swigregister(QasmRepresentation)
1299
- class libQasm(object):
1300
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1301
- __repr__ = _swig_repr
1302
-
1303
- def __init__(self):
1304
- _libQasm.libQasm_swiginit(self, _libQasm.new_libQasm())
1305
-
1306
- def parse_string(self, qasm_str):
1307
- return _libQasm.libQasm_parse_string(self, qasm_str)
1308
-
1309
- def parse_file(self, qasm_file_path):
1310
- return _libQasm.libQasm_parse_file(self, qasm_file_path)
1311
-
1312
- def getParseResult(self):
1313
- return _libQasm.libQasm_getParseResult(self)
1314
-
1315
- def getQasmRepresentation(self):
1316
- return _libQasm.libQasm_getQasmRepresentation(self)
1317
- __swig_destroy__ = _libQasm.delete_libQasm
1318
-
1319
- # Register libQasm in _libQasm:
1320
- _libQasm.libQasm_swigregister(libQasm)
1321
- class V1xAnalyzer(object):
1322
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1323
- __repr__ = _swig_repr
1324
-
1325
- def __init__(self, *args):
1326
- _libQasm.V1xAnalyzer_swiginit(self, _libQasm.new_V1xAnalyzer(*args))
1327
- __swig_destroy__ = _libQasm.delete_V1xAnalyzer
1328
-
1329
- def register_instruction(self, *args):
1330
- return _libQasm.V1xAnalyzer_register_instruction(self, *args)
1331
-
1332
- def register_error_model(self, *args):
1333
- return _libQasm.V1xAnalyzer_register_error_model(self, *args)
1334
-
1335
- @staticmethod
1336
- def parse_file(filename):
1337
- return _libQasm.V1xAnalyzer_parse_file(filename)
1338
-
1339
- @staticmethod
1340
- def parse_file_to_json(filename):
1341
- return _libQasm.V1xAnalyzer_parse_file_to_json(filename)
1342
-
1343
- @staticmethod
1344
- def parse_string(*args):
1345
- return _libQasm.V1xAnalyzer_parse_string(*args)
1346
-
1347
- @staticmethod
1348
- def parse_string_to_json(*args):
1349
- return _libQasm.V1xAnalyzer_parse_string_to_json(*args)
1350
-
1351
- def analyze_file(self, filename):
1352
- return _libQasm.V1xAnalyzer_analyze_file(self, filename)
1353
-
1354
- def analyze_file_to_json(self, filename):
1355
- return _libQasm.V1xAnalyzer_analyze_file_to_json(self, filename)
1356
-
1357
- def analyze_string(self, *args):
1358
- return _libQasm.V1xAnalyzer_analyze_string(self, *args)
1359
-
1360
- def analyze_string_to_json(self, *args):
1361
- return _libQasm.V1xAnalyzer_analyze_string_to_json(self, *args)
1362
-
1363
- # Register V1xAnalyzer in _libQasm:
1364
- _libQasm.V1xAnalyzer_swigregister(V1xAnalyzer)
1365
1041
  class V3xAnalyzer(object):
1366
1042
  thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1367
1043
  __repr__ = _swig_repr
@@ -1374,12 +1050,12 @@ class V3xAnalyzer(object):
1374
1050
  return _libQasm.V3xAnalyzer_register_instruction(self, *args)
1375
1051
 
1376
1052
  @staticmethod
1377
- def parse_file(filename):
1378
- return _libQasm.V3xAnalyzer_parse_file(filename)
1053
+ def parse_file(file_name):
1054
+ return _libQasm.V3xAnalyzer_parse_file(file_name)
1379
1055
 
1380
1056
  @staticmethod
1381
- def parse_file_to_json(filename):
1382
- return _libQasm.V3xAnalyzer_parse_file_to_json(filename)
1057
+ def parse_file_to_json(file_name):
1058
+ return _libQasm.V3xAnalyzer_parse_file_to_json(file_name)
1383
1059
 
1384
1060
  @staticmethod
1385
1061
  def parse_string(*args):
@@ -1389,11 +1065,11 @@ class V3xAnalyzer(object):
1389
1065
  def parse_string_to_json(*args):
1390
1066
  return _libQasm.V3xAnalyzer_parse_string_to_json(*args)
1391
1067
 
1392
- def analyze_file(self, filename):
1393
- return _libQasm.V3xAnalyzer_analyze_file(self, filename)
1068
+ def analyze_file(self, file_name):
1069
+ return _libQasm.V3xAnalyzer_analyze_file(self, file_name)
1394
1070
 
1395
- def analyze_file_to_json(self, filename):
1396
- return _libQasm.V3xAnalyzer_analyze_file_to_json(self, filename)
1071
+ def analyze_file_to_json(self, file_name):
1072
+ return _libQasm.V3xAnalyzer_analyze_file_to_json(self, file_name)
1397
1073
 
1398
1074
  def analyze_string(self, *args):
1399
1075
  return _libQasm.V3xAnalyzer_analyze_string(self, *args)
@@ -1403,371 +1079,4 @@ class V3xAnalyzer(object):
1403
1079
 
1404
1080
  # Register V3xAnalyzer in _libQasm:
1405
1081
  _libQasm.V3xAnalyzer_swigregister(V3xAnalyzer)
1406
- class subcircuit_vector(object):
1407
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1408
- __repr__ = _swig_repr
1409
-
1410
- def iterator(self):
1411
- return _libQasm.subcircuit_vector_iterator(self)
1412
- def __iter__(self):
1413
- return self.iterator()
1414
-
1415
- def __nonzero__(self):
1416
- return _libQasm.subcircuit_vector___nonzero__(self)
1417
-
1418
- def __bool__(self):
1419
- return _libQasm.subcircuit_vector___bool__(self)
1420
-
1421
- def __len__(self):
1422
- return _libQasm.subcircuit_vector___len__(self)
1423
-
1424
- def __getslice__(self, i, j):
1425
- return _libQasm.subcircuit_vector___getslice__(self, i, j)
1426
-
1427
- def __setslice__(self, *args):
1428
- return _libQasm.subcircuit_vector___setslice__(self, *args)
1429
-
1430
- def __delslice__(self, i, j):
1431
- return _libQasm.subcircuit_vector___delslice__(self, i, j)
1432
-
1433
- def __delitem__(self, *args):
1434
- return _libQasm.subcircuit_vector___delitem__(self, *args)
1435
-
1436
- def __getitem__(self, *args):
1437
- return _libQasm.subcircuit_vector___getitem__(self, *args)
1438
-
1439
- def __setitem__(self, *args):
1440
- return _libQasm.subcircuit_vector___setitem__(self, *args)
1441
-
1442
- def pop(self):
1443
- return _libQasm.subcircuit_vector_pop(self)
1444
-
1445
- def append(self, x):
1446
- return _libQasm.subcircuit_vector_append(self, x)
1447
-
1448
- def empty(self):
1449
- return _libQasm.subcircuit_vector_empty(self)
1450
-
1451
- def size(self):
1452
- return _libQasm.subcircuit_vector_size(self)
1453
-
1454
- def swap(self, v):
1455
- return _libQasm.subcircuit_vector_swap(self, v)
1456
-
1457
- def begin(self):
1458
- return _libQasm.subcircuit_vector_begin(self)
1459
-
1460
- def end(self):
1461
- return _libQasm.subcircuit_vector_end(self)
1462
-
1463
- def rbegin(self):
1464
- return _libQasm.subcircuit_vector_rbegin(self)
1465
-
1466
- def rend(self):
1467
- return _libQasm.subcircuit_vector_rend(self)
1468
-
1469
- def clear(self):
1470
- return _libQasm.subcircuit_vector_clear(self)
1471
-
1472
- def get_allocator(self):
1473
- return _libQasm.subcircuit_vector_get_allocator(self)
1474
-
1475
- def pop_back(self):
1476
- return _libQasm.subcircuit_vector_pop_back(self)
1477
-
1478
- def erase(self, *args):
1479
- return _libQasm.subcircuit_vector_erase(self, *args)
1480
-
1481
- def __init__(self, *args):
1482
- _libQasm.subcircuit_vector_swiginit(self, _libQasm.new_subcircuit_vector(*args))
1483
-
1484
- def push_back(self, x):
1485
- return _libQasm.subcircuit_vector_push_back(self, x)
1486
-
1487
- def front(self):
1488
- return _libQasm.subcircuit_vector_front(self)
1489
-
1490
- def back(self):
1491
- return _libQasm.subcircuit_vector_back(self)
1492
-
1493
- def assign(self, n, x):
1494
- return _libQasm.subcircuit_vector_assign(self, n, x)
1495
-
1496
- def resize(self, *args):
1497
- return _libQasm.subcircuit_vector_resize(self, *args)
1498
-
1499
- def insert(self, *args):
1500
- return _libQasm.subcircuit_vector_insert(self, *args)
1501
-
1502
- def reserve(self, n):
1503
- return _libQasm.subcircuit_vector_reserve(self, n)
1504
-
1505
- def capacity(self):
1506
- return _libQasm.subcircuit_vector_capacity(self)
1507
- __swig_destroy__ = _libQasm.delete_subcircuit_vector
1508
-
1509
- # Register subcircuit_vector in _libQasm:
1510
- _libQasm.subcircuit_vector_swigregister(subcircuit_vector)
1511
- class operationscluster_vector(object):
1512
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1513
- __repr__ = _swig_repr
1514
-
1515
- def iterator(self):
1516
- return _libQasm.operationscluster_vector_iterator(self)
1517
- def __iter__(self):
1518
- return self.iterator()
1519
-
1520
- def __nonzero__(self):
1521
- return _libQasm.operationscluster_vector___nonzero__(self)
1522
-
1523
- def __bool__(self):
1524
- return _libQasm.operationscluster_vector___bool__(self)
1525
-
1526
- def __len__(self):
1527
- return _libQasm.operationscluster_vector___len__(self)
1528
-
1529
- def __getslice__(self, i, j):
1530
- return _libQasm.operationscluster_vector___getslice__(self, i, j)
1531
-
1532
- def __setslice__(self, *args):
1533
- return _libQasm.operationscluster_vector___setslice__(self, *args)
1534
-
1535
- def __delslice__(self, i, j):
1536
- return _libQasm.operationscluster_vector___delslice__(self, i, j)
1537
-
1538
- def __delitem__(self, *args):
1539
- return _libQasm.operationscluster_vector___delitem__(self, *args)
1540
-
1541
- def __getitem__(self, *args):
1542
- return _libQasm.operationscluster_vector___getitem__(self, *args)
1543
-
1544
- def __setitem__(self, *args):
1545
- return _libQasm.operationscluster_vector___setitem__(self, *args)
1546
-
1547
- def pop(self):
1548
- return _libQasm.operationscluster_vector_pop(self)
1549
-
1550
- def append(self, x):
1551
- return _libQasm.operationscluster_vector_append(self, x)
1552
-
1553
- def empty(self):
1554
- return _libQasm.operationscluster_vector_empty(self)
1555
-
1556
- def size(self):
1557
- return _libQasm.operationscluster_vector_size(self)
1558
-
1559
- def swap(self, v):
1560
- return _libQasm.operationscluster_vector_swap(self, v)
1561
-
1562
- def begin(self):
1563
- return _libQasm.operationscluster_vector_begin(self)
1564
-
1565
- def end(self):
1566
- return _libQasm.operationscluster_vector_end(self)
1567
-
1568
- def rbegin(self):
1569
- return _libQasm.operationscluster_vector_rbegin(self)
1570
-
1571
- def rend(self):
1572
- return _libQasm.operationscluster_vector_rend(self)
1573
-
1574
- def clear(self):
1575
- return _libQasm.operationscluster_vector_clear(self)
1576
-
1577
- def get_allocator(self):
1578
- return _libQasm.operationscluster_vector_get_allocator(self)
1579
-
1580
- def pop_back(self):
1581
- return _libQasm.operationscluster_vector_pop_back(self)
1582
-
1583
- def erase(self, *args):
1584
- return _libQasm.operationscluster_vector_erase(self, *args)
1585
-
1586
- def __init__(self, *args):
1587
- _libQasm.operationscluster_vector_swiginit(self, _libQasm.new_operationscluster_vector(*args))
1588
-
1589
- def push_back(self, x):
1590
- return _libQasm.operationscluster_vector_push_back(self, x)
1591
-
1592
- def front(self):
1593
- return _libQasm.operationscluster_vector_front(self)
1594
-
1595
- def back(self):
1596
- return _libQasm.operationscluster_vector_back(self)
1597
-
1598
- def assign(self, n, x):
1599
- return _libQasm.operationscluster_vector_assign(self, n, x)
1600
-
1601
- def resize(self, *args):
1602
- return _libQasm.operationscluster_vector_resize(self, *args)
1603
-
1604
- def insert(self, *args):
1605
- return _libQasm.operationscluster_vector_insert(self, *args)
1606
-
1607
- def reserve(self, n):
1608
- return _libQasm.operationscluster_vector_reserve(self, n)
1609
-
1610
- def capacity(self):
1611
- return _libQasm.operationscluster_vector_capacity(self)
1612
- __swig_destroy__ = _libQasm.delete_operationscluster_vector
1613
-
1614
- # Register operationscluster_vector in _libQasm:
1615
- _libQasm.operationscluster_vector_swigregister(operationscluster_vector)
1616
- class operation_vector(object):
1617
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1618
- __repr__ = _swig_repr
1619
-
1620
- def iterator(self):
1621
- return _libQasm.operation_vector_iterator(self)
1622
- def __iter__(self):
1623
- return self.iterator()
1624
-
1625
- def __nonzero__(self):
1626
- return _libQasm.operation_vector___nonzero__(self)
1627
-
1628
- def __bool__(self):
1629
- return _libQasm.operation_vector___bool__(self)
1630
-
1631
- def __len__(self):
1632
- return _libQasm.operation_vector___len__(self)
1633
-
1634
- def __getslice__(self, i, j):
1635
- return _libQasm.operation_vector___getslice__(self, i, j)
1636
-
1637
- def __setslice__(self, *args):
1638
- return _libQasm.operation_vector___setslice__(self, *args)
1639
-
1640
- def __delslice__(self, i, j):
1641
- return _libQasm.operation_vector___delslice__(self, i, j)
1642
-
1643
- def __delitem__(self, *args):
1644
- return _libQasm.operation_vector___delitem__(self, *args)
1645
-
1646
- def __getitem__(self, *args):
1647
- return _libQasm.operation_vector___getitem__(self, *args)
1648
-
1649
- def __setitem__(self, *args):
1650
- return _libQasm.operation_vector___setitem__(self, *args)
1651
-
1652
- def pop(self):
1653
- return _libQasm.operation_vector_pop(self)
1654
-
1655
- def append(self, x):
1656
- return _libQasm.operation_vector_append(self, x)
1657
-
1658
- def empty(self):
1659
- return _libQasm.operation_vector_empty(self)
1660
-
1661
- def size(self):
1662
- return _libQasm.operation_vector_size(self)
1663
-
1664
- def swap(self, v):
1665
- return _libQasm.operation_vector_swap(self, v)
1666
-
1667
- def begin(self):
1668
- return _libQasm.operation_vector_begin(self)
1669
-
1670
- def end(self):
1671
- return _libQasm.operation_vector_end(self)
1672
-
1673
- def rbegin(self):
1674
- return _libQasm.operation_vector_rbegin(self)
1675
-
1676
- def rend(self):
1677
- return _libQasm.operation_vector_rend(self)
1678
-
1679
- def clear(self):
1680
- return _libQasm.operation_vector_clear(self)
1681
-
1682
- def get_allocator(self):
1683
- return _libQasm.operation_vector_get_allocator(self)
1684
-
1685
- def pop_back(self):
1686
- return _libQasm.operation_vector_pop_back(self)
1687
-
1688
- def erase(self, *args):
1689
- return _libQasm.operation_vector_erase(self, *args)
1690
-
1691
- def __init__(self, *args):
1692
- _libQasm.operation_vector_swiginit(self, _libQasm.new_operation_vector(*args))
1693
-
1694
- def push_back(self, x):
1695
- return _libQasm.operation_vector_push_back(self, x)
1696
-
1697
- def front(self):
1698
- return _libQasm.operation_vector_front(self)
1699
-
1700
- def back(self):
1701
- return _libQasm.operation_vector_back(self)
1702
-
1703
- def assign(self, n, x):
1704
- return _libQasm.operation_vector_assign(self, n, x)
1705
-
1706
- def resize(self, *args):
1707
- return _libQasm.operation_vector_resize(self, *args)
1708
-
1709
- def insert(self, *args):
1710
- return _libQasm.operation_vector_insert(self, *args)
1711
-
1712
- def reserve(self, n):
1713
- return _libQasm.operation_vector_reserve(self, n)
1714
-
1715
- def capacity(self):
1716
- return _libQasm.operation_vector_capacity(self)
1717
- __swig_destroy__ = _libQasm.delete_operation_vector
1718
-
1719
- # Register operation_vector in _libQasm:
1720
- _libQasm.operation_vector_swigregister(operation_vector)
1721
- class twoqubitgatequbits_pair(object):
1722
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1723
- __repr__ = _swig_repr
1724
-
1725
- def __init__(self, *args):
1726
- _libQasm.twoqubitgatequbits_pair_swiginit(self, _libQasm.new_twoqubitgatequbits_pair(*args))
1727
- first = property(_libQasm.twoqubitgatequbits_pair_first_get, _libQasm.twoqubitgatequbits_pair_first_set)
1728
- second = property(_libQasm.twoqubitgatequbits_pair_second_get, _libQasm.twoqubitgatequbits_pair_second_set)
1729
- def __len__(self):
1730
- return 2
1731
- def __repr__(self):
1732
- return str((self.first, self.second))
1733
- def __getitem__(self, index):
1734
- if not (index % 2):
1735
- return self.first
1736
- else:
1737
- return self.second
1738
- def __setitem__(self, index, val):
1739
- if not (index % 2):
1740
- self.first = val
1741
- else:
1742
- self.second = val
1743
- __swig_destroy__ = _libQasm.delete_twoqubitgatequbits_pair
1744
-
1745
- # Register twoqubitgatequbits_pair in _libQasm:
1746
- _libQasm.twoqubitgatequbits_pair_swigregister(twoqubitgatequbits_pair)
1747
- class toffoliqubits_pair(object):
1748
- thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
1749
- __repr__ = _swig_repr
1750
-
1751
- def __init__(self, *args):
1752
- _libQasm.toffoliqubits_pair_swiginit(self, _libQasm.new_toffoliqubits_pair(*args))
1753
- first = property(_libQasm.toffoliqubits_pair_first_get, _libQasm.toffoliqubits_pair_first_set)
1754
- second = property(_libQasm.toffoliqubits_pair_second_get, _libQasm.toffoliqubits_pair_second_set)
1755
- def __len__(self):
1756
- return 2
1757
- def __repr__(self):
1758
- return str((self.first, self.second))
1759
- def __getitem__(self, index):
1760
- if not (index % 2):
1761
- return self.first
1762
- else:
1763
- return self.second
1764
- def __setitem__(self, index, val):
1765
- if not (index % 2):
1766
- self.first = val
1767
- else:
1768
- self.second = val
1769
- __swig_destroy__ = _libQasm.delete_toffoliqubits_pair
1770
-
1771
- # Register toffoliqubits_pair in _libQasm:
1772
- _libQasm.toffoliqubits_pair_swigregister(toffoliqubits_pair)
1773
1082