qiskit 1.2.0__cp38-abi3-macosx_10_9_universal2.whl → 1.2.1__cp38-abi3-macosx_10_9_universal2.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.
Files changed (31) hide show
  1. qiskit/VERSION.txt +1 -1
  2. qiskit/_accelerate.abi3.so +0 -0
  3. qiskit/circuit/__init__.py +10 -0
  4. qiskit/circuit/library/basis_change/qft.py +3 -1
  5. qiskit/circuit/library/data_preparation/initializer.py +5 -2
  6. qiskit/circuit/library/data_preparation/state_preparation.py +2 -2
  7. qiskit/circuit/library/standard_gates/__init__.py +32 -25
  8. qiskit/circuit/quantumcircuit.py +39 -14
  9. qiskit/pulse/library/symbolic_pulses.py +4 -3
  10. qiskit/quantum_info/operators/operator.py +24 -0
  11. qiskit/synthesis/clifford/clifford_decompose_bm.py +1 -1
  12. qiskit/synthesis/clifford/clifford_decompose_greedy.py +1 -1
  13. qiskit/synthesis/linear/cnot_synth.py +1 -1
  14. qiskit/synthesis/one_qubit/one_qubit_decompose.py +2 -1
  15. qiskit/synthesis/permutation/permutation_full.py +2 -2
  16. qiskit/synthesis/permutation/permutation_lnn.py +3 -1
  17. qiskit/synthesis/two_qubit/two_qubit_decompose.py +2 -2
  18. qiskit/transpiler/instruction_durations.py +4 -0
  19. qiskit/transpiler/passes/__init__.py +2 -0
  20. qiskit/transpiler/passes/optimization/__init__.py +1 -0
  21. qiskit/transpiler/passes/optimization/hoare_opt.py +12 -8
  22. qiskit/transpiler/passes/optimization/split_2q_unitaries.py +16 -20
  23. qiskit/transpiler/preset_passmanagers/generate_preset_pass_manager.py +9 -0
  24. qiskit/utils/optionals.py +173 -150
  25. qiskit/visualization/gate_map.py +28 -6
  26. {qiskit-1.2.0.dist-info → qiskit-1.2.1.dist-info}/METADATA +1 -1
  27. {qiskit-1.2.0.dist-info → qiskit-1.2.1.dist-info}/RECORD +31 -31
  28. {qiskit-1.2.0.dist-info → qiskit-1.2.1.dist-info}/LICENSE.txt +0 -0
  29. {qiskit-1.2.0.dist-info → qiskit-1.2.1.dist-info}/WHEEL +0 -0
  30. {qiskit-1.2.0.dist-info → qiskit-1.2.1.dist-info}/entry_points.txt +0 -0
  31. {qiskit-1.2.0.dist-info → qiskit-1.2.1.dist-info}/top_level.txt +0 -0
qiskit/VERSION.txt CHANGED
@@ -1 +1 @@
1
- 1.2.0
1
+ 1.2.1
Binary file
@@ -580,6 +580,16 @@ The :class:`Store` instruction is particularly special, in that it allows writin
580
580
  :class:`Qubit` nor :class:`Clbit` operands, but has an explicit :attr:`~Store.lvalue` and
581
581
  :attr:`~Store.rvalue`.
582
582
 
583
+ For example, to determine the parity of a bitstring ``cr`` and store it in another register ``creg``,
584
+ the :class:`Store` instruction can be used in the following way::
585
+
586
+ parity = expr.lift(cr[0])
587
+ for i in range(1,n):
588
+ parity = expr.bit_xor(cr[i], parity)
589
+ qc.store(creg[0], parity)
590
+
591
+
592
+
583
593
  .. autoclass:: Store
584
594
  :show-inheritance:
585
595
  :members:
@@ -315,8 +315,10 @@ class QFTGate(Gate):
315
315
  """
316
316
  super().__init__(name="qft", num_qubits=num_qubits, params=[])
317
317
 
318
- def __array__(self, dtype=complex):
318
+ def __array__(self, dtype=complex, copy=None):
319
319
  """Return a numpy array for the QFTGate."""
320
+ if copy is False:
321
+ raise ValueError("unable to avoid copy while creating an array as requested")
320
322
  n = self.num_qubits
321
323
  nums = np.arange(2**n)
322
324
  outer = np.outer(nums, nums)
@@ -21,6 +21,7 @@ import typing
21
21
  from qiskit.circuit.quantumcircuit import QuantumCircuit
22
22
  from qiskit.circuit.quantumregister import QuantumRegister
23
23
  from qiskit.circuit.instruction import Instruction
24
+ from qiskit.circuit.library.generalized_gates import Isometry
24
25
  from .state_preparation import StatePreparation
25
26
 
26
27
  if typing.TYPE_CHECKING:
@@ -86,9 +87,11 @@ class Initialize(Instruction):
86
87
  """Call to create a circuit with gates that take the desired vector to zero.
87
88
 
88
89
  Returns:
89
- Circuit to take ``self.params`` vector to :math:`|{00\\ldots0}\\rangle`
90
+ QuantumCircuit: circuit to take ``self.params`` vector to :math:`|{00\\ldots0}\\rangle`
90
91
  """
91
- return self._stateprep._gates_to_uncompute()
92
+
93
+ isom = Isometry(self.params, 0, 0)
94
+ return isom._gates_to_uncompute()
92
95
 
93
96
  @property
94
97
  def params(self):
@@ -173,8 +173,8 @@ class StatePreparation(Gate):
173
173
  q = QuantumRegister(self.num_qubits, "q")
174
174
  initialize_circuit = QuantumCircuit(q, name="init_def")
175
175
 
176
- isom = Isometry(self._params_arg, 0, 0)
177
- initialize_circuit.append(isom, q[:])
176
+ isom = Isometry(self.params, 0, 0)
177
+ initialize_circuit.compose(isom.definition, copy=False, inplace=True)
178
178
 
179
179
  # invert the circuit to create the desired vector from zero (assuming
180
180
  # the qubits are in the zero state)
@@ -54,6 +54,13 @@ def get_standard_gate_name_mapping():
54
54
  from qiskit.circuit.delay import Delay
55
55
  from qiskit.circuit.reset import Reset
56
56
 
57
+ lambda_ = Parameter("λ")
58
+ theta = Parameter("ϴ")
59
+ phi = Parameter("φ")
60
+ gamma = Parameter("γ")
61
+ beta = Parameter("β")
62
+ time = Parameter("t")
63
+
57
64
  # Standard gates library mapping, multicontrolled gates not included since they're
58
65
  # variable width
59
66
  gates = [
@@ -61,38 +68,37 @@ def get_standard_gate_name_mapping():
61
68
  SXGate(),
62
69
  XGate(),
63
70
  CXGate(),
64
- RZGate(Parameter("λ")),
65
- RGate(Parameter("ϴ"), Parameter("φ")),
66
- Reset(),
71
+ RZGate(lambda_),
72
+ RGate(theta, phi),
67
73
  C3SXGate(),
68
74
  CCXGate(),
69
75
  DCXGate(),
70
76
  CHGate(),
71
- CPhaseGate(Parameter("ϴ")),
72
- CRXGate(Parameter("ϴ")),
73
- CRYGate(Parameter("ϴ")),
74
- CRZGate(Parameter("ϴ")),
77
+ CPhaseGate(theta),
78
+ CRXGate(theta),
79
+ CRYGate(theta),
80
+ CRZGate(theta),
75
81
  CSwapGate(),
76
82
  CSXGate(),
77
- CUGate(Parameter("ϴ"), Parameter("φ"), Parameter("λ"), Parameter("γ")),
78
- CU1Gate(Parameter("λ")),
79
- CU3Gate(Parameter("ϴ"), Parameter("φ"), Parameter("λ")),
83
+ CUGate(theta, phi, lambda_, gamma),
84
+ CU1Gate(lambda_),
85
+ CU3Gate(theta, phi, lambda_),
80
86
  CYGate(),
81
87
  CZGate(),
82
88
  CCZGate(),
83
- GlobalPhaseGate(Parameter("ϴ")),
89
+ GlobalPhaseGate(theta),
84
90
  HGate(),
85
- PhaseGate(Parameter("ϴ")),
91
+ PhaseGate(theta),
86
92
  RCCXGate(),
87
93
  RC3XGate(),
88
- RXGate(Parameter("ϴ")),
89
- RXXGate(Parameter("ϴ")),
90
- RYGate(Parameter("ϴ")),
91
- RYYGate(Parameter("ϴ")),
92
- RZZGate(Parameter("ϴ")),
93
- RZXGate(Parameter("ϴ")),
94
- XXMinusYYGate(Parameter("ϴ"), Parameter("β")),
95
- XXPlusYYGate(Parameter("ϴ"), Parameter("β")),
94
+ RXGate(theta),
95
+ RXXGate(theta),
96
+ RYGate(theta),
97
+ RYYGate(theta),
98
+ RZZGate(theta),
99
+ RZXGate(theta),
100
+ XXMinusYYGate(theta, beta),
101
+ XXPlusYYGate(theta, beta),
96
102
  ECRGate(),
97
103
  SGate(),
98
104
  SdgGate(),
@@ -103,13 +109,14 @@ def get_standard_gate_name_mapping():
103
109
  SXdgGate(),
104
110
  TGate(),
105
111
  TdgGate(),
106
- UGate(Parameter("ϴ"), Parameter("φ"), Parameter("λ")),
107
- U1Gate(Parameter("λ")),
108
- U2Gate(Parameter("φ"), Parameter("λ")),
109
- U3Gate(Parameter("ϴ"), Parameter("φ"), Parameter("λ")),
112
+ UGate(theta, phi, lambda_),
113
+ U1Gate(lambda_),
114
+ U2Gate(phi, lambda_),
115
+ U3Gate(theta, phi, lambda_),
110
116
  YGate(),
111
117
  ZGate(),
112
- Delay(Parameter("t")),
118
+ Delay(time),
119
+ Reset(),
113
120
  Measure(),
114
121
  ]
115
122
  name_mapping = {gate.name: gate for gate in gates}
@@ -1152,17 +1152,41 @@ class QuantumCircuit:
1152
1152
  """The unit that :attr:`duration` is specified in."""
1153
1153
  self.metadata = {} if metadata is None else metadata
1154
1154
  """Arbitrary user-defined metadata for the circuit.
1155
-
1155
+
1156
1156
  Qiskit will not examine the content of this mapping, but it will pass it through the
