Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ nbtest = [
]
style = [
"autoflake==2.3.3",
"black[jupyter]~=25.1",
"black[jupyter]~=26.5",
"ruff==0.15.20",
"nbqa>=1.6.0",
]
Expand Down
1 change: 1 addition & 0 deletions qiskit_addon_cutting/cut_finding/circuit_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# that they have been altered from the originals.

"""Quantum circuit representation compatible with cut-finding optimizer."""

from __future__ import annotations

import copy
Expand Down
1 change: 0 additions & 1 deletion qiskit_addon_cutting/cut_finding/cutting_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

"""Classes needed to implement the actions involved in circuit cutting."""


from __future__ import annotations

from abc import ABC, abstractmethod
Expand Down
2 changes: 1 addition & 1 deletion qiskit_addon_cutting/cut_finding/lo_cuts_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# that they have been altered from the originals.

"""File containing the wrapper class for optimizing LO gate and wire cuts."""

from __future__ import annotations

from typing import TYPE_CHECKING, NamedTuple
Expand All @@ -28,7 +29,6 @@
from .optimization_settings import OptimizationSettings
from .circuit_interface import SimpleGateList


# Functions for generating the cut optimization search space
cut_optimization_search_funcs = SearchFunctions(
cost_func=cut_optimization_upper_bound_cost_func, # Valid choice only for LO cuts.
Expand Down
1 change: 1 addition & 0 deletions qiskit_addon_cutting/cut_finding/search_space_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# that they have been altered from the originals.

"""Classes needed to generate and explore a search space."""

from __future__ import annotations

from dataclasses import dataclass
Expand Down
1 change: 1 addition & 0 deletions qiskit_addon_cutting/instructions/cut_wire.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# that they have been altered from the originals.

"""Single-qubit instruction to denote a wire cut location."""

from __future__ import annotations

from qiskit.circuit import Gate, QuantumCircuit
Expand Down
1 change: 1 addition & 0 deletions qiskit_addon_cutting/instructions/move.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# that they have been altered from the originals.

"""Two-qubit instruction representing a swap + single-qubit reset."""

from __future__ import annotations

from qiskit.circuit import QuantumCircuit, Instruction
Expand Down
1 change: 0 additions & 1 deletion qiskit_addon_cutting/qpd/decompositions.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
from ..instructions import Move
from ..utils.iteration import unique_by_id


_qpdbasis_from_instruction_funcs: dict[str, Callable[[Instruction], QPDBasis]] = {}


Expand Down
1 change: 1 addition & 0 deletions qiskit_addon_cutting/qpd/instructions/qpd_measure.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# that they have been altered from the originals.

"""Quasiprobability decomposition measure marker instruction."""

from __future__ import annotations

from qiskit.circuit import Instruction
Expand Down
1 change: 1 addition & 0 deletions qiskit_addon_cutting/qpd/qpd_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# that they have been altered from the originals.

"""Class containing the basis in which to decompose an operation."""

from __future__ import annotations

from collections.abc import Sequence
Expand Down
1 change: 0 additions & 1 deletion qiskit_addon_cutting/qpd/weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

from .qpd_basis import QPDBasis


logger = logging.getLogger(__name__)


Expand Down
1 change: 0 additions & 1 deletion qiskit_addon_cutting/utils/observable_grouping.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import numpy as np
from qiskit.quantum_info import Pauli, PauliList


_I = Pauli("I")


Expand Down
3 changes: 1 addition & 2 deletions qiskit_addon_cutting/utils/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from qiskit.primitives.primitive_job import PrimitiveJob
from qiskit.result import QuasiDistribution


_TOLERANCE = 1e-16


Expand Down Expand Up @@ -67,7 +66,7 @@ def simulate_statevector_outcomes(qc: QuantumCircuit, /) -> dict[int, float]:
k0 = k ^ (k & k_flipper) # like k, but k_flipper bit will NOT be set
k1 = k | k_flipper # like k, but k_flipper bit (if any) will be set
for i, (prob, sv) in enumerate(svs):
(prob0, prob1) = sv.probabilities([qubit_idx])
prob0, prob1 = sv.probabilities([qubit_idx])
dims = sv.dims([qubit_idx]) # always going to be (2,) for a qubit
pending_delete.append((k, i))
# Handle the 0 branch of the wave function
Expand Down
1 change: 1 addition & 0 deletions qiskit_addon_cutting/wire_cutting_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# that they have been altered from the originals.

"""Function to transform a :class:`.CutWire` instruction to a :class:`.Move` instruction."""

from __future__ import annotations

from typing import Callable
Expand Down
1 change: 0 additions & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

import pytest


# https://docs.pytest.org/en/latest/example/simple.html#control-skipping-of-tests-according-to-command-line-option


Expand Down
1 change: 1 addition & 0 deletions test/test_wire_cutting_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# that they have been altered from the originals.

"""Tests for single qubit wire cutting functions."""

from __future__ import annotations

from pytest import fixture, mark, raises
Expand Down
1 change: 1 addition & 0 deletions test/utils/test_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# that they have been altered from the originals.

"""Tests for quantum circuit transformation functions."""

import unittest

import pytest
Expand Down
Loading