Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/submodules/extern/LogicBlocks-65c…
Browse files Browse the repository at this point in the history
…a91c
  • Loading branch information
pehamTom authored Jun 27, 2023
2 parents 1805b55 + 5d2525b commit 9c1b405
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ repos:

# Run ruff (subsumes pyupgrade, isort, flake8+plugins, and more)
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.272
rev: v0.0.275
hooks:
- id: ruff
args: ["--fix"]
Expand All @@ -64,15 +64,15 @@ repos:

# Also run Black on examples in the documentation
- repo: https://github.com/asottile/blacken-docs
rev: "1.13.0"
rev: "1.14.0"
hooks:
- id: blacken-docs
additional_dependencies:
- black==23.3.0 # keep in sync with black hook

# Check static types with mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.3.0"
rev: "v1.4.1"
hooks:
- id: mypy
files: ^(mqt/qmap|test/python|setup.py)
Expand All @@ -85,14 +85,14 @@ repos:

# Check for spelling
- repo: https://github.com/codespell-project/codespell
rev: "v2.2.4"
rev: "v2.2.5"
hooks:
- id: codespell
args: ["-L", "wille,linz,applys", "--skip", "*.ipynb"]

# Clang-format the C++ part of the code base automatically
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: "v16.0.4"
rev: "v16.0.6"
hooks:
- id: clang-format
types_or: [c++, c, cuda]
Expand Down
4 changes: 2 additions & 2 deletions mqt/qmap/clifford_synthesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def _circuit_from_qasm(qasm: str) -> QuantumCircuit:

def synthesize_clifford(
target_tableau: str | Clifford | PauliList | Tableau,
initial_tableau: str | Clifford | PauliList | Tableau = None,
initial_tableau: str | Clifford | PauliList | Tableau | None = None,
include_destabilizers: bool = False,
**kwargs: Any | None,
) -> tuple[QuantumCircuit, SynthesisResults]:
Expand Down Expand Up @@ -143,7 +143,7 @@ def synthesize_clifford(

def optimize_clifford(
circuit: str | QuantumCircuit | QuantumComputation,
initial_tableau: str | Clifford | PauliList | Tableau = None,
initial_tableau: str | Clifford | PauliList | Tableau | None = None,
include_destabilizers: bool = False,
**kwargs: Any | None,
) -> tuple[QuantumCircuit, SynthesisResults]:
Expand Down
3 changes: 1 addition & 2 deletions mqt/qmap/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ def extract_initial_layout_from_qasm(qasm: str, qregs: list[QuantumRegister]) ->
# convert tokens to integers
int_tokens = [int(token) for token in tokens]
# create an empty layout
layout = Layout().from_intlist(int_tokens, *qregs)
return layout
return Layout().from_intlist(int_tokens, *qregs)
msg = "No initial layout found in QASM file."
raise ValueError(msg)

Expand Down
2 changes: 0 additions & 2 deletions mqt/qmap/pyqmap.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Any, ClassVar, overload

if TYPE_CHECKING: # pragma: no cover
Expand Down

0 comments on commit 9c1b405

Please sign in to comment.