1157
1157
  transpiler and reattach it to the output, so you can track your own metadata."""
1158
1158
 
1159
1159
  @classmethod
1160
- def _from_circuit_data(cls, data: CircuitData) -> typing.Self:
1160
+ def _from_circuit_data(cls, data: CircuitData, add_regs: bool = False) -> typing.Self:
1161
1161
  """A private constructor from rust space circuit data."""
1162
1162
  out = QuantumCircuit()
1163
+
1164
+ if data.num_qubits > 0:
1165
+ if add_regs:
1166
+ qr = QuantumRegister(name="q", bits=data.qubits)
1167
+ out.qregs = [qr]
1168
+ out._qubit_indices = {
1169
+ bit: BitLocations(index, [(qr, index)]) for index, bit in enumerate(data.qubits)
1170
+ }
1171
+ else:
1172
+ out._qubit_indices = {
1173
+ bit: BitLocations(index, []) for index, bit in enumerate(data.qubits)
1174
+ }
1175
+
1176
+ if data.num_clbits > 0:
1177
+ if add_regs:
1178
+ cr = ClassicalRegister(name="c", bits=data.clbits)
1179
+ out.cregs = [cr]
1180
+ out._clbit_indices = {
1181
+ bit: BitLocations(index, [(cr, index)]) for index, bit in enumerate(data.clbits)
1182
+ }
1183
+ else:
1184
+ out._clbit_indices = {
1185
+ bit: BitLocations(index, []) for index, bit in enumerate(data.clbits)
1186
+ }
1187
+
1163
1188
  out._data = data
1164
- out._qubit_indices = {bit: BitLocations(index, []) for index, bit in enumerate(data.qubits)}
1165
- out._clbit_indices = {bit: BitLocations(index, []) for index, bit in enumerate(data.clbits)}
1189
+
1166
1190
  return out
1167
1191
 
1168
1192
  @staticmethod
@@ -3013,16 +3037,7 @@ class QuantumCircuit:
3013
3037
  self._ancillas.append(bit)
3014
3038
 
3015
3039
  if isinstance(register, QuantumRegister):
3016
- self.qregs.append(register)
3017
-
3018
- for idx, bit in enumerate(register):
3019
- if bit in self._qubit_indices:
3020
- self._qubit_indices[bit].registers.append((register, idx))
3021
- else:
3022
- self._data.add_qubit(bit)
3023
- self._qubit_indices[bit] = BitLocations(
3024
- self._data.num_qubits - 1, [(register, idx)]
3025
- )
3040
+ self._add_qreg(register)
3026
3041
 
3027
3042
  elif isinstance(register, ClassicalRegister):
3028
3043
  self.cregs.append(register)
@@ -3041,6 +3056,16 @@ class QuantumCircuit:
3041
3056
  else:
3042
3057
  raise CircuitError("expected a register")
3043
3058
 
3059
+ def _add_qreg(self, qreg: QuantumRegister) -> None:
3060
+ self.qregs.append(qreg)
3061
+
3062
+ for idx, bit in enumerate(qreg):
3063
+ if bit in self._qubit_indices:
3064
+ self._qubit_indices[bit].registers.append((qreg, idx))
3065
+ else:
3066
+ self._data.add_qubit(bit)
3067
+ self._qubit_indices[bit] = BitLocations(self._data.num_qubits - 1, [(qreg, idx)])
3068
+
3044
3069
  def add_bits(self, bits: Iterable[Bit]) -> None:
3045
3070
  """Add Bits to the circuit."""
3046
3071
  duplicate_bits = {
@@ -1773,12 +1773,13 @@ def Square(
1773
1773
  is the sign function with the convention :math:`\\text{sign}\\left(0\\right)=1`.
1774
1774
 
1775
1775
  Args:
1776
- duration: Pulse length in terms of the sampling period `dt`.
1777
- amp: The magnitude of the amplitude of the square wave. Wave range is [-`amp`,`amp`].
1776
+ duration: Pulse length in terms of the sampling period ``dt``.
1777
+ amp: The magnitude of the amplitude of the square wave. Wave range is
1778
+ :math:`\\left[-\\texttt{amp},\\texttt{amp}\\right]`.
1778
1779
  phase: The phase of the square wave (note that this is not equivalent to the angle of
1779
1780
  the complex amplitude).
1780
1781
  freq: The frequency of the square wave, in terms of 1 over sampling period.
1781
- If not provided defaults to a single cycle (i.e :math:'\\frac{1}{\\text{duration}}').
1782
+ If not provided defaults to a single cycle (i.e :math:`\\frac{1}{\\text{duration}}`).
1782
1783
  The frequency is limited to the range :math:`\\left(0,0.5\\right]` (the Nyquist frequency).
1783
1784
  angle: The angle in radians of the complex phase factor uniformly
1784
1785
  scaling the pulse. Default value 0.
@@ -55,6 +55,30 @@ class Operator(LinearOp):
55
55
  .. math::
56
56
 
57
57
  \rho \mapsto M \rho M^\dagger.
58
+
59
+ For example, the following operator :math:`M = X` applied to the zero state
60
+ :math:`|\psi\rangle=|0\rangle (\rho = |0\rangle\langle 0|)` changes it to the
61
+ one state :math:`|\psi\rangle=|1\rangle (\rho = |1\rangle\langle 1|)`:
62
+
63
+ .. code-block:: python
64
+
65
+ >>> import numpy as np
66
+ >>> from qiskit.quantum_info import Operator
67
+ >>> op = Operator(np.array([[0.0, 1.0], [1.0, 0.0]])) # Represents Pauli X operator
68
+
69
+ >>> from qiskit.quantum_info import Statevector
70
+ >>> sv = Statevector(np.array([1.0, 0.0]))
71
+ >>> sv.evolve(op)
72
+ Statevector([0.+0.j, 1.+0.j],
73
+ dims=(2,))
74
+
75
+ >>> from qiskit.quantum_info import DensityMatrix
76
+ >>> dm = DensityMatrix(np.array([[1.0, 0.0], [0.0, 0.0]]))
77
+ >>> dm.evolve(op)
78
+ DensityMatrix([[0.+0.j, 0.+0.j],
79
+ [0.+0.j, 1.+0.j]],
80
+ dims=(2,))
81
+
58
82
  """
59
83
 
60
84
  def __init__(
@@ -41,7 +41,7 @@ def synth_clifford_bm(clifford: Clifford) -> QuantumCircuit:
41
41
  `arXiv:2003.09412 [quant-ph] <https://arxiv.org/abs/2003.09412>`_
42
42
  """
43
43
  circuit = QuantumCircuit._from_circuit_data(
44
- synth_clifford_bm_inner(clifford.tableau.astype(bool))
44
+ synth_clifford_bm_inner(clifford.tableau.astype(bool)), add_regs=True
45
45
  )
46
46
  circuit.name = str(clifford)
47
47
  return circuit
@@ -51,7 +51,7 @@ def synth_clifford_greedy(clifford: Clifford) -> QuantumCircuit:
51
51
  `arXiv:2105.02291 [quant-ph] <https://arxiv.org/abs/2105.02291>`_
52
52
  """
53
53
  circuit = QuantumCircuit._from_circuit_data(
54
- synth_clifford_greedy_inner(clifford.tableau.astype(bool))
54
+ synth_clifford_greedy_inner(clifford.tableau.astype(bool)), add_regs=True
55
55
  )
56
56
  circuit.name = str(clifford)
57
57
  return circuit
@@ -66,4 +66,4 @@ def synth_cnot_count_full_pmh(
66
66
  circuit_data = fast_pmh(normalized, section_size)
67
67
 
68
68
  # construct circuit from the data
69
- return QuantumCircuit._from_circuit_data(circuit_data)
69
+ return QuantumCircuit._from_circuit_data(circuit_data, add_regs=True)
@@ -224,7 +224,8 @@ class OneQubitEulerDecomposer:
224
224
  return QuantumCircuit._from_circuit_data(
225
225
  euler_one_qubit_decomposer.unitary_to_circuit(
226
226
  unitary, [self.basis], 0, None, simplify, atol
227
- )
227
+ ),
228
+ add_regs=True,
228
229
  )
229
230
 
230
231
  @property
@@ -42,7 +42,7 @@ def synth_permutation_basic(pattern: list[int] | np.ndarray[int]) -> QuantumCirc
42
42
  Returns:
43
43
  The synthesized quantum circuit.
44
44
  """
45
- return QuantumCircuit._from_circuit_data(_synth_permutation_basic(pattern))
45
+ return QuantumCircuit._from_circuit_data(_synth_permutation_basic(pattern), add_regs=True)
46
46
 
47
47
 
48
48
  def synth_permutation_acg(pattern: list[int] | np.ndarray[int]) -> QuantumCircuit:
@@ -75,4 +75,4 @@ def synth_permutation_acg(pattern: list[int] | np.ndarray[int]) -> QuantumCircui
75
75
  *Routing Permutations on Graphs Via Matchings.*,
76
76
  `(Full paper) <https://www.cs.tau.ac.il/~nogaa/PDFS/r.pdf>`_
77
77
  """
78
- return QuantumCircuit._from_circuit_data(_synth_permutation_acg(pattern))
78
+ return QuantumCircuit._from_circuit_data(_synth_permutation_acg(pattern), add_regs=True)
@@ -49,4 +49,6 @@ def synth_permutation_depth_lnn_kms(pattern: list[int] | np.ndarray[int]) -> Qua
49
49
  # In the permutation synthesis code below the notation is opposite:
50
50
  # [2, 4, 3, 0, 1] means that 0 maps to 2, 1 to 3, 2 to 3, 3 to 0, and 4 to 1.
51
51
  # This is why we invert the pattern.
52
- return QuantumCircuit._from_circuit_data(_synth_permutation_depth_lnn_kms(pattern))
52
+ return QuantumCircuit._from_circuit_data(
53
+ _synth_permutation_depth_lnn_kms(pattern), add_regs=True
54
+ )
@@ -233,7 +233,7 @@ class TwoQubitWeylDecomposition:
233
233
  circuit_data = self._inner_decomposition.circuit(
234
234
  euler_basis=euler_basis, simplify=simplify, atol=atol
235
235
  )
236
- return QuantumCircuit._from_circuit_data(circuit_data)
236
+ return QuantumCircuit._from_circuit_data(circuit_data, add_regs=True)
237
237
 
238
238
  def actual_fidelity(self, **kwargs) -> float:
239
239
  """Calculates the actual fidelity of the decomposed circuit to the input unitary."""
@@ -671,7 +671,7 @@ class TwoQubitBasisDecomposer:
671
671
  approximate,
672
672
  _num_basis_uses=_num_basis_uses,
673
673
  )
674
- return QuantumCircuit._from_circuit_data(circ_data)
674
+ return QuantumCircuit._from_circuit_data(circ_data, add_regs=True)
675
675
  else:
