File tree Expand file tree Collapse file tree 3 files changed +11
-10
lines changed
bqskit/passes/partitioning Expand file tree Collapse file tree 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 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
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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11[metadata]
22name = bqskit
3- version = 1.0.0
3+ version = 1.0.1
44description = Berkeley Quantum Synthesis Toolkit
55long_description = file: README.md
66long_description_content_type = text/markdown
You can’t perform that action at this time.
0 commit comments