Skip to content

Commit 188a592

Browse files
authored
Merge branch 'master' into mh-increase-min-py-version
2 parents 89b153b + fb7bc39 commit 188a592

File tree

8 files changed

+33
-33
lines changed

8 files changed

+33
-33
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ jobs:
148148
echo base=${{github.ref_name}} >> "$GITHUB_ENV"
149149
150150
- name: Check out a copy of the OpenFermion git repository
151-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
151+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
152152

153153
- name: Determine files changed by this ${{github.event_name}} event
154154
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3
@@ -197,7 +197,7 @@ jobs:
197197
timeout-minutes: 10
198198
steps:
199199
- name: Check out a copy of the git repository
200-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
200+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
201201

202202
- name: Set up Python with caching of pip dependencies
203203
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
@@ -226,7 +226,7 @@ jobs:
226226
timeout-minutes: 10
227227
steps:
228228
- name: Check out a copy of the git repository
229-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
229+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
230230
with:
231231
fetch-depth: 0
232232

@@ -255,7 +255,7 @@ jobs:
255255
timeout-minutes: 10
256256
steps:
257257
- name: Check out a copy of the git repository
258-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
258+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
259259

260260
- name: Set up Python and restore cache
261261
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
@@ -282,7 +282,7 @@ jobs:
282282
timeout-minutes: 10
283283
steps:
284284
- name: Check out a copy of the git repository
285-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
285+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
286286

287287
- name: Set up Python and restore cache
288288
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
@@ -322,7 +322,7 @@ jobs:
322322
fail-fast: false
323323
steps:
324324
- name: Check out a copy of the git repository
325-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
325+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
326326

327327
- name: Set up Python and restore cache
328328
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
@@ -369,7 +369,7 @@ jobs:
369369
fail-fast: false
370370
steps:
371371
- name: Check out a copy of the git repository
372-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
372+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
373373

374374
- name: Set up Python and restore cache
375375
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
@@ -411,7 +411,7 @@ jobs:
411411
timeout-minutes: 15
412412
steps:
413413
- name: Check out a copy of the git repository
414-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
414+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
415415

416416
# Note: deliberately not using our Python cache here b/c this runs
417417
# a different version of Python.
@@ -437,7 +437,7 @@ jobs:
437437
timeout-minutes: 15
438438
steps:
439439
- name: Check out a copy of the git repository
440-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
440+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
441441
with:
442442
fetch-depth: 0
443443

@@ -467,7 +467,7 @@ jobs:
467467
changed_files: ${{needs.changes.outputs.yaml_files}}
468468
steps:
469469
- name: Check out a copy of the git repository
470-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
470+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
471471

472472
- name: Set up yamllint output problem matcher
473473
run: echo "::add-matcher::.github/problem-matchers/yamllint.json"
@@ -488,7 +488,7 @@ jobs:
488488
changed_files: ${{needs.changes.outputs.json_files}}
489489
steps:
490490
- name: Check out a copy of the git repository
491-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
491+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
492492

493493
- name: Install jsonlint
494494
run: npm install -g @prantlf/jsonlint
@@ -509,7 +509,7 @@ jobs:
509509
changed_files: ${{needs.changes.outputs.cff_files}}
510510
steps:
511511
- name: Check out a copy of the git repository
512-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
512+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
513513

514514
- name: Install cffconvert
515515
run: pip install cffconvert
@@ -528,7 +528,7 @@ jobs:
528528
changed_files: ${{needs.changes.outputs.docker_files}}
529529
steps:
530530
- name: Check out a copy of the git repository
531-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
531+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
532532

533533
# Note: there is a hadolint GitHub Actions available, but it only accepts
534534
# one Dockerfile to check. We have > 1 file to check, so we need the CLI.
@@ -552,7 +552,7 @@ jobs:
552552
changed_files: ${{needs.changes.outputs.gha_files}}
553553
steps:
554554
- name: Check out a copy of the git repository
555-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
555+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
556556

557557
# The next action simply fails if there are any unpinned actions.
558558
- name: Verify that all workflow actions have pinned versions
@@ -578,7 +578,7 @@ jobs:
578578
changed_files: ${{needs.changes.outputs.shell_files}}
579579
steps:
580580
- name: Check out a copy of the git repository
581-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
581+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
582582

583583
- name: Set up shellcheck output problem matcher
584584
run: echo "::add-matcher::.github/problem-matchers/shellcheck.json"
@@ -602,7 +602,7 @@ jobs:
602602
timeout-minutes: 5
603603
steps:
604604
- name: Check out a copy of the git repository
605-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
605+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
606606

607607
- name: Set up Python with caching of pip dependencies
608608
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5

.github/workflows/codeql.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ jobs:
8080
language: ${{fromJSON(needs.create-matrix.outputs.language-matrix)}}
8181
steps:
8282
- name: Check out a copy of the git repository
83-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
83+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
8484

8585
- name: Initialize CodeQL scanning tool
86-
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3
86+
uses: github/codeql-action/init@96f518a34f7a870018057716cc4d7a5c014bd61c # v3
8787
with:
8888
languages: ${{matrix.language}}
8989
queries: security-and-quality
@@ -99,6 +99,6 @@ jobs:
9999
- '**/*.txt'
100100
101101
- name: Perform CodeQL Analysis
102-
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3
102+
uses: github/codeql-action/analyze@96f518a34f7a870018057716cc4d7a5c014bd61c # v3
103103
with:
104104
category: "/language:${{matrix.language}}"

