Skip to content

Commit

Permalink
Merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
ElePT committed Jan 12, 2024
1 parent d75c1c7 commit 8346968
Show file tree
Hide file tree
Showing 43 changed files with 2,170 additions and 538 deletions.
6 changes: 0 additions & 6 deletions docs/apidoc/tools.rst

This file was deleted.

2 changes: 1 addition & 1 deletion qiskit/assembler/assemble_circuits.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
converters,
QobjHeader,
)
from qiskit.tools.parallel import parallel_map
from qiskit.utils.parallel import parallel_map


PulseLibrary = Dict[str, List[complex]]
Expand Down
4 changes: 3 additions & 1 deletion qiskit/circuit/quantumcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1955,7 +1955,9 @@ def add_register(self, *regs: Register | int | Sequence[Bit]) -> None:

def add_bits(self, bits: Iterable[Bit]) -> None:
"""Add Bits to the circuit."""
duplicate_bits = set(self._qubit_indices).union(self._clbit_indices).intersection(bits)
duplicate_bits = {
bit for bit in bits if bit in self._qubit_indices or bit in self._clbit_indices
}
if duplicate_bits:
raise CircuitError(f"Attempted to add bits found already in circuit: {duplicate_bits}")

Expand Down
2 changes: 1 addition & 1 deletion qiskit/compiler/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from qiskit.providers.backend import Backend
from qiskit.scheduler import ScheduleConfig
from qiskit.scheduler.schedule_circuit import schedule_circuit
from qiskit.tools.parallel import parallel_map
from qiskit.utils.parallel import parallel_map

logger = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion qiskit/passmanager/passmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import dill

from qiskit.tools.parallel import parallel_map
from qiskit.utils.parallel import parallel_map
from .base_tasks import Task, PassManagerIR
from .exceptions import PassManagerError
from .flow_controllers import FlowControllerLinear
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
# (C) Copyright IBM 2023.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
Expand All @@ -10,7 +10,12 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

# pylint: disable=unused-wildcard-import,missing-module-docstring,wildcard-import
"""
Data containers for primitives.
"""

# NOTE(mtreinish): Import public API here to maintain backwards compat
from qiskit.visualization import *
from .bindings_array import BindingsArray
from .data_bin import make_data_bin
from .observables_array import ObservablesArray
from .primitive_result import PrimitiveResult
from .pub_result import PubResult
Loading

0 comments on commit 8346968

Please sign in to comment.