Skip to content

Commit cdb5fdf

Browse files
authored
Merge pull request #97 from BQSKit/1.0.1
1.0.1
2 parents 98b519c + d2eb4e5 commit cdb5fdf

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
pre-commit:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v1
13-
- uses: actions/setup-python@v1
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-python@v4
1414
with:
1515
python-version: '3.10.6' # TODO: Remove .6 when mypy fixes issue 13627
1616
- name: set PY
@@ -19,4 +19,4 @@ jobs:
1919
with:
2020
path: ~/.cache/pre-commit
2121
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
22-
- uses: pre-commit/action@v1.1.0
22+
- uses: pre-commit/action@v3.0.0

bqskit/passes/partitioning/quick.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ def process_pending_bins() -> None:
128128
while merging:
129129
merging = False
130130
for p in partitioned_circuit.rear:
131-
qudits = partitioned_circuit[p].location
131+
qudits = list(partitioned_circuit[p].location)
132132

133-
# if qudits is subset of bin.qudits
134-
if all(q in bin.qudits for q in qudits):
133+
# if qudits is subset of loc
134+
if all(q in loc for q in qudits):
135135
prev_op = partitioned_circuit.pop(p)
136136
pg = cast(CircuitGate, prev_op.gate)
137137
prev_circ = pg._circuit
@@ -142,14 +142,15 @@ def process_pending_bins() -> None:
142142
merging = True
143143
break
144144

145-
# if bin.qudits is a subset of qudits
146-
if all(q in qudits for q in bin.qudits):
145+
# if loc is a subset of qudits
146+
if all(q in qudits for q in loc):
147147
prev_op = partitioned_circuit.pop(p)
148148
pg = cast(CircuitGate, prev_op.gate)
149149
prev_circ = pg._circuit
150-
lloc = [qudits.index(q) for q in bin.qudits]
150+
lloc = [qudits.index(q) for q in loc]
151151
prev_circ.append_circuit(subc, lloc)
152152
subc.become(prev_circ)
153+
loc = qudits
153154

154155
# retry merging
155156
merging = True

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = bqskit
3-
version = 1.0.0
3+
version = 1.0.1
44
description = Berkeley Quantum Synthesis Toolkit
55
long_description = file: README.md
66
long_description_content_type = text/markdown

0 commit comments

Comments
 (0)