qiskit 1.3.1__cp39-abi3-win32.whl → 1.3.2__cp39-abi3-win32.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.
- qiskit/VERSION.txt +1 -1
- qiskit/_accelerate.pyd +0 -0
- qiskit/circuit/__init__.py +2 -0
- qiskit/circuit/controlledgate.py +2 -0
- qiskit/circuit/library/__init__.py +1 -0
- qiskit/circuit/library/arithmetic/piecewise_chebyshev.py +1 -0
- qiskit/circuit/library/basis_change/qft.py +3 -0
- qiskit/circuit/library/boolean_logic/inner_product.py +2 -0
- qiskit/circuit/library/boolean_logic/quantum_and.py +4 -0
- qiskit/circuit/library/boolean_logic/quantum_or.py +4 -0
- qiskit/circuit/library/boolean_logic/quantum_xor.py +2 -0
- qiskit/circuit/library/fourier_checking.py +2 -0
- qiskit/circuit/library/generalized_gates/gms.py +1 -0
- qiskit/circuit/library/generalized_gates/gr.py +4 -0
- qiskit/circuit/library/generalized_gates/mcmt.py +1 -0
- qiskit/circuit/library/generalized_gates/permutation.py +5 -1
- qiskit/circuit/library/generalized_gates/unitary.py +1 -1
- qiskit/circuit/library/graph_state.py +2 -0
- qiskit/circuit/library/grover_operator.py +7 -3
- qiskit/circuit/library/hidden_linear_function.py +2 -0
- qiskit/circuit/library/iqp.py +5 -0
- qiskit/circuit/library/n_local/efficient_su2.py +7 -2
- qiskit/circuit/library/n_local/evolved_operator_ansatz.py +3 -0
- qiskit/circuit/library/n_local/excitation_preserving.py +14 -8
- qiskit/circuit/library/n_local/n_local.py +10 -5
- qiskit/circuit/library/n_local/pauli_two_design.py +5 -2
- qiskit/circuit/library/n_local/qaoa_ansatz.py +1 -0
- qiskit/circuit/library/n_local/real_amplitudes.py +10 -4
- qiskit/circuit/library/overlap.py +1 -0
- qiskit/circuit/library/phase_estimation.py +2 -0
- qiskit/circuit/library/quantum_volume.py +3 -0
- qiskit/circuit/operation.py +1 -0
- qiskit/circuit/parameter.py +1 -0
- qiskit/circuit/parameterexpression.py +1 -1
- qiskit/circuit/quantumcircuit.py +13 -19
- qiskit/circuit/random/utils.py +2 -0
- qiskit/converters/dag_to_circuit.py +1 -0
- qiskit/primitives/statevector_estimator.py +1 -0
- qiskit/providers/fake_provider/__init__.py +1 -0
- qiskit/pulse/builder.py +8 -0
- qiskit/pulse/library/symbolic_pulses.py +1 -0
- qiskit/qasm2/export.py +2 -2
- qiskit/qasm3/__init__.py +1 -0
- qiskit/qasm3/exporter.py +6 -3
- qiskit/quantum_info/operators/symplectic/pauli_list.py +8 -8
- qiskit/quantum_info/operators/symplectic/sparse_pauli_op.py +10 -1
- qiskit/quantum_info/states/statevector.py +1 -0
- qiskit/synthesis/arithmetic/multipliers/hrs_cumulative_multiplier.py +1 -0
- qiskit/synthesis/arithmetic/multipliers/rg_qft_multiplier.py +1 -0
- qiskit/synthesis/evolution/product_formula.py +0 -6
- qiskit/synthesis/evolution/suzuki_trotter.py +22 -5
- qiskit/transpiler/__init__.py +22 -1
- qiskit/transpiler/layout.py +3 -0
- qiskit/transpiler/passes/routing/star_prerouting.py +1 -0
- qiskit/transpiler/passes/scheduling/dynamical_decoupling.py +1 -0
- qiskit/transpiler/passes/scheduling/padding/dynamical_decoupling.py +1 -0
- qiskit/transpiler/passes/synthesis/hls_plugins.py +48 -9
- qiskit/transpiler/passes/utils/filter_op_nodes.py +2 -1
- qiskit/transpiler/passes/utils/remove_barriers.py +1 -0
- qiskit/transpiler/preset_passmanagers/__init__.py +5 -5
- qiskit/transpiler/preset_passmanagers/builtin_plugins.py +19 -22
- qiskit/transpiler/target.py +1 -1
- qiskit/visualization/__init__.py +6 -0
- qiskit/visualization/circuit/circuit_visualization.py +1 -0
- qiskit/visualization/counts_visualization.py +2 -0
- qiskit/visualization/dag_visualization.py +1 -0
- qiskit/visualization/gate_map.py +7 -3
- qiskit/visualization/pulse_v2/interface.py +4 -1
- qiskit/visualization/state_visualization.py +13 -2
- qiskit/visualization/timeline/interface.py +6 -3
- {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/METADATA +17 -17
- {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/RECORD +76 -76
- {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/WHEEL +1 -1
- {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/LICENSE.txt +0 -0
- {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/entry_points.txt +0 -0
- {qiskit-1.3.1.dist-info → qiskit-1.3.2.dist-info}/top_level.txt +0 -0
@@ -420,12 +420,13 @@ from qiskit.circuit.library import (
|
|
420
420
|
C3XGate,
|
421
421
|
C4XGate,
|
422
422
|
PauliEvolutionGate,
|
423
|
+
PermutationGate,
|
424
|
+
MCMTGate,
|
423
425
|
ModularAdderGate,
|
424
426
|
HalfAdderGate,
|
425
427
|
FullAdderGate,
|
426
428
|
MultiplierGate,
|
427
429
|
)
|
428
|
-
from qiskit.transpiler.exceptions import TranspilerError
|
429
430
|
from qiskit.transpiler.coupling import CouplingMap
|
430
431
|
|
431
432
|
from qiskit.synthesis.clifford import (
|
@@ -467,6 +468,7 @@ from qiskit.synthesis.arithmetic import (
|
|
467
468
|
multiplier_qft_r17,
|
468
469
|
multiplier_cumulative_h18,
|
469
470
|
)
|
471
|
+
from qiskit.quantum_info.operators import Clifford
|
470
472
|
from qiskit.transpiler.passes.routing.algorithms import ApproximateTokenSwapper
|
471
473
|
from .plugin import HighLevelSynthesisPlugin
|
472
474
|
|
@@ -484,6 +486,9 @@ class DefaultSynthesisClifford(HighLevelSynthesisPlugin):
|
|
484
486
|
|
485
487
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
486
488
|
"""Run synthesis for the given Clifford."""
|
489
|
+
if not isinstance(high_level_object, Clifford):
|
490
|
+
return None
|
491
|
+
|
487
492
|
decomposition = synth_clifford_full(high_level_object)
|
488
493
|
return decomposition
|
489
494
|
|
@@ -497,6 +502,9 @@ class AGSynthesisClifford(HighLevelSynthesisPlugin):
|
|
497
502
|
|
498
503
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
499
504
|
"""Run synthesis for the given Clifford."""
|
505
|
+
if not isinstance(high_level_object, Clifford):
|
506
|
+
return None
|
507
|
+
|
500
508
|
decomposition = synth_clifford_ag(high_level_object)
|
501
509
|
return decomposition
|
502
510
|
|
@@ -513,10 +521,14 @@ class BMSynthesisClifford(HighLevelSynthesisPlugin):
|
|
513
521
|
|
514
522
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
515
523
|
"""Run synthesis for the given Clifford."""
|
524
|
+
if not isinstance(high_level_object, Clifford):
|
525
|
+
return None
|
526
|
+
|
516
527
|
if high_level_object.num_qubits <= 3:
|
517
528
|
decomposition = synth_clifford_bm(high_level_object)
|
518
529
|
else:
|
519
530
|
decomposition = None
|
531
|
+
|
520
532
|
return decomposition
|
521
533
|
|
522
534
|
|
@@ -530,6 +542,9 @@ class GreedySynthesisClifford(HighLevelSynthesisPlugin):
|
|
530
542
|
|
531
543
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
532
544
|
"""Run synthesis for the given Clifford."""
|
545
|
+
if not isinstance(high_level_object, Clifford):
|
546
|
+
return None
|
547
|
+
|
533
548
|
decomposition = synth_clifford_greedy(high_level_object)
|
534
549
|
return decomposition
|
535
550
|
|
@@ -544,6 +559,9 @@ class LayerSynthesisClifford(HighLevelSynthesisPlugin):
|
|
544
559
|
|
545
560
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
546
561
|
"""Run synthesis for the given Clifford."""
|
562
|
+
if not isinstance(high_level_object, Clifford):
|
563
|
+
return None
|
564
|
+
|
547
565
|
decomposition = synth_clifford_layers(high_level_object)
|
548
566
|
return decomposition
|
549
567
|
|
@@ -559,6 +577,9 @@ class LayerLnnSynthesisClifford(HighLevelSynthesisPlugin):
|
|
559
577
|
|
560
578
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
561
579
|
"""Run synthesis for the given Clifford."""
|
580
|
+
if not isinstance(high_level_object, Clifford):
|
581
|
+
return None
|
582
|
+
|
562
583
|
decomposition = synth_clifford_depth_lnn(high_level_object)
|
563
584
|
return decomposition
|
564
585
|
|
@@ -572,6 +593,9 @@ class DefaultSynthesisLinearFunction(HighLevelSynthesisPlugin):
|
|
572
593
|
|
573
594
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
574
595
|
"""Run synthesis for the given LinearFunction."""
|
596
|
+
if not isinstance(high_level_object, LinearFunction):
|
597
|
+
return None
|
598
|
+
|
575
599
|
decomposition = synth_cnot_count_full_pmh(high_level_object.linear)
|
576
600
|
return decomposition
|
577
601
|
|
@@ -595,11 +619,8 @@ class KMSSynthesisLinearFunction(HighLevelSynthesisPlugin):
|
|
595
619
|
|
596
620
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
597
621
|
"""Run synthesis for the given LinearFunction."""
|
598
|
-
|
599
622
|
if not isinstance(high_level_object, LinearFunction):
|
600
|
-
|
601
|
-
"PMHSynthesisLinearFunction only accepts objects of type LinearFunction"
|
602
|
-
)
|
623
|
+
return None
|
603
624
|
|
604
625
|
use_inverted = options.get("use_inverted", False)
|
605
626
|
use_transposed = options.get("use_transposed", False)
|
@@ -646,11 +667,8 @@ class PMHSynthesisLinearFunction(HighLevelSynthesisPlugin):
|
|
646
667
|
|
647
668
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
648
669
|
"""Run synthesis for the given LinearFunction."""
|
649
|
-
|
650
670
|
if not isinstance(high_level_object, LinearFunction):
|
651
|
-
|
652
|
-
"PMHSynthesisLinearFunction only accepts objects of type LinearFunction"
|
653
|
-
)
|
671
|
+
return None
|
654
672
|
|
655
673
|
section_size = options.get("section_size", 2)
|
656
674
|
use_inverted = options.get("use_inverted", False)
|
@@ -682,6 +700,9 @@ class KMSSynthesisPermutation(HighLevelSynthesisPlugin):
|
|
682
700
|
|
683
701
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
684
702
|
"""Run synthesis for the given Permutation."""
|
703
|
+
if not isinstance(high_level_object, PermutationGate):
|
704
|
+
return None
|
705
|
+
|
685
706
|
decomposition = synth_permutation_depth_lnn_kms(high_level_object.pattern)
|
686
707
|
return decomposition
|
687
708
|
|
@@ -695,6 +716,9 @@ class BasicSynthesisPermutation(HighLevelSynthesisPlugin):
|
|
695
716
|
|
696
717
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
697
718
|
"""Run synthesis for the given Permutation."""
|
719
|
+
if not isinstance(high_level_object, PermutationGate):
|
720
|
+
return None
|
721
|
+
|
698
722
|
decomposition = synth_permutation_basic(high_level_object.pattern)
|
699
723
|
return decomposition
|
700
724
|
|
@@ -708,6 +732,9 @@ class ACGSynthesisPermutation(HighLevelSynthesisPlugin):
|
|
708
732
|
|
709
733
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
710
734
|
"""Run synthesis for the given Permutation."""
|
735
|
+
if not isinstance(high_level_object, PermutationGate):
|
736
|
+
return None
|
737
|
+
|
711
738
|
decomposition = synth_permutation_acg(high_level_object.pattern)
|
712
739
|
return decomposition
|
713
740
|
|
@@ -858,6 +885,9 @@ class TokenSwapperSynthesisPermutation(HighLevelSynthesisPlugin):
|
|
858
885
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
859
886
|
"""Run synthesis for the given Permutation."""
|
860
887
|
|
888
|
+
if not isinstance(high_level_object, PermutationGate):
|
889
|
+
return None
|
890
|
+
|
861
891
|
trials = options.get("trials", 5)
|
862
892
|
seed = options.get("seed", 0)
|
863
893
|
parallel_threshold = options.get("parallel_threshold", 50)
|
@@ -1156,6 +1186,9 @@ class MCMTSynthesisDefault(HighLevelSynthesisPlugin):
|
|
1156
1186
|
|
1157
1187
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
1158
1188
|
# first try to use the V-chain synthesis if enough auxiliary qubits are available
|
1189
|
+
if not isinstance(high_level_object, MCMTGate):
|
1190
|
+
return None
|
1191
|
+
|
1159
1192
|
if (
|
1160
1193
|
decomposition := MCMTSynthesisVChain().run(
|
1161
1194
|
high_level_object, coupling_map, target, qubits, **options
|
@@ -1170,6 +1203,9 @@ class MCMTSynthesisNoAux(HighLevelSynthesisPlugin):
|
|
1170
1203
|
"""A V-chain based synthesis for ``MCMTGate``."""
|
1171
1204
|
|
1172
1205
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
1206
|
+
if not isinstance(high_level_object, MCMTGate):
|
1207
|
+
return None
|
1208
|
+
|
1173
1209
|
base_gate = high_level_object.base_gate
|
1174
1210
|
ctrl_state = options.get("ctrl_state", None)
|
1175
1211
|
|
@@ -1195,6 +1231,9 @@ class MCMTSynthesisVChain(HighLevelSynthesisPlugin):
|
|
1195
1231
|
"""A V-chain based synthesis for ``MCMTGate``."""
|
1196
1232
|
|
1197
1233
|
def run(self, high_level_object, coupling_map=None, target=None, qubits=None, **options):
|
1234
|
+
if not isinstance(high_level_object, MCMTGate):
|
1235
|
+
return None
|
1236
|
+
|
1198
1237
|
if options.get("num_clean_ancillas", 0) < high_level_object.num_ctrl_qubits - 1:
|
1199
1238
|
return None # insufficient number of auxiliary qubits
|
1200
1239
|
|
@@ -35,9 +35,10 @@ class FilterOpNodes(TransformationPass):
|
|
35
35
|
|
36
36
|
Example:
|
37
37
|
|
38
|
-
Filter out operations that are
|
38
|
+
Filter out operations that are labeled ``"foo"``
|
39
39
|
|
40
40
|
.. plot::
|
41
|
+
:alt: Circuit diagram output by the previous code.
|
41
42
|
:include-source:
|
42
43
|
|
43
44
|
from qiskit import QuantumCircuit
|
@@ -23,11 +23,11 @@ for the transpiler. The preset pass managers are instances of
|
|
23
23
|
transformations as part of Qiskit's compiler inside the
|
24
24
|
:func:`~.transpile` function at the different optimization levels, but
|
25
25
|
can also be used in a standalone manner.
|
26
|
-
The functionality here is divided into two parts
|
27
|
-
functions used generate the entire pass manager which is used by
|
28
|
-
:func:`~.transpile` (:ref:`preset_pass_manager_generators`) and the
|
29
|
-
second includes functions
|
30
|
-
part) the stages
|
26
|
+
The functionality here is divided into two parts. The first includes the
|
27
|
+
functions used to generate the entire pass manager, which is used by
|
28
|
+
:func:`~.transpile` (:ref:`preset_pass_manager_generators`), and the
|
29
|
+
second includes functions that are used to build (either entirely or in
|
30
|
+
part) the stages that comprise the preset pass managers
|
31
31
|
(:ref:`stage_generators`).
|
32
32
|
|
33
33
|
.. _preset_pass_manager_generators:
|
@@ -238,7 +238,6 @@ class BasicSwapPassManager(PassManagerStagePlugin):
|
|
238
238
|
|
239
239
|
def pass_manager(self, pass_manager_config, optimization_level=None) -> PassManager:
|
240
240
|
"""Build routing stage PassManager."""
|
241
|
-
seed_transpiler = pass_manager_config.seed_transpiler
|
242
241
|
target = pass_manager_config.target
|
243
242
|
coupling_map = pass_manager_config.coupling_map
|
244
243
|
backend_properties = pass_manager_config.backend_properties
|
@@ -257,7 +256,7 @@ class BasicSwapPassManager(PassManagerStagePlugin):
|
|
257
256
|
routing_pass,
|
258
257
|
target,
|
259
258
|
coupling_map=coupling_map,
|
260
|
-
seed_transpiler
|
259
|
+
seed_transpiler=-1,
|
261
260
|
use_barrier_before_measurement=True,
|
262
261
|
)
|
263
262
|
if optimization_level == 1:
|
@@ -268,7 +267,7 @@ class BasicSwapPassManager(PassManagerStagePlugin):
|
|
268
267
|
vf2_call_limit=vf2_call_limit,
|
269
268
|
vf2_max_trials=vf2_max_trials,
|
270
269
|
backend_properties=backend_properties,
|
271
|
-
seed_transpiler
|
270
|
+
seed_transpiler=-1,
|
272
271
|
check_trivial=True,
|
273
272
|
use_barrier_before_measurement=True,
|
274
273
|
)
|
@@ -280,7 +279,7 @@ class BasicSwapPassManager(PassManagerStagePlugin):
|
|
280
279
|
vf2_call_limit=vf2_call_limit,
|
281
280
|
vf2_max_trials=vf2_max_trials,
|
282
281
|
backend_properties=backend_properties,
|
283
|
-
seed_transpiler
|
282
|
+
seed_transpiler=-1,
|
284
283
|
use_barrier_before_measurement=True,
|
285
284
|
)
|
286
285
|
if optimization_level == 3:
|
@@ -291,7 +290,7 @@ class BasicSwapPassManager(PassManagerStagePlugin):
|
|
291
290
|
vf2_call_limit=vf2_call_limit,
|
292
291
|
vf2_max_trials=vf2_max_trials,
|
293
292
|
backend_properties=backend_properties,
|
294
|
-
seed_transpiler
|
293
|
+
seed_transpiler=-1,
|
295
294
|
use_barrier_before_measurement=True,
|
296
295
|
)
|
297
296
|
raise TranspilerError(f"Invalid optimization level specified: {optimization_level}")
|
@@ -324,7 +323,7 @@ class StochasticSwapPassManager(PassManagerStagePlugin):
|
|
324
323
|
routing_pass,
|
325
324
|
target,
|
326
325
|
coupling_map=coupling_map,
|
327
|
-
seed_transpiler
|
326
|
+
seed_transpiler=-1,
|
328
327
|
use_barrier_before_measurement=True,
|
329
328
|
)
|
330
329
|
if optimization_level == 1:
|
@@ -335,7 +334,7 @@ class StochasticSwapPassManager(PassManagerStagePlugin):
|
|
335
334
|
vf2_call_limit=vf2_call_limit,
|
336
335
|
vf2_max_trials=vf2_max_trials,
|
337
336
|
backend_properties=backend_properties,
|
338
|
-
seed_transpiler
|
337
|
+
seed_transpiler=-1,
|
339
338
|
check_trivial=True,
|
340
339
|
use_barrier_before_measurement=True,
|
341
340
|
)
|
@@ -347,7 +346,7 @@ class StochasticSwapPassManager(PassManagerStagePlugin):
|
|
347
346
|
vf2_call_limit=vf2_call_limit,
|
348
347
|
vf2_max_trials=vf2_max_trials,
|
349
348
|
backend_properties=backend_properties,
|
350
|
-
seed_transpiler
|
349
|
+
seed_transpiler=-1,
|
351
350
|
use_barrier_before_measurement=True,
|
352
351
|
)
|
353
352
|
raise TranspilerError(f"Invalid optimization level specified: {optimization_level}")
|
@@ -358,7 +357,6 @@ class LookaheadSwapPassManager(PassManagerStagePlugin):
|
|
358
357
|
|
359
358
|
def pass_manager(self, pass_manager_config, optimization_level=None) -> PassManager:
|
360
359
|
"""Build routing stage PassManager."""
|
361
|
-
seed_transpiler = pass_manager_config.seed_transpiler
|
362
360
|
target = pass_manager_config.target
|
363
361
|
coupling_map = pass_manager_config.coupling_map
|
364
362
|
coupling_map_routing = target
|
@@ -376,7 +374,7 @@ class LookaheadSwapPassManager(PassManagerStagePlugin):
|
|
376
374
|
routing_pass,
|
377
375
|
target,
|
378
376
|
coupling_map=coupling_map,
|
379
|
-
seed_transpiler
|
377
|
+
seed_transpiler=-1,
|
380
378
|
use_barrier_before_measurement=True,
|
381
379
|
)
|
382
380
|
if optimization_level == 1:
|
@@ -388,7 +386,7 @@ class LookaheadSwapPassManager(PassManagerStagePlugin):
|
|
388
386
|
vf2_call_limit=vf2_call_limit,
|
389
387
|
vf2_max_trials=vf2_max_trials,
|
390
388
|
backend_properties=backend_properties,
|
391
|
-
seed_transpiler
|
389
|
+
seed_transpiler=-1,
|
392
390
|
check_trivial=True,
|
393
391
|
use_barrier_before_measurement=True,
|
394
392
|
)
|
@@ -401,7 +399,7 @@ class LookaheadSwapPassManager(PassManagerStagePlugin):
|
|
401
399
|
vf2_call_limit=vf2_call_limit,
|
402
400
|
vf2_max_trials=vf2_max_trials,
|
403
401
|
backend_properties=backend_properties,
|
404
|
-
seed_transpiler
|
402
|
+
seed_transpiler=-1,
|
405
403
|
use_barrier_before_measurement=True,
|
406
404
|
)
|
407
405
|
if optimization_level == 3:
|
@@ -413,7 +411,7 @@ class LookaheadSwapPassManager(PassManagerStagePlugin):
|
|
413
411
|
vf2_call_limit=vf2_call_limit,
|
414
412
|
vf2_max_trials=vf2_max_trials,
|
415
413
|
backend_properties=backend_properties,
|
416
|
-
seed_transpiler
|
414
|
+
seed_transpiler=-1,
|
417
415
|
use_barrier_before_measurement=True,
|
418
416
|
)
|
419
417
|
raise TranspilerError(f"Invalid optimization level specified: {optimization_level}")
|
@@ -448,7 +446,7 @@ class SabreSwapPassManager(PassManagerStagePlugin):
|
|
448
446
|
routing_pass,
|
449
447
|
target,
|
450
448
|
coupling_map=coupling_map,
|
451
|
-
seed_transpiler
|
449
|
+
seed_transpiler=-1,
|
452
450
|
use_barrier_before_measurement=True,
|
453
451
|
)
|
454
452
|
if optimization_level == 1:
|
@@ -466,7 +464,7 @@ class SabreSwapPassManager(PassManagerStagePlugin):
|
|
466
464
|
vf2_call_limit=vf2_call_limit,
|
467
465
|
vf2_max_trials=vf2_max_trials,
|
468
466
|
backend_properties=backend_properties,
|
469
|
-
seed_transpiler
|
467
|
+
seed_transpiler=-1,
|
470
468
|
check_trivial=True,
|
471
469
|
use_barrier_before_measurement=True,
|
472
470
|
)
|
@@ -486,7 +484,7 @@ class SabreSwapPassManager(PassManagerStagePlugin):
|
|
486
484
|
vf2_call_limit=vf2_call_limit,
|
487
485
|
vf2_max_trials=vf2_max_trials,
|
488
486
|
backend_properties=backend_properties,
|
489
|
-
seed_transpiler
|
487
|
+
seed_transpiler=-1,
|
490
488
|
use_barrier_before_measurement=True,
|
491
489
|
)
|
492
490
|
if optimization_level == 3:
|
@@ -504,7 +502,7 @@ class SabreSwapPassManager(PassManagerStagePlugin):
|
|
504
502
|
vf2_call_limit=vf2_call_limit,
|
505
503
|
vf2_max_trials=vf2_max_trials,
|
506
504
|
backend_properties=backend_properties,
|
507
|
-
seed_transpiler
|
505
|
+
seed_transpiler=-1,
|
508
506
|
use_barrier_before_measurement=True,
|
509
507
|
)
|
510
508
|
raise TranspilerError(f"Invalid optimization level specified: {optimization_level}")
|
@@ -515,7 +513,6 @@ class NoneRoutingPassManager(PassManagerStagePlugin):
|
|
515
513
|
|
516
514
|
def pass_manager(self, pass_manager_config, optimization_level=None) -> PassManager:
|
517
515
|
"""Build routing stage PassManager."""
|
518
|
-
seed_transpiler = pass_manager_config.seed_transpiler
|
519
516
|
target = pass_manager_config.target
|
520
517
|
coupling_map = pass_manager_config.coupling_map
|
521
518
|
routing_pass = Error(
|
@@ -527,7 +524,7 @@ class NoneRoutingPassManager(PassManagerStagePlugin):
|
|
527
524
|
routing_pass,
|
528
525
|
target,
|
529
526
|
coupling_map=coupling_map,
|
530
|
-
seed_transpiler
|
527
|
+
seed_transpiler=-1,
|
531
528
|
use_barrier_before_measurement=True,
|
532
529
|
)
|
533
530
|
|
@@ -793,7 +790,7 @@ class DefaultLayoutPassManager(PassManagerStagePlugin):
|
|
793
790
|
)
|
794
791
|
choose_layout_1 = VF2Layout(
|
795
792
|
coupling_map=pass_manager_config.coupling_map,
|
796
|
-
seed
|
793
|
+
seed=-1,
|
797
794
|
call_limit=int(5e4), # Set call limit to ~100ms with rustworkx 0.10.2
|
798
795
|
properties=pass_manager_config.backend_properties,
|
799
796
|
target=pass_manager_config.target,
|
@@ -826,7 +823,7 @@ class DefaultLayoutPassManager(PassManagerStagePlugin):
|
|
826
823
|
elif optimization_level == 2:
|
827
824
|
choose_layout_0 = VF2Layout(
|
828
825
|
coupling_map=pass_manager_config.coupling_map,
|
829
|
-
seed
|
826
|
+
seed=-1,
|
830
827
|
call_limit=int(5e6), # Set call limit to ~10s with rustworkx 0.10.2
|
831
828
|
properties=pass_manager_config.backend_properties,
|
832
829
|
target=pass_manager_config.target,
|
@@ -861,7 +858,7 @@ class DefaultLayoutPassManager(PassManagerStagePlugin):
|
|
861
858
|
elif optimization_level == 3:
|
862
859
|
choose_layout_0 = VF2Layout(
|
863
860
|
coupling_map=pass_manager_config.coupling_map,
|
864
|
-
seed
|
861
|
+
seed=-1,
|
865
862
|
call_limit=int(3e7), # Set call limit to ~60s with rustworkx 0.10.2
|
866
863
|
properties=pass_manager_config.backend_properties,
|
867
864
|
target=pass_manager_config.target,
|
qiskit/transpiler/target.py
CHANGED
@@ -725,7 +725,7 @@ class Target(BaseTarget):
|
|
725
725
|
|
726
726
|
@property
|
727
727
|
def instructions(self):
|
728
|
-
"""Get the list of tuples
|
728
|
+
"""Get the list of tuples (:class:`~qiskit.circuit.Instruction`, (qargs))
|
729
729
|
for the target
|
730
730
|
|
731
731
|
For globally defined variable width operations the tuple will be of the form
|
qiskit/visualization/__init__.py
CHANGED
@@ -47,6 +47,7 @@ individual documentation for exact details.
|
|
47
47
|
The following example demonstrates the common usage of these arguments:
|
48
48
|
|
49
49
|
.. plot::
|
50
|
+
:alt: Output from the previous code.
|
50
51
|
:include-source:
|
51
52
|
|
52
53
|
from qiskit.visualization import plot_histogram
|
@@ -60,6 +61,7 @@ The following example demonstrates the common usage of these arguments:
|
|
60
61
|
You can specify ``legend``, ``title``, ``figsize`` and ``color`` by passing to the kwargs.
|
61
62
|
|
62
63
|
.. plot::
|
64
|
+
:alt: Output from the previous code.
|
63
65
|
:include-source:
|
64
66
|
|
65
67
|
from qiskit.visualization import plot_histogram
|
@@ -101,6 +103,7 @@ Example Usage
|
|
101
103
|
Here is an example of using :func:`plot_histogram` to visualize measurement outcome counts:
|
102
104
|
|
103
105
|
.. plot::
|
106
|
+
:alt: Output from the previous code.
|
104
107
|
:include-source:
|
105
108
|
|
106
109
|
from qiskit.visualization import plot_histogram
|
@@ -142,6 +145,7 @@ Example Usage
|
|
142
145
|
Here is an example of using :func:`plot_state_city` to visualize a quantum state:
|
143
146
|
|
144
147
|
.. plot::
|
148
|
+
:alt: Output from the previous code.
|
145
149
|
:include-source:
|
146
150
|
|
147
151
|
from qiskit.visualization import plot_state_city
|
@@ -155,6 +159,7 @@ The state can be array-like list of lists, ``numpy.array``, or more commonly
|
|
155
159
|
obtained from a :class:`~qiskit.circuit.QuantumCircuit`:
|
156
160
|
|
157
161
|
.. plot::
|
162
|
+
:alt: Output from the previous code.
|
158
163
|
:include-source:
|
159
164
|
|
160
165
|
from qiskit import QuantumCircuit
|
@@ -170,6 +175,7 @@ obtained from a :class:`~qiskit.circuit.QuantumCircuit`:
|
|
170
175
|
plot_state_city(state)
|
171
176
|
|
172
177
|
.. plot::
|
178
|
+
:alt: Output from the previous code.
|
173
179
|
:include-source:
|
174
180
|
|
175
181
|
from qiskit import QuantumCircuit
|
@@ -111,6 +111,7 @@ def plot_histogram(
|
|
111
111
|
|
112
112
|
Examples:
|
113
113
|
.. plot::
|
114
|
+
:alt: Output from the previous code.
|
114
115
|
:include-source:
|
115
116
|
|
116
117
|
# Plot two counts in the same figure with legends and colors specified.
|
@@ -215,6 +216,7 @@ def plot_distribution(
|
|
215
216
|
|
216
217
|
Examples:
|
217
218
|
.. plot::
|
219
|
+
:alt: Output from the previous code.
|
218
220
|
:include-source:
|
219
221
|
|
220
222
|
# Plot two counts in the same figure with legends and colors specified.
|
qiskit/visualization/gate_map.py
CHANGED
@@ -75,13 +75,14 @@ def plot_gate_map(
|
|
75
75
|
Figure: A Matplotlib figure instance.
|
76
76
|
|
77
77
|
Raises:
|
78
|
-
QiskitError:
|
78
|
+
QiskitError: If you tried to pass a simulator or the backend is None,
|
79
79
|
but one of num_qubits, mpl_data, or cmap is None.
|
80
|
-
MissingOptionalLibraryError:
|
80
|
+
MissingOptionalLibraryError: If matplotlib not installed.
|
81
81
|
|
82
82
|
Example:
|
83
83
|
|
84
84
|
.. plot::
|
85
|
+
:alt: Output from the previous code.
|
85
86
|
:include-source:
|
86
87
|
|
87
88
|
from qiskit.providers.fake_provider import GenericBackendV2
|
@@ -997,11 +998,12 @@ def plot_coupling_map(
|
|
997
998
|
|
998
999
|
Raises:
|
999
1000
|
MissingOptionalLibraryError: If matplotlib or graphviz is not installed.
|
1000
|
-
QiskitError: If length of qubit labels does not match number of qubits.
|
1001
|
+
QiskitError: If the length of qubit labels does not match the number of qubits.
|
1001
1002
|
|
1002
1003
|
Example:
|
1003
1004
|
|
1004
1005
|
.. plot::
|
1006
|
+
:alt: Output from the previous code.
|
1005
1007
|
:include-source:
|
1006
1008
|
|
1007
1009
|
from qiskit.visualization import plot_coupling_map
|
@@ -1168,6 +1170,7 @@ def plot_circuit_layout(circuit, backend, view="virtual", qubit_coordinates=None
|
|
1168
1170
|
|
1169
1171
|
Example:
|
1170
1172
|
.. plot::
|
1173
|
+
:alt: Output from the previous code.
|
1171
1174
|
:include-source:
|
1172
1175
|
|
1173
1176
|
from qiskit import QuantumCircuit, transpile
|
@@ -1270,6 +1273,7 @@ def plot_error_map(backend, figsize=(15, 12), show_title=True, qubit_coordinates
|
|
1270
1273
|
|
1271
1274
|
Example:
|
1272
1275
|
.. plot::
|
1276
|
+
:alt: Output from the previous code.
|
1273
1277
|
:include-source:
|
1274
1278
|
|
1275
1279
|
from qiskit.visualization import plot_error_map
|
@@ -306,12 +306,13 @@ def draw(
|
|
306
306
|
|
307
307
|
Examples:
|
308
308
|
To visualize a pulse program, you can call this function with set of
|
309
|
-
control arguments. Most of appearance of the output image can be controlled by the
|
309
|
+
control arguments. Most of the appearance of the output image can be controlled by the
|
310
310
|
stylesheet.
|
311
311
|
|
312
312
|
Drawing with the default stylesheet.
|
313
313
|
|
314
314
|
.. plot::
|
315
|
+
:alt: Output from the previous code.
|
315
316
|
:include-source:
|
316
317
|
|
317
318
|
from qiskit import QuantumCircuit, transpile, schedule
|
@@ -330,6 +331,7 @@ def draw(
|
|
330
331
|
Drawing with the stylesheet suited for publication.
|
331
332
|
|
332
333
|
.. plot::
|
334
|
+
:alt: Output from the previous code.
|
333
335
|
:include-source:
|
334
336
|
|
335
337
|
from qiskit import QuantumCircuit, transpile, schedule
|
@@ -348,6 +350,7 @@ def draw(
|
|
348
350
|
Drawing with the stylesheet suited for program debugging.
|
349
351
|
|
350
352
|
.. plot::
|
353
|
+
:alt: Output from the previous code.
|
351
354
|
:include-source:
|
352
355
|
|
353
356
|
from qiskit import QuantumCircuit, transpile, schedule
|