Skip to content

Commit

Permalink
⬆️🪝 update pre-commit hooks (#387)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/srstevenson/nb-clean: 3.2.0 →
3.3.0](srstevenson/nb-clean@3.2.0...3.3.0)
- [github.com/astral-sh/ruff-pre-commit: v0.4.8 →
v0.4.9](astral-sh/ruff-pre-commit@v0.4.8...v0.4.9)
<!--pre-commit.ci end-->

---------

Signed-off-by: burgholzer <burgholzer@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: burgholzer <burgholzer@me.com>
  • Loading branch information
pre-commit-ci[bot] and burgholzer authored Jun 17, 2024
1 parent 1a3ead5 commit a80fd38
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ repos:

# Clean jupyter notebooks
- repo: https://github.com/srstevenson/nb-clean
rev: 3.2.0
rev: 3.3.0
hooks:
- id: nb-clean
args:
Expand All @@ -56,7 +56,7 @@ repos:

# Python linting using ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.8
rev: v0.4.9
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
Expand Down
4 changes: 2 additions & 2 deletions test/python/hybridsimulator/test_hybrid_qasm_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def test_qasm_simulator(self) -> None:
}

assert len(target) == len(counts)
for key in target:
for key, value in target.items():
assert key in counts
assert abs(target[key] - counts[key]) < threshold
assert abs(value - counts[key]) < threshold

def test_qasm_simulator_access(self) -> None:
"""Test data counts output for multiple quantum circuits in a single job."""
Expand Down
4 changes: 2 additions & 2 deletions test/python/simulator/test_qasm_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def test_qasm_simulator(circuit: QuantumCircuit, backend: QasmSimulatorBackend,
"001 001": average,
}
assert len(target) == len(counts)
for key in target:
for key, value in target.items():
assert key in counts
assert abs(target[key] - counts[key]) < threshold
assert abs(value - counts[key]) < threshold


def test_qasm_simulator_support_parametrized_gates(backend: QasmSimulatorBackend, shots: int) -> None:
Expand Down
16 changes: 8 additions & 8 deletions test/python/taskbasedsimulator/test_path_sim_qasm_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def test_qasm_simulator(self) -> None:
}

assert len(target) == len(counts)
for key in target:
for key, value in target.items():
assert key in counts
assert abs(target[key] - counts[key]) < threshold
assert abs(value - counts[key]) < threshold

def test_qasm_simulator_access(self) -> None:
"""Test data counts output for multiple quantum circuits in a single job."""
Expand Down Expand Up @@ -90,9 +90,9 @@ def test_qasm_simulator_pairwise(self) -> None:
}

assert len(target) == len(counts)
for key in target:
for key, value in target.items():
assert key in counts
assert abs(target[key] - counts[key]) < threshold
assert abs(value - counts[key]) < threshold

def test_qasm_simulator_bracket(self) -> None:
"""Test data counts output for single circuit run against reference."""
Expand All @@ -114,9 +114,9 @@ def test_qasm_simulator_bracket(self) -> None:
}

assert len(target) == len(counts)
for key in target:
for key, value in target.items():
assert key in counts
assert abs(target[key] - counts[key]) < threshold
assert abs(value - counts[key]) < threshold

def test_qasm_simulator_alternating(self) -> None:
"""Test data counts output for single circuit run against reference."""
Expand All @@ -138,6 +138,6 @@ def test_qasm_simulator_alternating(self) -> None:
}

assert len(target) == len(counts)
for key in target:
for key, value in target.items():
assert key in counts
assert abs(target[key] - counts[key]) < threshold
assert abs(value - counts[key]) < threshold

0 comments on commit a80fd38

Please sign in to comment.