Skip to content

⬆️🪝 update pre-commit hooks #387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading