From 116613acfd7db92833d333f8f40bbc00fffe4bd5 Mon Sep 17 00:00:00 2001 From: cqc-melf <70640934+cqc-melf@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:36:43 +0100 Subject: [PATCH] update back and pylint version (#137) # Description Please summarise the changes. # Related issues Please mention any github issues addressed by this PR. # Checklist - [ ] I have run the tests on a device with GPUs. - [ ] I have performed a self-review of my code. - [ ] I have commented hard-to-understand parts of my code. - [ ] I have made corresponding changes to the public API documentation. - [ ] I have added tests that prove my fix is effective or that my feature works. - [ ] I have updated the changelog with any user-facing changes. --- .github/workflows/lint.yml | 2 +- tests/test_general_state.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f477192b..99264a7b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -24,7 +24,7 @@ jobs: - name: Update pip run: pip install --upgrade pip - name: Install black and pylint - run: pip install black~=22.3 pylint~=3.0 + run: pip install black pylint - name: Check files are formatted with black run: | black --check . diff --git a/tests/test_general_state.py b/tests/test_general_state.py index d8cebb62..f3aadf5b 100644 --- a/tests/test_general_state.py +++ b/tests/test_general_state.py @@ -269,8 +269,7 @@ def test_sampler(circuit: Circuit, measure_all: bool) -> None: # Obtain all compatible basis states (bitstring encoded as int) non_measured = circuit.n_qubits - num_measured compatible = [ - (outcome << non_measured) + offset - for offset in range(2**non_measured) + (outcome << non_measured) + offset for offset in range(2**non_measured) ] # The probability is the sum of that of all compatible basis states prob = sum(abs(sv_pytket[v]) ** 2 for v in compatible)