Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
edyounis committed Dec 5, 2023
1 parent 5d4a9dd commit 3f9613c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions bqskit/compiler/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import atexit
import functools
import logging
import os
import signal
import subprocess
import sys
Expand Down Expand Up @@ -187,16 +186,16 @@ def close(self) -> None:
self.p.send_signal(signal.SIGINT)
_logger.debug('Interrupting attached runtime server.')
self.p.communicate(timeout=1)

except subprocess.TimeoutExpired:
self.p.kill()
_logger.debug('Killing attached runtime server.')
try:
self.p.communicate(timeout=30)
except subprocess.TimeoutExpired:
_logger.warning(
"Failed to kill attached runtime server."
" It may still be running as a zombie process."
'Failed to kill attached runtime server.'
' It may still be running as a zombie process.',
)
else:
_logger.debug('Attached runtime server is down.')
Expand Down
2 changes: 1 addition & 1 deletion bqskit/passes/search/generators/fourparam.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def gen_successors(self, circuit: Circuit, data: PassData) -> list[Circuit]:
if self.count_outer_cnots(circuit, edge) >= 3:
# No need to build circuits with more than 3 cnots in a row
if circuit.num_qudits != 2:
# Gaurd on >2 qubits to prevent high-error glitches in compile
# Guard on >2 qubit to prevent high-error glitches
continue

successor = circuit.copy()
Expand Down

0 comments on commit 3f9613c

Please sign in to comment.