.github/workflows/nightly-pytest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474

7575
steps:
7676
- name: Check out a copy of the OpenFermion git repository
77-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
77+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
7878

7979
- name: Set up Python ${{matrix.python-version}}
8080
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5

.github/workflows/osv-scanner.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
contents: read
7272
steps:
7373
- name: Check out a copy of the git repository
74-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
74+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
7575
with:
7676
fetch-depth: 0
7777

@@ -82,7 +82,7 @@ jobs:
8282
8383
- name: Run OSV scanner on existing code
8484
# yamllint disable rule:line-length
85-
uses: google/osv-scanner-action/osv-scanner-action@40a8940a65eab1544a6af759e43d936201a131a2 # v2.0.3
85+
uses: google/osv-scanner-action/osv-scanner-action@456ceb78310755116e0a3738121351006286b797 # v2.2.1
8686
continue-on-error: true
8787
with:
8888
scan-args: |-
@@ -99,7 +99,7 @@ jobs:
9999
100100
- name: Run OSV scanner on new code
101101
# yamllint disable rule:line-length
102-
uses: google/osv-scanner-action/osv-scanner-action@40a8940a65eab1544a6af759e43d936201a131a2 # v2.0.3
102+
uses: google/osv-scanner-action/osv-scanner-action@456ceb78310755116e0a3738121351006286b797 # v2.2.1
103103
continue-on-error: true
104104
with:
105105
scan-args: |-
@@ -110,7 +110,7 @@ jobs:
110110
111111
- name: Run the OSV scanner reporter
112112
# yamllint disable rule:line-length
113-
uses: google/osv-scanner-action/osv-reporter-action@40a8940a65eab1544a6af759e43d936201a131a2 # v2.0.3
113+
uses: google/osv-scanner-action/osv-reporter-action@456ceb78310755116e0a3738121351006286b797 # v2.2.1
114114
with:
115115
scan-args: |-
116116
--output=osv-results.sarif
@@ -122,7 +122,7 @@ jobs:
122122
- name: Upload results to the repository's code-scanning results dashboard
123123
id: upload_artifact
124124
# yamllint disable rule:line-length
125-
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
125+
uses: github/codeql-action/upload-sarif@96f518a34f7a870018057716cc4d7a5c014bd61c # v3.29.10
126126
with:
127127
sarif_file: osv-results.sarif
128128

.github/workflows/scorecard.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
timeout-minutes: 15
5757
steps:
5858
- name: Check out a copy of the git repository
59-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6060
with:
6161
persist-credentials: false
6262

@@ -72,6 +72,6 @@ jobs:
7272
publish_results: true
7373

7474
- name: Upload results to code-scanning dashboard
75-
uses: github/codeql-action/upload-sarif@181d5eefc20863364f96762470ba6f862bdef56b # v3
75+
uses: github/codeql-action/upload-sarif@96f518a34f7a870018057716cc4d7a5c014bd61c # v3
7676
with:
7777
sarif_file: scorecard-results.sarif

src/openfermion/ops/representations/polynomial_tensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1010
# See the License for the specific language governing permissions and
1111
# limitations under the License.
12-
"""Base class for representating operators that are polynomials in the
12+
"""Base class for representing operators that are polynomials in the
1313
fermionic ladder operators."""
1414

1515
import copy

src/openfermion/ops/representations/quadratic_hamiltonian.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def ground_energy(self):
130130
return numpy.sum(orbital_energies[numpy.where(orbital_energies < 0.0)[0]]) + constant
131131

132132
def majorana_form(self):
133-
r"""Return the Majorana represention of the Hamiltonian.
133+
r"""Return the Majorana representation of the Hamiltonian.
134134
135135
Any quadratic Hamiltonian can be written in the form
136136
@@ -317,9 +317,9 @@ def index_map(i):
317317
orbital_energies = numpy.concatenate((up_orbital_energies, down_orbital_energies))
318318
diagonalizing_unitary_T = numpy.zeros((n_modes, n_modes), dtype=complex)
319319
diagonalizing_unitary_T[: n_modes // 2, : n_modes // 2] = up_diagonalizing_unitary_T
320-
diagonalizing_unitary_T[
321-
n_modes // 2 :, n_modes // 2 :
322-
] = down_diagonalizing_unitary_T
320+
diagonalizing_unitary_T[n_modes // 2 :, n_modes // 2 :] = (
321+
down_diagonalizing_unitary_T
322+
)
323323
else:
324324
orbital_energies, diagonalizing_unitary_T = numpy.linalg.eigh(matrix)
325325

src/openfermion/transforms/opconversions/qubitoperator_to_paulisum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def qubit_operator_to_pauli_sum(
4848
pauli_sum (PauliSum): cirq PauliSum object.
4949
5050
Raises:
51-
TypeError: if qubit_op is not a QubitOpertor.
51+
TypeError: if qubit_op is not a QubitOperator.
5252
"""
5353
if not isinstance(operator, QubitOperator):
5454
raise TypeError('Input must be a QubitOperator.')

0 commit comments

Comments
 (0)