676
676
  sequence = self._inner_decomposer(
677
677
  np.asarray(unitary, dtype=complex),
@@ -18,6 +18,7 @@ import qiskit.circuit
18
18
  from qiskit.circuit import Barrier, Delay, Instruction, ParameterExpression
19
19
  from qiskit.circuit.duration import duration_in_dt
20
20
  from qiskit.providers import Backend
21
+ from qiskit.providers.backend import BackendV2
21
22
  from qiskit.transpiler.exceptions import TranspilerError
22
23
  from qiskit.utils.units import apply_prefix
23
24
 
@@ -75,6 +76,9 @@ class InstructionDurations:
75
76
  TranspilerError: If dt and dtm is different in the backend.
76
77
  """
77
78
  # All durations in seconds in gate_length
79
+ if isinstance(backend, BackendV2):
80
+ return backend.target.durations()
81
+
78
82
  instruction_durations = []
79
83
  backend_properties = backend.properties()
80
84
  if hasattr(backend_properties, "_gates"):
@@ -71,6 +71,7 @@ Optimizations
71
71
  Collect1qRuns
72
72
  Collect2qBlocks
73
73
  CollectMultiQBlocks
74
+ CollectAndCollapse
74
75
  CollectLinearFunctions
75
76
  CollectCliffords
76
77
  ConsolidateBlocks
@@ -238,6 +239,7 @@ from .optimization import HoareOptimizer
238
239
  from .optimization import TemplateOptimization
239
240
  from .optimization import InverseCancellation
240
241
  from .optimization import EchoRZXWeylDecomposition
242
+ from .optimization import CollectAndCollapse
241
243
  from .optimization import CollectLinearFunctions
242
244
  from .optimization import CollectCliffords
243
245
  from .optimization import ResetAfterMeasureSimplification
@@ -39,3 +39,4 @@ from .elide_permutations import ElidePermutations
39
39
  from .normalize_rx_angle import NormalizeRXAngle
40
40
  from .optimize_annotated import OptimizeAnnotated
41
41
  from .split_2q_unitaries import Split2QUnitaries
42
+ from .collect_and_collapse import CollectAndCollapse
@@ -203,20 +203,24 @@ class HoareOptimizer(TransformationPass):
203
203
  """
204
204
  import z3
205
205
 
206
- for node in dag.topological_op_nodes():
206
+ # Pre-generate all DAG nodes, since we later iterate over them, while
207
+ # potentially modifying and removing some of them.
208
+ nodes = list(dag.topological_op_nodes())
209
+ for node in nodes:
207
210
  gate = node.op
208
- ctrlqb, ctrlvar, trgtqb, trgtvar = self._seperate_ctrl_trgt(node)
211
+ _, ctrlvar, trgtqb, trgtvar = self._seperate_ctrl_trgt(node)
209
212
 
210
213
  ctrl_ones = z3.And(*ctrlvar)
211
214
 
212
- remove_ctrl, new_dag, qb_idx = self._remove_control(gate, ctrlvar, trgtvar)
215
+ remove_ctrl, new_dag, _ = self._remove_control(gate, ctrlvar, trgtvar)
213
216
 
214
217
  if remove_ctrl:
215
- dag.substitute_node_with_dag(node, new_dag)
216
- gate = gate.base_gate
217
- node.op = gate.to_mutable()
218
- node.name = gate.name
219
- node.qargs = tuple((ctrlqb + trgtqb)[qi] for qi in qb_idx)
218
+ # We are replacing a node by a new node over a smaller number of qubits.
219
+ # This can be done using substitute_node_with_dag, which furthermore returns
220
+ # a mapping from old node ids to new nodes.
221
+ mapped_nodes = dag.substitute_node_with_dag(node, new_dag)
222
+ node = next(iter(mapped_nodes.values()))
223
+ gate = node.op
220
224
  _, ctrlvar, trgtqb, trgtvar = self._seperate_ctrl_trgt(node)
221
225
 
222
226
  ctrl_ones = z3.And(*ctrlvar)
@@ -9,8 +9,8 @@
9
9
  # Any modifications or derivative works of this code must retain this
10
10
  # copyright notice, and modified files need to carry a notice indicating
11
11
  # that they have been altered from the originals.
12
+
12
13
  """Splits each two-qubit gate in the `dag` into two single-qubit gates, if possible without error."""
13
- from typing import Optional
14
14
 
15
15
  from qiskit.transpiler.basepasses import TransformationPass
16
16
  from qiskit.circuit.quantumcircuitdata import CircuitInstruction
@@ -20,37 +20,33 @@ from qiskit.synthesis.two_qubit.two_qubit_decompose import TwoQubitWeylDecomposi
20
20
 
21
21
 
22
22
  class Split2QUnitaries(TransformationPass):
23
- """Attempt to splits two-qubit gates in a :class:`.DAGCircuit` into two single-qubit gates
23
+ """Attempt to splits two-qubit unitaries in a :class:`.DAGCircuit` into two single-qubit gates.
24
24
 
25
- This pass will analyze all the two qubit gates in the circuit and analyze the gate's unitary
26
- matrix to determine if the gate is actually a product of 2 single qubit gates. In these
27
- cases the 2q gate can be simplified into two single qubit gates and this pass will
28
- perform this optimization and will replace the two qubit gate with two single qubit
29
- :class:`.UnitaryGate`.
25
+ This pass will analyze all :class:`.UnitaryGate` instances and determine whether the
26
+ matrix is actually a product of 2 single qubit gates. In these cases the 2q gate can be
27
+ simplified into two single qubit gates and this pass will perform this optimization and will
28
+ replace the two qubit gate with two single qubit :class:`.UnitaryGate`.
30
29
  """
31
30
 
32
- def __init__(self, fidelity: Optional[float] = 1.0 - 1e-16):
33
- """Split2QUnitaries initializer.
34
-
31
+ def __init__(self, fidelity: float = 1.0 - 1e-16):
32
+ """
35
33
  Args:
36
- fidelity (float): Allowed tolerance for splitting two-qubit unitaries and gate decompositions
34
+ fidelity: Allowed tolerance for splitting two-qubit unitaries and gate decompositions.
37
35
  """
38
36
  super().__init__()
39
37
  self.requested_fidelity = fidelity
40
38
 
41
- def run(self, dag: DAGCircuit):
39
+ def run(self, dag: DAGCircuit) -> DAGCircuit:
42
40
  """Run the Split2QUnitaries pass on `dag`."""
41
+
43
42
  for node in dag.topological_op_nodes():
44
- # skip operations without two-qubits and for which we can not determine a potential 1q split
45
- if (
46
- len(node.cargs) > 0
47
- or len(node.qargs) != 2
48
- or node.matrix is None
49
- or node.is_parameterized()
50
- ):
43
+ # We only attempt to split UnitaryGate objects, but this could be extended in future
44
+ # -- however we need to ensure that we can compile the resulting single-qubit unitaries
45
+ # to the supported basis gate set.
46
+ if not (len(node.qargs) == 2 and node.op.name == "unitary"):
51
47
  continue
52
48
 
53
- decomp = TwoQubitWeylDecomposition(node.op, fidelity=self.requested_fidelity)
49
+ decomp = TwoQubitWeylDecomposition(node.matrix, fidelity=self.requested_fidelity)
54
50
  if (
55
51
  decomp._inner_decomposition.specialization
56
52
  == TwoQubitWeylDecomposition._specializations.IdEquiv
@@ -343,6 +343,7 @@ def generate_preset_pass_manager(
343
343
  # Parse non-target dependent pm options
344
344
  initial_layout = _parse_initial_layout(initial_layout)
345
345
  approximation_degree = _parse_approximation_degree(approximation_degree)
346
+ seed_transpiler = _parse_seed_transpiler(seed_transpiler)
346
347
 
347
348
  pm_options = {
348
349
  "target": target,
@@ -516,3 +517,11 @@ def _parse_approximation_degree(approximation_degree):
516
517
  if approximation_degree < 0.0 or approximation_degree > 1.0:
517
518
  raise TranspilerError("Approximation degree must be in [0.0, 1.0]")
518
519
  return approximation_degree
520
+
521
+
522
+ def _parse_seed_transpiler(seed_transpiler):
523
+ if seed_transpiler is None:
524
+ return None
525
+ if not isinstance(seed_transpiler, int) or seed_transpiler < 0:
526
+ raise ValueError("Expected non-negative integer as seed for transpiler.")
527
+ return seed_transpiler
qiskit/utils/optionals.py CHANGED
@@ -25,172 +25,195 @@ Available Testers
25
25
  Qiskit Components
26
26
  -----------------
27
27
 
28
- .. list-table::
29
- :widths: 25 75
28
+ .. py:data:: HAS_AER
30
29
 
31
- * - .. py:data:: HAS_AER
32
- - `Qiskit Aer <https://qiskit.github.io/qiskit-aer/>` provides high-performance simulators for
33
- the quantum circuits constructed within Qiskit.
30
+ `Qiskit Aer <https://qiskit.github.io/qiskit-aer/>` provides high-performance simulators for
31
+ the quantum circuits constructed within Qiskit.
34
32
 
35
- * - .. py:data:: HAS_IBMQ
36
- - The :mod:`Qiskit IBMQ Provider <qiskit.providers.ibmq>` is used for accessing IBM Quantum
37
- hardware in the IBM cloud.
33
+ .. py:data:: HAS_IBMQ
38
34
 
39
- * - .. py:data:: HAS_IGNIS
40
- - :mod:`Qiskit Ignis <qiskit.ignis>` provides tools for quantum hardware verification, noise
41
- characterization, and error correction.
35
+ The :mod:`Qiskit IBMQ Provider <qiskit.providers.ibmq>` is used for accessing IBM Quantum
36
+ hardware in the IBM cloud.
42
37
 
43
- * - .. py:data:: HAS_TOQM
44
- - `Qiskit TOQM <https://github.com/qiskit-toqm/qiskit-toqm>`__ provides transpiler passes
45
- for the `Time-optimal Qubit mapping algorithm <https://doi.org/10.1145/3445814.3446706>`__.
38
+ .. py:data:: HAS_IGNIS
39
+
40
+ :mod:`Qiskit Ignis <qiskit.ignis>` provides tools for quantum hardware verification, noise
41
+ characterization, and error correction.
42
+
43
+ .. py:data:: HAS_TOQM
44
+
45
+ `Qiskit TOQM <https://github.com/qiskit-toqm/qiskit-toqm>`__ provides transpiler passes
46
+ for the `Time-optimal Qubit mapping algorithm <https://doi.org/10.1145/3445814.3446706>`__.
46
47
 
47
48
 
48
49
  External Python Libraries
49
50
  -------------------------
50
51
 
51
- .. list-table::
52
- :widths: 25 75
53
-
54
- * - .. py:data:: HAS_CONSTRAINT
55
- - `python-constraint <https://github.com/python-constraint/python-constraint>`__ is a
56
- constraint satisfaction problem solver, used in the :class:`~.CSPLayout` transpiler pass.
57
-
58
- * - .. py:data:: HAS_CPLEX
59
- - The `IBM CPLEX Optimizer <https://www.ibm.com/analytics/cplex-optimizer>`__ is a
60
- high-performance mathematical programming solver for linear, mixed-integer and quadratic
61
- programming. This is no longer by Qiskit, but it weas historically and the optional
62
- remains for backwards compatibility.
63
-
64
- * - .. py:data:: HAS_CVXPY
65
- - `CVXPY <https://www.cvxpy.org/>`__ is a Python package for solving convex optimization
66
- problems. It is required for calculating diamond norms with
67
- :func:`.quantum_info.diamond_norm`.
68
-
69
- * - .. py:data:: HAS_DOCPLEX
70
- - `IBM Decision Optimization CPLEX Modelling
71
- <http://ibmdecisionoptimization.github.io/docplex-doc/>`__ is a library for prescriptive
72
- analysis. Like CPLEX, this is no longer by Qiskit, but it weas historically and the
73
- optional remains for backwards compatibility.
74
-
75
- * - .. py:data:: HAS_FIXTURES
76
- - The test suite has additional features that are available if the optional `fixtures
77
- <https://launchpad.net/python-fixtures>`__ module is installed. This generally also needs
78
- :data:`HAS_TESTTOOLS` as well. This is generally only needed for Qiskit developers.
79
-
80
- * - .. py:data:: HAS_IPYTHON
81
- - If `the IPython kernel <https://ipython.org/>`__ is available, certain additional
82
- visualizations and line magics are made available.
83
-
84
- * - .. py:data:: HAS_IPYWIDGETS
85
- - Monitoring widgets for jobs running on external backends can be provided if `ipywidgets
86
- <https://ipywidgets.readthedocs.io/en/latest/>`__ is available.
87
-
88
- * - .. py:data:: HAS_JAX
89
- - Some methods of gradient calculation within :mod:`.opflow.gradients` require `JAX
90
- <https://github.com/google/jax>`__ for autodifferentiation.
91
-
92
- * - .. py:data:: HAS_JUPYTER
93
- - Some of the tests require a complete `Jupyter <https://jupyter.org/>`__ installation to test
94
- interactivity features.
95
-
96
- * - .. py:data:: HAS_MATPLOTLIB
97
- - Qiskit provides several visualization tools in the :mod:`.visualization` module.
98
- Almost all of these are built using `Matplotlib <https://matplotlib.org/>`__, which must
99
- be installed in order to use them.
100
-
101
- * - .. py:data:: HAS_NETWORKX
102
- - No longer used by Qiskit. Internally, Qiskit now uses the high-performance `rustworkx
103
- <https://github.com/Qiskit/rustworkx>`__ library as a core dependency, and during the
104
- change-over period, it was sometimes convenient to convert things into the Python-only
105
- `NetworkX <https://networkx.org/>`__ format. Some tests of application modules, such as
106
- `Qiskit Nature <https://qiskit-community.github.io/qiskit-nature/>`__ still use NetworkX.
107
-
108
- * - .. py:data:: HAS_NLOPT
109
- - `NLopt <https://nlopt.readthedocs.io/en/latest/>`__ is a nonlinear optimization library,
110
- used by the global optimizers in the :mod:`.algorithms.optimizers` module.
111
-
112
- * - .. py:data:: HAS_PIL
113
- - PIL is a Python image-manipulation library. Qiskit actually uses the `pillow
114
- <https://pillow.readthedocs.io/en/stable/>`__ fork of PIL if it is available when generating
115
- certain visualizations, for example of both :class:`.QuantumCircuit` and
116
- :class:`.DAGCircuit` in certain modes.
117
-
118
- * - .. py:data:: HAS_PYDOT
119
- - For some graph visualizations, Qiskit uses `pydot <https://github.com/pydot/pydot>`__ as an
120
- interface to GraphViz (see :data:`HAS_GRAPHVIZ`).
121
-
122
- * - .. py:data:: HAS_PYGMENTS
123
- - Pygments is a code highlighter and formatter used by many environments that involve rich
124
- display of code blocks, including Sphinx and Jupyter. Qiskit uses this when producing rich
125
- output for these environments.
126
-
127
- * - .. py:data:: HAS_PYLATEX
128
- - Various LaTeX-based visualizations, especially the circuit drawers, need access to the
129
- `pylatexenc <https://github.com/phfaist/pylatexenc>`__ project to work correctly.
130
-
131
- * - .. py:data:: HAS_QASM3_IMPORT
132
- - The functions :func:`.qasm3.load` and :func:`.qasm3.loads` for importing OpenQASM 3 programs
133
- into :class:`.QuantumCircuit` instances use `an external importer package
134
- <https://qiskit.github.io/qiskit-qasm3-import>`__.
135
-
136
- * - .. py:data:: HAS_SEABORN
137
- - Qiskit provides several visualization tools in the :mod:`.visualization` module. Some
138
- of these are built using `Seaborn <https://seaborn.pydata.org/>`__, which must be installed
139
- in order to use them.
140
-
141
- * - .. py:data:: HAS_SKLEARN
142
- - Some of the gradient functions in :mod:`.opflow.gradients` use regularisation methods from
143
- `Scikit Learn <https://scikit-learn.org/stable/>`__.
144
-
145
- * - .. py:data:: HAS_SKQUANT
146
- - Some of the optimisers in :mod:`.algorithms.optimizers` are based on those found in `Scikit
147
- Quant <https://github.com/scikit-quant/scikit-quant>`__, which must be installed to use
148
- them.
149
-
150
- * - .. py:data:: HAS_SQSNOBFIT
151
- - `SQSnobFit <https://pypi.org/project/SQSnobFit/>`__ is a library for the "stable noisy
152
- optimization by branch and fit" algorithm. It is used by the :class:`.SNOBFIT` optimizer.
153
-
154
- * - .. py:data:: HAS_SYMENGINE
155
- - `Symengine <https://github.com/symengine/symengine>`__ is a fast C++ backend for the
156
- symbolic-manipulation library `Sympy <https://www.sympy.org/en/index.html>`__. Qiskit uses
157
- special methods from Symengine to accelerate its handling of
158
- :class:`~.circuit.Parameter`\\ s if available.
159
-
160
- * - .. py:data:: HAS_TESTTOOLS
161
- - Qiskit's test suite has more advanced functionality available if the optional
162
- `testtools <https://pypi.org/project/testtools/>`__ library is installed. This is generally
163
- only needed for Qiskit developers.
164
-
165
- * - .. py:data:: HAS_TWEEDLEDUM
166
- - `Tweedledum <https://github.com/boschmitt/tweedledum>`__ is an extension library for
167
- synthesis and optimization of circuits that may involve classical oracles. Qiskit's
168
- :class:`.PhaseOracle` uses this, which is used in turn by amplification algorithms via
169
- the :class:`.AmplificationProblem`.
170
-
171
- * - .. py:data:: HAS_Z3
172
- - `Z3 <https://github.com/Z3Prover/z3>`__ is a theorem prover, used in the
173
- :class:`.CrosstalkAdaptiveSchedule` and :class:`.HoareOptimizer` transpiler passes.
52
+ .. py:data:: HAS_CONSTRAINT
53
+
54
+ `python-constraint <https://github.com/python-constraint/python-constraint>`__ is a
55
+ constraint satisfaction problem solver, used in the :class:`~.CSPLayout` transpiler pass.
56
+
57
+ .. py:data:: HAS_CPLEX
58
+
59
+ The `IBM CPLEX Optimizer <https://www.ibm.com/analytics/cplex-optimizer>`__ is a
60
+ high-performance mathematical programming solver for linear, mixed-integer and quadratic
61
+ programming. This is no longer by Qiskit, but it weas historically and the optional
62
+ remains for backwards compatibility.
63
+
64
+ .. py:data:: HAS_CVXPY
65
+
66
+ `CVXPY <https://www.cvxpy.org/>`__ is a Python package for solving convex optimization
67
+ problems. It is required for calculating diamond norms with
68
+ :func:`.quantum_info.diamond_norm`.
69
+
70
+ .. py:data:: HAS_DOCPLEX
71
+
72
+ `IBM Decision Optimization CPLEX Modelling
73
+ <http://ibmdecisionoptimization.github.io/docplex-doc/>`__ is a library for prescriptive
74
+ analysis. Like CPLEX, this is no longer by Qiskit, but it weas historically and the
75
+ optional remains for backwards compatibility.
76
+
77
+ .. py:data:: HAS_FIXTURES
78
+
79
+ The test suite has additional features that are available if the optional `fixtures
80
+ <https://launchpad.net/python-fixtures>`__ module is installed. This generally also needs
81
+ :data:`HAS_TESTTOOLS` as well. This is generally only needed for Qiskit developers.
82
+
83
+ .. py:data:: HAS_IPYTHON
84
+
85
+ If `the IPython kernel <https://ipython.org/>`__ is available, certain additional
86
+ visualizations and line magics are made available.
87
+
88
+ .. py:data:: HAS_IPYWIDGETS
89
+
90
+ Monitoring widgets for jobs running on external backends can be provided if `ipywidgets
91
+ <https://ipywidgets.readthedocs.io/en/latest/>`__ is available.
92
+
93
+ .. py:data:: HAS_JAX
94
+
95
+ Some methods of gradient calculation within :mod:`.opflow.gradients` require `JAX
96
+ <https://github.com/google/jax>`__ for autodifferentiation.
97
+
98
+ .. py:data:: HAS_JUPYTER
99
+
100
+ Some of the tests require a complete `Jupyter <https://jupyter.org/>`__ installation to test
101
+ interactivity features.
102
+
103
+ .. py:data:: HAS_MATPLOTLIB
104
+
105
+ Qiskit provides several visualization tools in the :mod:`.visualization` module.
106
+ Almost all of these are built using `Matplotlib <https://matplotlib.org/>`__, which must
107
+ be installed in order to use them.
108
+
109
+ .. py:data:: HAS_NETWORKX
110
+
111
+ No longer used by Qiskit. Internally, Qiskit now uses the high-performance `rustworkx
112
+ <https://github.com/Qiskit/rustworkx>`__ library as a core dependency, and during the
113
+ change-over period, it was sometimes convenient to convert things into the Python-only
114
+ `NetworkX <https://networkx.org/>`__ format. Some tests of application modules, such as
115
+ `Qiskit Nature <https://qiskit-community.github.io/qiskit-nature/>`__ still use NetworkX.
116
+
117
+ .. py:data:: HAS_NLOPT
118
+
119
+ `NLopt <https://nlopt.readthedocs.io/en/latest/>`__ is a nonlinear optimization library,
120
+ used by the global optimizers in the :mod:`.algorithms.optimizers` module.
121
+
122
+ .. py:data:: HAS_PIL
123
+
124
+ PIL is a Python image-manipulation library. Qiskit actually uses the `pillow
125
+ <https://pillow.readthedocs.io/en/stable/>`__ fork of PIL if it is available when generating
126
+ certain visualizations, for example of both :class:`.QuantumCircuit` and
127
+ :class:`.DAGCircuit` in certain modes.
128
+
129
+ .. py:data:: HAS_PYDOT
130
+
131
+ For some graph visualizations, Qiskit uses `pydot <https://github.com/pydot/pydot>`__ as an
132
+ interface to GraphViz (see :data:`HAS_GRAPHVIZ`).
133
+
134
+ .. py:data:: HAS_PYGMENTS
135
+
136
+ Pygments is a code highlighter and formatter used by many environments that involve rich
137
+ display of code blocks, including Sphinx and Jupyter. Qiskit uses this when producing rich
138
+ output for these environments.
139
+
140
+ .. py:data:: HAS_PYLATEX
141
+
142
+ Various LaTeX-based visualizations, especially the circuit drawers, need access to the
143
+ `pylatexenc <https://github.com/phfaist/pylatexenc>`__ project to work correctly.
144
+
145
+ .. py:data:: HAS_QASM3_IMPORT
146
+
147
+ The functions :func:`.qasm3.load` and :func:`.qasm3.loads` for importing OpenQASM 3 programs
148
+ into :class:`.QuantumCircuit` instances use `an external importer package
149
+ <https://qiskit.github.io/qiskit-qasm3-import>`__.
150
+
151
+ .. py:data:: HAS_SEABORN
152
+
153
+ Qiskit provides several visualization tools in the :mod:`.visualization` module. Some
154
+ of these are built using `Seaborn <https://seaborn.pydata.org/>`__, which must be installed
155
+ in order to use them.
156
+
157
+ .. py:data:: HAS_SKLEARN
158
+
159
+ Some of the gradient functions in :mod:`.opflow.gradients` use regularisation methods from
160
+ `Scikit Learn <https://scikit-learn.org/stable/>`__.
161
+
162
+ .. py:data:: HAS_SKQUANT
163
+
164
+ Some of the optimisers in :mod:`.algorithms.optimizers` are based on those found in `Scikit
165
+ Quant <https://github.com/scikit-quant/scikit-quant>`__, which must be installed to use
166
+ them.
167
+
168
+ .. py:data:: HAS_SQSNOBFIT
169
+
170
+ `SQSnobFit <https://pypi.org/project/SQSnobFit/>`__ is a library for the "stable noisy
171
+ optimization by branch and fit" algorithm. It is used by the :class:`.SNOBFIT` optimizer.
172
+
173
+ .. py:data:: HAS_SYMENGINE
174
+
175
+ `Symengine <https://github.com/symengine/symengine>`__ is a fast C++ backend for the
176
+ symbolic-manipulation library `Sympy <https://www.sympy.org/en/index.html>`__. Qiskit uses
177
+ special methods from Symengine to accelerate its handling of
178
+ :class:`~.circuit.Parameter`\\ s if available.
179
+
180
+ .. py:data:: HAS_TESTTOOLS
181
+
182
+ Qiskit's test suite has more advanced functionality available if the optional
183
+ `testtools <https://pypi.org/project/testtools/>`__ library is installed. This is generally
184
+ only needed for Qiskit developers.
185
+
186
+ .. py:data:: HAS_TWEEDLEDUM
187
+
188
+ `Tweedledum <https://github.com/boschmitt/tweedledum>`__ is an extension library for
189
+ synthesis and optimization of circuits that may involve classical oracles. Qiskit's
190
+ :class:`.PhaseOracle` uses this, which is used in turn by amplification algorithms via
191
+ the :class:`.AmplificationProblem`.
192
+
193
+ .. py:data:: HAS_Z3
194
+
195
+ `Z3 <https://github.com/Z3Prover/z3>`__ is a theorem prover, used in the
196
+ :class:`.CrosstalkAdaptiveSchedule` and :class:`.HoareOptimizer` transpiler passes.
174
197
 
175
198
  External Command-Line Tools
176
199
  ---------------------------
177
200
 
178
- .. list-table::
179
- :widths: 25 75
201
+ .. py:data:: HAS_GRAPHVIZ
202
+
203
+ For some graph visualizations, Qiskit uses the `GraphViz <https://graphviz.org/>`__
204
+ visualization tool via its ``pydot`` interface (see :data:`HAS_PYDOT`).
205
+
206
+ .. py:data:: HAS_PDFLATEX
180
207
 
181
- * - .. py:data:: HAS_GRAPHVIZ
182
- - For some graph visualizations, Qiskit uses the `GraphViz <https://graphviz.org/>`__
183
- visualization tool via its ``pydot`` interface (see :data:`HAS_PYDOT`).
208
+ Visualization tools that use LaTeX in their output, such as the circuit drawers, require
209
+ ``pdflatex`` to be available. You will generally need to ensure that you have a working
210
+ LaTeX installation available, and the ``qcircuit.tex`` package.
184
211
 
185
- * - .. py:data:: HAS_PDFLATEX
186
- - Visualization tools that use LaTeX in their output, such as the circuit drawers, require
187
- ``pdflatex`` to be available. You will generally need to ensure that you have a working
188
- LaTeX installation available, and the ``qcircuit.tex`` package.
212
+ .. py:data:: HAS_PDFTOCAIRO
189
213
 
190
- * - .. py:data:: HAS_PDFTOCAIRO
191
- - Visualization tools that convert LaTeX-generated files into rasterized images use the
192
- ``pdftocairo`` tool. This is part of the `Poppler suite of PDF tools
193
- <https://poppler.freedesktop.org/>`__.
214
+ Visualization tools that convert LaTeX-generated files into rasterized images use the
215
+ ``pdftocairo`` tool. This is part of the `Poppler suite of PDF tools
216
+ <https://poppler.freedesktop.org/>`__.
194
217
 
195
218
 
196
219
  Lazy Checker Classes
@@ -945,6 +945,7 @@ def plot_gate_map(
945
945
  font_color,
946
946
  ax,
947
947
  filename,
948
+ planar=rx.is_planar(coupling_map.graph.to_undirected(multigraph=False)),
948
949
  )
949
950
 
950
951
 
@@ -966,6 +967,8 @@ def plot_coupling_map(
966
967
  font_color="white",
967
968
  ax=None,
968
969
  filename=None,
970
+ *,
971
+ planar=True,
969
972
  ):
970
973
  """Plots an arbitrary coupling map of qubits (embedded in a plane).
971
974
 
@@ -987,6 +990,7 @@ def plot_coupling_map(
987
990
  font_color (str): The font color for the qubit labels.
988
991
  ax (Axes): A Matplotlib axes instance.
989
992
  filename (str): file path to save image to.
993
+ planar (bool): If the coupling map is planar or not. Default: ``True`` (i.e. it is planar)
990
994
 
991
995
  Returns:
992
996
  Figure: A Matplotlib figure instance.
@@ -1057,7 +1061,14 @@ def plot_coupling_map(
1057
1061
 
1058
1062
  if font_size is None:
1059
1063
  max_characters = max(1, max(len(str(x)) for x in qubit_labels))
1060
- font_size = max(int(20 / max_characters), 1)
1064
+ if max_characters == 1:
1065
+ font_size = 20
1066
+ elif max_characters == 2:
1067
+ font_size = 14
1068
+ elif max_characters == 3:
1069
+ font_size = 12
1070
+ else:
1071
+ font_size = 1
1061
1072
 
1062
1073
  def color_node(node):
1063
1074
  if qubit_coordinates:
@@ -1065,8 +1076,6 @@ def plot_coupling_map(
1065
1076
  "label": str(qubit_labels[node]),
1066
1077
  "color": f'"{qubit_color[node]}"',
1067
1078
  "fillcolor": f'"{qubit_color[node]}"',
1068
- "style": "filled",
1069
- "shape": "circle",
1070
1079
  "pos": f'"{qubit_coordinates[node][0]},{qubit_coordinates[node][1]}"',
1071
1080
  "pin": "True",
1072
1081
  }
@@ -1075,11 +1084,11 @@ def plot_coupling_map(
1075
1084
  "label": str(qubit_labels[node]),
1076
1085
  "color": f'"{qubit_color[node]}"',
1077
1086
  "fillcolor": f'"{qubit_color[node]}"',
1078
- "style": "filled",
1079
- "shape": "circle",
1080
1087
  }
1088
+ out_dict["style"] = "filled"
1089
+ out_dict["shape"] = "circle"
1081
1090
  out_dict["fontcolor"] = f'"{font_color}"'
1082
- out_dict["fontsize"] = str(font_size)
1091
+ out_dict["fontsize"] = f'"{str(font_size)}!"'
1083
1092
  out_dict["height"] = str(qubit_size * px)
1084
1093
  out_dict["fixedsize"] = "True"
1085
1094
  out_dict["fontname"] = '"DejaVu Sans"'
@@ -1093,9 +1102,22 @@ def plot_coupling_map(
1093
1102
  }
1094
1103
  return out_dict
1095
1104
 
1105
+ graph_attributes = None
1106
+ if not qubit_coordinates:
1107
+ if planar:
1108
+ graph_attributes = {
1109
+ "overlap_scaling": "-7",
1110
+ "overlap": "prism",
1111
+ "model": "subset",
1112
+ }
1113
+ else:
1114
+ graph_attributes = {
1115
+ "overlap": "true",
1116
+ }
1096
1117
  plot = graphviz_draw(
1097
1118
  graph,
1098
1119
  method="neato",
1120
+ graph_attr=graph_attributes,
1099
1121
  node_attr_fn=color_node,
1100
1122
  edge_attr_fn=color_edge,
1101
1123
  filename=filename,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qiskit
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: An open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
5
5
  Author-email: Qiskit Development Team <qiskit@us.ibm.com>
6
6
  License: Apache 2.0
@@ -1,16 +1,10 @@
1
- qiskit-1.2.0.dist-info/RECORD,,
2
- qiskit-1.2.0.dist-info/WHEEL,sha256=lmqPbMnkYfRLFzK4tzuBqPppyHOzdJYfX2reiDko3_0,113
3
- qiskit-1.2.0.dist-info/entry_points.txt,sha256=dCqiF7i6g_s6cYnXX7UUO1MM63xFFb5DCHYEYyGAeCc,3556
4
- qiskit-1.2.0.dist-info/top_level.txt,sha256=_vjFXLv7qrHyJJOC2-JXfG54o4XQygW9GuQPxgtSt9Q,7
5
- qiskit-1.2.0.dist-info/LICENSE.txt,sha256=IXrBXbzaJ4LgBPUVKIbYR5iMY2eqoMT8jDVTY8Ib0iQ,11416
6
- qiskit-1.2.0.dist-info/METADATA,sha256=YR503gJKBrwttM-ncN6sX3BhyTJ3_NmAYlApBvaVeNI,12867
7
1
  qiskit/version.py,sha256=MiraFeJt5GQEspFyvP3qJedHen2C1e8dNEttzg0u7YU,2498
8
2
  qiskit/__init__.py,sha256=h_3PcAndCRLW2AhP-GzbxjFzpwd4RpSZ-cQg062et_w,5420
9
- qiskit/_accelerate.abi3.so,sha256=qRO9Cx9n1ENAgk_0ttn8L6lWJm8KpihvU8k-gnoijGc,12289840
3
+ qiskit/_accelerate.abi3.so,sha256=5iuUxld1bTN_FMLocnrPhM81AJGDOR_h795lYY-_1e0,12273696
10
4
  qiskit/user_config.py,sha256=I7QCF9W2IDpleWunxDjgYGySsVUlq57gfj_137o0Dac,10109
11
5
  qiskit/_numpy_compat.py,sha256=ZlnDTF2KBTKcVF489ZuxoBk6r9KLsMuhAlozFhOn0a8,2815
12
6
  qiskit/exceptions.py,sha256=78bbfww9680_v4CaNgepavY5DwGTN7_j47Ckob3lLPM,5619
13
- qiskit/VERSION.txt,sha256=HltRzeUVOWqfp2KQnPjKZYTMxWSzJdLuvup2F1_pXE0,6
7
+ qiskit/VERSION.txt,sha256=bPTghLR_M8mwLveSedFXgzho-PcFFBaadovjU-4yj-o,6
14
8
  qiskit/visualization/circuit_visualization.py,sha256=6R-A96Uwb_RZOovsSB0LGVsC7lP5IhtLNp6VP2yVBwE,698
15
9
  qiskit/visualization/counts_visualization.py,sha256=rgoEqV0gucL9Auz33wf1LiRWR3yFQzjK94zzBF830iY,16791
16
10
  qiskit/visualization/pass_manager_visualization.py,sha256=ng5koUMIFfEYU-PsOmvs_4eawOJyFXJzUlxDF1Kedyk,11220
@@ -18,7 +12,7 @@ qiskit/visualization/state_visualization.py,sha256=nPx7YltijQcbdqoC5gA_AWqYIuREi
18
12
  qiskit/visualization/library.py,sha256=oCzruZqrshriwA17kSfCeY0ujZehr6WZnWvZNmvUw7g,1295
19
13
  qiskit/visualization/bloch.py,sha256=neJ5oBuIhdg5YHuNWE9eyM0I02aAONQrmzphsDBMqM4,30229
20
14
  qiskit/visualization/transition_visualization.py,sha256=zVMSf0p2amqGdHgoevtNlVQCHAQgGp47MJTd6rCAEgs,12264
21
- qiskit/visualization/gate_map.py,sha256=5Doji9QG_rcx_MQPp9dCXX7Rc7H-3yoqUaW2yPYkbxQ,36392
15
+ qiskit/visualization/gate_map.py,sha256=4HcxjbF3EmcudTMi1LpWaezARzv-yrf1Lk0j1I2fPpw,37075
22
16
  qiskit/visualization/__init__.py,sha256=HPgzHp8pY3wXCLYnEKla1YiMMjHbjM6suvJcV4pVmw8,7645
23
17
  qiskit/visualization/dag_visualization.py,sha256=Y7DbbIsLjqoVyjZ0x4vbC0TR0tHf89-67DNLZfM1Aro,9066
24
18
  qiskit/visualization/utils.py,sha256=OPB2TA5SCZk19mhuUcm8RdrXzJfPX3A_Cu-Aoouw0a4,1776
@@ -75,8 +69,8 @@ qiskit/transpiler/passmanager.py,sha256=mxdKQQkV9ZJ1tB1TFbqlkex_0B8HItILGzk6CNFi
75
69
  qiskit/transpiler/passmanager_config.py,sha256=W0Vi73vGspwn6Z8jwUeiU3CZQdbFBbyYt1a2fgjpbko,9220
76
70
  qiskit/transpiler/exceptions.py,sha256=ZxZk41x0T3pCcaEsDmpDg25SwIbCLQ6T1D-V54vwb1A,1710
77
71
  qiskit/transpiler/target.py,sha256=7z_xrWW7L7hLXmG9Rwx_AeaA8JCWmv58dX5gj1ypel4,72951
78
- qiskit/transpiler/instruction_durations.py,sha256=zBZa6wxNJPCA8LAFqIiv7IWWsNqVYsoPSKU8a5biaG8,11099
79
- qiskit/transpiler/passes/__init__.py,sha256=4qjWG8cqVIuKNY1V6ZVHdcxjs2JBo2K43LJ_6fMxFk0,7789
72
+ qiskit/transpiler/instruction_durations.py,sha256=sXX_-jbf6I5R4cHpBBheQaTaRRa4b24Fp7E750AhrC0,11236
73
+ qiskit/transpiler/passes/__init__.py,sha256=y6GrJQ0LcWqBNrpawdxuu90_XpR_M1ZaLvKIZo3_c-g,7856
80
74
  qiskit/transpiler/passes/analysis/dag_longest_path.py,sha256=bOUWUR_2Y91pyvtXjEmAQxSgWyXaqo3XhSysn-3L-4E,957
81
75
  qiskit/transpiler/passes/analysis/num_tensor_factors.py,sha256=KK5DcFja8JsO0pfYvmYGnyEAPMZPYUTJpT9xWhwiYWI,950
82
76
  qiskit/transpiler/passes/analysis/__init__.py,sha256=zFkmqBW9ZfrVg0Ol6krRE7D0h-S5sF89qkfDdW_t5Eg,875
@@ -136,16 +130,16 @@ qiskit/transpiler/passes/optimization/collect_linear_functions.py,sha256=ZPR-kdE
136
130
  qiskit/transpiler/passes/optimization/echo_rzx_weyl_decomposition.py,sha256=uO4rscTREBheqSma2O2XruLeBn8gDg0r14pzhyA_4pI,7016
137
131
  qiskit/transpiler/passes/optimization/optimize_1q_gates.py,sha256=mWGmdOWHkkaTYw6RRHOM7aHI1hsNJwHCXY9n720hKU4,17229
138
132
  qiskit/transpiler/passes/optimization/collect_and_collapse.py,sha256=av0er7p3EFQexd1TTGiWllQsz8E0gguDZqZDS6acJhk,4438
139
- qiskit/transpiler/passes/optimization/split_2q_unitaries.py,sha256=TO-FACah5CRkPhkX52KlTGrUDeBoN1h3OMV-kzNOOlY,3808
133
+ qiskit/transpiler/passes/optimization/split_2q_unitaries.py,sha256=F4w0SRt1TAZwAZ_fAqSuQFmZvD5CEPiw6LJF6z2KxSk,3743
140
134
  qiskit/transpiler/passes/optimization/remove_final_reset.py,sha256=ZZ2za9NYZWh0eAUBEq1vcEU_iLe1P4jq6_1f3TRfHXA,1333
141
135
  qiskit/transpiler/passes/optimization/collect_1q_runs.py,sha256=eE_pZv98vIMUMYIR6JDuG5Qv0p2t5ihyD-W1I4PYY58,1114
142
136
  qiskit/transpiler/passes/optimization/elide_permutations.py,sha256=49fPAyMEslfoncvdGkD-eHTU5FPGb-8yUbiJboewknw,5366
143
- qiskit/transpiler/passes/optimization/hoare_opt.py,sha256=YHpKg_xblPiSKxcx5mG2HHyDQDnVuO8oBS6LfWxFfnM,15986
137
+ qiskit/transpiler/passes/optimization/hoare_opt.py,sha256=A5DIB7lrIpmRB6kDVluKajsQUEFRwo0QDNYnwUzC-Gg,16291
144
138
  qiskit/transpiler/passes/optimization/remove_diagonal_gates_before_measure.py,sha256=KdST9dwZUK8aMULjzw8Vs6EN9UlW8CIR5X-dEi5vyLs,2365
145
139
  qiskit/transpiler/passes/optimization/commutation_analysis.py,sha256=ysK0nQMG0DD7MHTg-RAt54_oCC5Qc8BsIxTLu3-2cCk,3773
146
140
  qiskit/transpiler/passes/optimization/collect_2q_blocks.py,sha256=IVQDvs70ZPzlX5VVCwNFGTuivTDk0atcNCzD5wXvtEk,1224
147
141
  qiskit/transpiler/passes/optimization/commutative_inverse_cancellation.py,sha256=o4pnes901Blh4cM3EgQpUfsn9MQ87-rAEIOCdvKbXGY,5729
148
- qiskit/transpiler/passes/optimization/__init__.py,sha256=nV51u8NhympMhOkPmjqnl95m3x6-HmFCkb7GtH7D4xw,2076
142
+ qiskit/transpiler/passes/optimization/__init__.py,sha256=ebI214S-fxFLfsCRB7sX01gVfBB0Gk1vCqLroWWdq9U,2129
149
143
  qiskit/transpiler/passes/optimization/remove_reset_in_zero_state.py,sha256=xE5ok4OOLQ8idRN534W8Rev1E6QWeTZgcHVZ-tWPaYI,1247
150
144
  qiskit/transpiler/passes/optimization/cx_cancellation.py,sha256=EbwBAEM751bO4c5mJgJ0nYJ2TyPJM12Kl30SgHqJ1eQ,2336
151
145
  qiskit/transpiler/passes/optimization/normalize_rx_angle.py,sha256=23ZddjkU924Yc7hLCXKOCmMCkHVGvaueEg8OYBbQvV4,6255
@@ -218,7 +212,7 @@ qiskit/transpiler/passes/basis/unroll_custom_definitions.py,sha256=bWpl9bk7g8Iyj
218
212
  qiskit/transpiler/preset_passmanagers/builtin_plugins.py,sha256=DqAPtkinKFl4loVAGUmMMqf0jlnpNnyWsVMBPBv5tyg,42010
219
213
  qiskit/transpiler/preset_passmanagers/level0.py,sha256=emrcxdh3Rnv5pyAo5WuMJlY3tfz6WnkKJlGao7vSYAI,4277
220
214
  qiskit/transpiler/preset_passmanagers/__init__.py,sha256=i6t27h2cHewTwN6g8JAyR98obTTP9Aimzqdl2SRdiwQ,2758
221
- qiskit/transpiler/preset_passmanagers/generate_preset_pass_manager.py,sha256=Kr0n3c3mzrosSNzw6w54c8XPur2PDPgKJVLuqju8kyI,25649
215
+ qiskit/transpiler/preset_passmanagers/generate_preset_pass_manager.py,sha256=nP4FCeQdAVyYFe9NxHgzXc1vbOF7z1WzAcDfD9yX8Xw,25987
222
216
  qiskit/transpiler/preset_passmanagers/level1.py,sha256=15OG8az6JecM-3CjyFNgIrTL8HW_2hiFRmoZvpu8c_k,4806
223
217
  qiskit/transpiler/preset_passmanagers/common.py,sha256=7pI6bJ6Uz577r7T76J4y6fpX-upwt9L05YkWYAQU_TA,25857
224
218
  qiskit/transpiler/preset_passmanagers/level2.py,sha256=Bt0EAyreXQb5cxAR6JF_4XoieaJVwi2qO5UyxYSHZiY,4731
@@ -266,7 +260,7 @@ qiskit/circuit/annotated_operation.py,sha256=9TPDzb_iFHjz1Qb-zekywdwD2FIe1J2kZM1
266
260
  qiskit/circuit/barrier.py,sha256=e9rOI-2o_ydpS4H6U5xsnuWhvRts58mMiEzsPZLqbgE,1612
267
261
  qiskit/circuit/reset.py,sha256=gaUpq_mgDh6eYN6N90cXGG1zuq6Yck06Rgh2wCEp7a8,1128
268
262
  qiskit/circuit/duration.py,sha256=JtMbAdMGIPXg2xSf2LJXcmtyVUwdMQ95SScYC5XRUdA,2952
269
- qiskit/circuit/__init__.py,sha256=V8ZY9Qs8hUlK7eztE7T-bjfxL9X0-pV30aU1MVKkTh0,58655
263
+ qiskit/circuit/__init__.py,sha256=V4djnQp8L5O6OtNAbk0ldkv6EBfb8UP3CribHMfWoV4,58957
270
264
  qiskit/circuit/classicalregister.py,sha256=oLKotR8jFREs6i2M1K7Jrvm5rrfG7TzLgaB0-PGa040,1691
271
265
  qiskit/circuit/operation.py,sha256=ecfuw_bkQYFsHyEPdf1z-vJhY99NYSFLYps_X1DF3jc,2015
272
266
  qiskit/circuit/quantumregister.py,sha256=S_4lTalKmDI0LiVq3WJUyqDQwrx7-7mVDOMO-YIs4qI,2032
@@ -280,7 +274,7 @@ qiskit/circuit/controlledgate.py,sha256=tvn9yyfLJcgGJOvjld42ZPQprQPSw5FTAqAZOju4
280
274
  qiskit/circuit/bit.py,sha256=CRVp2JMA65QjktYSH3JzF6zmGqefOc1-ksGjswgmORc,3124
281
275
  qiskit/circuit/exceptions.py,sha256=QoT6kFuoVLe6lWUlTKkSMWufVtyfDCgaUe1kyv79WAY,691
282
276
  qiskit/circuit/equivalence_library.py,sha256=7f2T6c7sbDWaVQNVALNJL0olLVFZmHgA9xzcy7_FdDQ,708
283
- qiskit/circuit/quantumcircuit.py,sha256=qzmzOJuwWafsNKc2dkJ0wgBtMgvA8YYlwg6NZz7-ElE,292193
277
+ qiskit/circuit/quantumcircuit.py,sha256=mRAVYg8r05mQkTwAQaIVAwLoQnXAG1dfLu-yFzME-mQ,292950
284
278
  qiskit/circuit/_standard_gates_commutations.py,sha256=6lsU_f27w7T1r0vPqT3IgiGF8IXxKthwtYgG4sbuFg4,85750
285
279
  qiskit/circuit/instruction.py,sha256=vzb3nNYRnUdjxlJZItl11MKRnpY-mcGr9sMl8qy4Q7w,25393
286
280
  qiskit/circuit/equivalence.py,sha256=DN7Fz5XxYeetybzE5eIQ01Kse3XUlsJLAaJU8kmSsNs,11225
@@ -328,14 +322,14 @@ qiskit/circuit/library/generalized_gates/isometry.py,sha256=U7Atfquddxhtzue0jQ0p
328
322
  qiskit/circuit/library/generalized_gates/pauli.py,sha256=Q2QuxQUnqoBQnguVbplEDZ1xx_vkjaUn_6sIq8AgbxI,3153
329
323
  qiskit/circuit/library/generalized_gates/ucrx.py,sha256=6RKlDx955rO9l4OH9atooC44ETwGqOwpNHgI5TEwdoM,1095
330
324
  qiskit/circuit/library/generalized_gates/mcmt.py,sha256=LtaUhbBBXOWB_TKwNryHcMchbRHyWsfU0tkQtpkDwec,10368
331
- qiskit/circuit/library/basis_change/qft.py,sha256=XMBilb49A4C1q4A-eBWMiUAG6qEDipSOBlrcZ9x_d4Y,11645
325
+ qiskit/circuit/library/basis_change/qft.py,sha256=qE3t_0WQq6I8NbuhLoXuQy1bbROuDZ9ykbLdkOgEGs4,11772
332
326
  qiskit/circuit/library/basis_change/__init__.py,sha256=JFOleW2bg9vOFdWs2RbrFDpUPx47DWmPP6pG1spSS7s,548
333
- qiskit/circuit/library/data_preparation/state_preparation.py,sha256=vEyR1HlNGTaJ9KhyAG7-U23ICLqMHL6yEzgAgAa77rI,14123
327
+ qiskit/circuit/library/data_preparation/state_preparation.py,sha256=2TL97DdkliXwRlOc-ETOidGc_zVZRu9E9VOUFEal1JE,14150
334
328
  qiskit/circuit/library/data_preparation/z_feature_map.py,sha256=9tMS0ScFzMMjgMRC3kle1dAs0iuYZm45xZHKT1dS6A4,6347
335
329
  qiskit/circuit/library/data_preparation/zz_feature_map.py,sha256=KixkX4byMfcynaSZdaXg9__ungnQN4ZIL3tvo1ZMxPk,6409
336
330
  qiskit/circuit/library/data_preparation/pauli_feature_map.py,sha256=tyMuysstqiQLqB7s6Sgs796DVk9g8ljm1lZXq1WtwXs,12605
337
331
  qiskit/circuit/library/data_preparation/__init__.py,sha256=NYQYKqo_y2H9S5JlAcmyKGys_72PCe8G6auMrf8if-s,2336
338
- qiskit/circuit/library/data_preparation/initializer.py,sha256=Rhcl2gHmEGffFYWSButWwPqnFbFd6dxf5y3VPV19DWQ,4342
332
+ qiskit/circuit/library/data_preparation/initializer.py,sha256=0MGo6PVqXachVpr-YEWqR2HeJq6qvPhSV5AQbEOCWYo,4453
339
333
  qiskit/circuit/library/boolean_logic/quantum_xor.py,sha256=mE7NEFn792_VNSe9R-v-qLXsgsISMyNbpI5m_CHbdHI,2311
340
334
  qiskit/circuit/library/boolean_logic/__init__.py,sha256=A9ZvZGbyOERLAcLeRtw64xsGSzkKL2jZkPFtUeyFkSQ,645
341
335
  qiskit/circuit/library/boolean_logic/quantum_and.py,sha256=RAgn9Ah3ppmp4iBOD6OIz37MNYM2z5Jpuec6Ab0hWNM,3945
@@ -368,7 +362,7 @@ qiskit/circuit/library/standard_gates/u1.py,sha256=MNAEoUkOURbffL61bjHvI8YYooPOF
368
362
  qiskit/circuit/library/standard_gates/r.py,sha256=Yz7MOLWvyrZEj2efqtTfB1R1SWHmLKNaZ2yq2itX2Vc,4002
369
363
  qiskit/circuit/library/standard_gates/swap.py,sha256=5WxRZsQlXa4yzmmvJI42LUNTyOvPdB4EYD-xRlms1ro,8988
370
364
  qiskit/circuit/library/standard_gates/y.py,sha256=7UuD6eXqmtrdDhOB_ruCehyiiRzsb7_amYhGxuDZys8,7888
371
- qiskit/circuit/library/standard_gates/__init__.py,sha256=BI6SQ9xb2FdKjWRKTum1Q3Ux-jDJLP7sWoiE_ivaFQo,3730
365
+ qiskit/circuit/library/standard_gates/__init__.py,sha256=prveyGmbnu2DS4Noryc-6rIDH45lH8wQbuQyR7j-E3M,3528
372
366
  qiskit/circuit/library/standard_gates/x.py,sha256=iQ_PRR_E3icz2-_akhblVRAbF4jZs7vSFpt4XKiS5Kw,55029
373
367
  qiskit/circuit/library/standard_gates/global_phase.py,sha256=eXHt_02D8-MbEiCFTybG2d2Z8OdQnazYm-W4Weyjl0E,2913
374
368
  qiskit/circuit/library/standard_gates/rzz.py,sha256=46WHinS80c5vqmEgDChGpqS2X54inMMIhcTRoD9y5vQ,6518
@@ -579,7 +573,7 @@ qiskit/pulse/instructions/instruction.py,sha256=ihYz_nLFxTJdlhabbkXldF_mqPFbYp_F
579
573
  qiskit/pulse/instructions/snapshot.py,sha256=kGIIK6XO04HodQKzAa2K4-3X5BrTcqQwqOyKC3Bg_Vg,2864
580
574
  qiskit/pulse/library/waveform.py,sha256=SCAaHHsCm8XzFbz6mhp1Flptf3S79fqCIFCVeJ2a_KE,5153
581
575
  qiskit/pulse/library/pulse.py,sha256=y3lPSj0PwbCqwz2rGdNj2-aTCUZvRWF9gloA69H3zJo,5646
582
- qiskit/pulse/library/symbolic_pulses.py,sha256=9_wnYQ4J-2HTLrbRC5lfeegAiJzbWaWU9RUJd1f_b9k,77455
576
+ qiskit/pulse/library/symbolic_pulses.py,sha256=pwGt69OrE0g55amMcM5CGxxPuHrbrs_I6rxAboWA2N4,77506
583
577
  qiskit/pulse/library/__init__.py,sha256=XmLNgMFJ6_bzVsKdiyXocENBsbJWcb7HErHMlFFOlEU,2873
584
578
  qiskit/pulse/library/continuous.py,sha256=sq3UnRUcSbbcHmSvDHMQvp9NncKpghNwox2FPJPNo3s,14772
585
579
  qiskit/pulse/library/samplers/strategies.py,sha256=cHN62QP-retJTgY-HDzFaoWdpCTck1wt3AhRxzc8ftU,2450
@@ -621,7 +615,7 @@ qiskit/utils/deprecation.py,sha256=KhDr9uM1dXoa90C607RQABciHkbIdCfO1K3x67_-JF4,1
621
615
  qiskit/utils/__init__.py,sha256=xkenv3i66YEwf8oQ1C3KsU2zeytYxuGzk7lM3quAUKQ,2248
622
616
  qiskit/utils/lazy_tester.py,sha256=5f8FrMvr5n5kxdsD7CPVLdAyRYZVgbKXlXyVXhOkjtc,14547
623
617
  qiskit/utils/parallel.py,sha256=qjlQ6k5fkDtSMHi0UCzunZUOGADJxOaUpRXQMpXl2M0,7093
624
- qiskit/utils/optionals.py,sha256=THBHw2xAjLBFmbF2DUC3_T_PMO0BumYgHErb6pkr-8Q,13838
618
+ qiskit/utils/optionals.py,sha256=D8TMYWjFNjvomHHI58-TxV_m8neSYite7Cgk25Q4zGY,13158
625
619
  qiskit/utils/classtools.py,sha256=RrpYkpXmKAMRM53Ymf4zZnxcLIUm8ia7_rN0D1lj6Lk,6673
626
620
  qiskit/utils/multiprocessing.py,sha256=kySxsw_qi-a7lsFnaRCeZ3WZJGbnYImUsny4gjo6V6c,1708
627
621
  qiskit/synthesis/__init__.py,sha256=9RP7oMw9gtZazjVXh9o6IOTwh1icLCbd3BKeJU7a-kM,4278
@@ -639,12 +633,12 @@ qiskit/synthesis/unitary/aqc/fast_gradient/pmatrix.py,sha256=bXsyzCcrcnFUBu-kS7i
639
633
  qiskit/synthesis/unitary/aqc/fast_gradient/layer.py,sha256=HVbZi04j0cARx2nSIEU5GqvoUud_dtx_EwsvjAHCJOc,12899
640
634
  qiskit/synthesis/unitary/aqc/fast_gradient/fast_grad_utils.py,sha256=eRz4Z1nbEufqDY8NBDi8KejOVNV6YvH8oRXllCBfxPw,7365
641
635
  qiskit/synthesis/unitary/aqc/fast_gradient/fast_gradient.py,sha256=qemfNdv3JQfMMhYglGg8Uw0NXWyihsBV1l4Gws3MeHI,9056
642
- qiskit/synthesis/permutation/permutation_full.py,sha256=Z7lMxZrxWv0OqXawLwSe2PKtINOnb1Yzxf0Q0svG1I0,3322
636
+ qiskit/synthesis/permutation/permutation_full.py,sha256=f6T9eXz7ajb5A1O_rKd1vB5APSTV3B2RHQ9modBWdKg,3352
643
637
  qiskit/synthesis/permutation/permutation_reverse_lnn.py,sha256=t0e4-lfFoLjZ6vattyipIbAGg7I-yVougGxHRvsv5mM,3016
644
638
  qiskit/synthesis/permutation/__init__.py,sha256=Y5Lil8dM3G1KqItfAOUHjavXZjVQ0DgT7T_3EuTfLo0,757
645
- qiskit/synthesis/permutation/permutation_lnn.py,sha256=o0ib8V_6JhCM-4HYaQOzgKI75bUhbhLMpDzpNEPxSYA,2416
639
+ qiskit/synthesis/permutation/permutation_lnn.py,sha256=dmqhE6t0_Du7gCn3fZJEdDE9ocpxtkVSINVoHR_G3Sw,2445
646
640
  qiskit/synthesis/permutation/permutation_utils.py,sha256=9is8GgPp7J5Tsw2l0-AnJDZB0dfNObtxHkWbE7zM3Ok,655
647
- qiskit/synthesis/two_qubit/two_qubit_decompose.py,sha256=WYjMl6E-ozcsyTuHF8nhY2j1WtCYXWucXSuHTrDLFr0,28942
641
+ qiskit/synthesis/two_qubit/two_qubit_decompose.py,sha256=stjCQZXfRXG2dnFjBNo3BizjoC3Mzp2qCaqtpBZNHus,28972
648
642
  qiskit/synthesis/two_qubit/__init__.py,sha256=MEMY-lKO6W30WF_CmWR5xvV7oLt-LEV0ggMbb129TUg,673
649
643
  qiskit/synthesis/two_qubit/local_invariance.py,sha256=8LhHeY4dzTkUo_EJCGGf73Ra-WEbbTtmHsT0J7ATG7w,2085
650
644
  qiskit/synthesis/two_qubit/weyl.py,sha256=tp_LXQpKp9utUiqK7s48irvBLvuOV2eJjYvxz_S1Io8,3299
@@ -657,9 +651,9 @@ qiskit/synthesis/two_qubit/xx_decompose/decomposer.py,sha256=NPUh36QFN8NsyftmqXy
657
651
  qiskit/synthesis/two_qubit/xx_decompose/utilities.py,sha256=3xRwR07SGFcivP1dfWNN1tvOHRz5Zu2ldV-4wIb2QSU,1214
658
652
  qiskit/synthesis/two_qubit/xx_decompose/weyl.py,sha256=wleRtTgxmZ3G69Z9aJ1B0u_37D-CAywtin4PJuZmauU,4522
659
653
  qiskit/synthesis/clifford/clifford_decompose_ag.py,sha256=WCjD0ZGxbOrvUvsnLD7mbRqx-VqN4_m6dt37dYj8yv8,5700
660
- qiskit/synthesis/clifford/clifford_decompose_greedy.py,sha256=wNgONHBGsRZh6I-4mLAjHiys7glyOHD1L4FLVjr8L0o,2119
654
+ qiskit/synthesis/clifford/clifford_decompose_greedy.py,sha256=_DeeIQMTZn8agkGXRMkvYuz9kQgjdbvmw5LsfZ7CiJA,2134
661
655
  qiskit/synthesis/clifford/__init__.py,sha256=k8LzFLsXklYGs1B3foMqObZh4mtTAp2oG41NjVmjIJM,848
662
- qiskit/synthesis/clifford/clifford_decompose_bm.py,sha256=2wrO1n6heIKRPux3ffVrbx4XvqygTilAC5Bl6v8nIus,1575
656
+ qiskit/synthesis/clifford/clifford_decompose_bm.py,sha256=zmAwUEJybMbSWqtFUgdD1FTcBHuA6KVpYleYS4HT95U,1590
663
657
  qiskit/synthesis/clifford/clifford_decompose_layers.py,sha256=y8ZaHFLilKZ2-SHGIs-grN60MpUxQAHcQvJ0TM_Ovrs,17183
664
658
  qiskit/synthesis/clifford/clifford_decompose_full.py,sha256=7ud2PuVxkNznIAXxY0rE5UA0IsEEJ3GFr8xkWBbhWao,2611
665
659
  qiskit/synthesis/stabilizer/__init__.py,sha256=cApQX9mk6bixa1EdWlvtT5y74EwnwnIRR2NSCTdO3sI,700
@@ -670,7 +664,7 @@ qiskit/synthesis/qft/qft_decompose_full.py,sha256=TT4l9c_NzvHBKx40mQE6Y4get_TlDy
670
664
  qiskit/synthesis/qft/qft_decompose_lnn.py,sha256=OSglZvCCmOMHyhtKonWLUZ0z-Vd-ir72Sw8mE2-Wubg,3392
671
665
  qiskit/synthesis/linear/linear_depth_lnn.py,sha256=SLlhhFve-V2ttp-PlM2w1a9AIbFAs75SjjzvQbBJeKk,10135
672
666
  qiskit/synthesis/linear/linear_matrix_utils.py,sha256=tU8egXpG8rpq2nh39xtPPizmFFGqTNFNmciLao2NHYQ,873
673
- qiskit/synthesis/linear/cnot_synth.py,sha256=nh0_ssv2J1oTwoGTsDvCsQvb2I04fZHGbxZFWEya0cE,2785
667
+ qiskit/synthesis/linear/cnot_synth.py,sha256=cZQ51g4VZztQ6t5G8UIC1UiCcWtKzg9GaUswQ3boz3w,2800
674
668
  qiskit/synthesis/linear/__init__.py,sha256=ICXc__9Nm1ONXGocYXNrz-i-JKNSflLJsMjLzqRLVNg,1010
675
669
  qiskit/synthesis/linear/linear_circuits_utils.py,sha256=AVhLIZqA-TvRLPdUn8_GH8wBIO2HZnfHBgaaZeKHGgg,4718
676
670
  qiskit/synthesis/evolution/suzuki_trotter.py,sha256=mO0Z97gpPm6PsKx5w5Rm3swjVsgjEzkkz2jCjCSeqxk,6242
@@ -685,7 +679,7 @@ qiskit/synthesis/cnotdihedral/cnotdihedral_decompose_two_qubits.py,sha256=wRYkJ4
685
679
  qiskit/synthesis/cnotdihedral/__init__.py,sha256=yi84y0UKkKBo-KhyJZzEopPoinxo-cdiORhEmFPcQQw,755
686
680
  qiskit/synthesis/cnotdihedral/cnotdihedral_decompose_full.py,sha256=7AJW-ywRZseGksu09WOAc-LIpKA18iBuRN8WMPKCwUY,1995
687
681
  qiskit/synthesis/one_qubit/__init__.py,sha256=a2svkSAmJzYjzdwQnyBaGIvKpAsHvCVL5gmUvmuFk24,603
688
- qiskit/synthesis/one_qubit/one_qubit_decompose.py,sha256=nBHCOAy-bJB1RVLLNcsrsBAIV_Wh1HH7eidifnTunD8,10312
682
+ qiskit/synthesis/one_qubit/one_qubit_decompose.py,sha256=ycbSZZl_FIAra7agS2tasaWuhv3fX1xth_3AI-aQLnk,10340
689
683
  qiskit/synthesis/linear_phase/cx_cz_depth_lnn.py,sha256=Nfr3ImXVD93CHwP-tOybdvI1WQHpT6pWMF23_0Y5rIg,9433
690
684
  qiskit/synthesis/linear_phase/cnot_phase_synth.py,sha256=RjMyvC9wLguZGhcmOGaPFFfzU20ig76zdiNO7ymHTuM,8616
691
685
  qiskit/synthesis/linear_phase/cz_depth_lnn.py,sha256=iEr2O3SWoDLZFG78F5QXk_SLa8IUTwLewu187qpfLGA,6175
@@ -767,7 +761,7 @@ qiskit/quantum_info/operators/custom_iterator.py,sha256=zRI_UTgIhlUFJ2TShwAC87ld
767
761
  qiskit/quantum_info/operators/linear_op.py,sha256=bBuHrWhlryKjrV1hhhmnQX0sMZSnW5HuVBs4Sl_jfmU,811
768
762
  qiskit/quantum_info/operators/scalar_op.py,sha256=jkRSjDi3lRCb3pD4ZFCoRkkJvNsw-D2HRoQ-B8dhTyY,8845
769
763
  qiskit/quantum_info/operators/base_operator.py,sha256=2QH-ETcUqkNt6qEbkCbkdFPVeClvZ2BUoBWHS4hDZTc,4957
770
- qiskit/quantum_info/operators/operator.py,sha256=zoc1fmlO5v2ZMpvS2dK7WRVgb89hAp0c3nmviE2zMNI,31236
764
+ qiskit/quantum_info/operators/operator.py,sha256=jyTbBHwVjC6Iz2QM4sHQcxVk085QSUc432XRQL4hZIA,32147
771
765
  qiskit/quantum_info/operators/__init__.py,sha256=R_TOo9xrY7qar_hnqNzdbxPhCE_fLK0wWbv3wAox__c,966
772
766
  qiskit/quantum_info/operators/random.py,sha256=_B5ys2zsWMls9i7Ch5qn4pfsUHVRN7_Ojn_3zUnozCg,5226
773
767
  qiskit/quantum_info/operators/op_shape.py,sha256=8cw6k5dELs3YbpozHMpiyfUAfreW-RGqDMbwG87CPQM,19195
@@ -818,3 +812,9 @@ qiskit/compiler/__init__.py,sha256=Far4-zXOyDGCqdNmFP4Q8zV47meApMw6sbIdd1t_wM4,9
818
812
  qiskit/compiler/assembler.py,sha256=e6LEZ5gZKj5YkFvEUQswmgg5Q5z0wC1BsN-22Su-W-4,26709
819
813
  qiskit/compiler/transpiler.py,sha256=LZYdnfqb2UDufn_Tdl1tVgT-_BY_zzEF7YDW182-FuE,24018
820
814
  qiskit/compiler/scheduler.py,sha256=wjIqDBNkspcLMEuHxHxCUREKiq3FMx9xfo0Ug_QPBYA,4411
815
+ qiskit-1.2.1.dist-info/RECORD,,
816
+ qiskit-1.2.1.dist-info/WHEEL,sha256=lmqPbMnkYfRLFzK4tzuBqPppyHOzdJYfX2reiDko3_0,113
817
+ qiskit-1.2.1.dist-info/entry_points.txt,sha256=dCqiF7i6g_s6cYnXX7UUO1MM63xFFb5DCHYEYyGAeCc,3556
818
+ qiskit-1.2.1.dist-info/top_level.txt,sha256=_vjFXLv7qrHyJJOC2-JXfG54o4XQygW9GuQPxgtSt9Q,7
819
+ qiskit-1.2.1.dist-info/LICENSE.txt,sha256=IXrBXbzaJ4LgBPUVKIbYR5iMY2eqoMT8jDVTY8Ib0iQ,11416
820
+ qiskit-1.2.1.dist-info/METADATA,sha256=GkvFfxxI1BKdU54hR1h8pMU8N2Hqift5Jjnc3mpPIFY,12867
File without changes