Skip to content

Commit c7b09a8

Browse files
committed
Revert "fix some lint"
This reverts commit 477d356.
1 parent 477d356 commit c7b09a8

File tree

234 files changed

+3016
-2902
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+3016
-2902
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ select = B,C,E,F,N,P,T4,W,B9
33
max-line-length = 120
44
ignore =
55
E203,E305,E402,E501,E721,E741,F405,F821,F841,F999,W503,W504,C408,E302,W291,E303,N812,N817,E731
6-
EXE001, F403,
6+
EXE001,
77
B007,B008,
88
optional-ascii-coding = True
99
exclude =

.github/workflows/functional_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name: Python package
55

66
on:
7-
push:
7+
push:
88
pull_request:
99

1010
jobs:

.github/workflows/lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55

66
env:
7-
PYTHON_VERSION: "3.9"
7+
PYTHON_VERSION: "3.8"
88

99
defaults:
1010
run:
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
- name: Setup Python 3.9
18+
- name: Setup Python 3.8
1919
uses: actions/setup-python@v4
2020
with:
2121
python-version: ${{ env.PYTHON_VERSION }}

.github/workflows/pull_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Pull Request
33
on: [pull_request]
44

55
env:
6-
PYTHON_VERSION: "3.9"
6+
PYTHON_VERSION: "3.8"
77

88
jobs:
99
pre-commit:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,4 +347,4 @@ model.pt
347347

348348
.cursorignore
349349
.cursor/
350-
.github/copilot-instructions.md
350+
.github/copilot-instructions.md

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ repos:
4040
rev: 22.12.0
4141
hooks:
4242
- id: black
43-
language_version: python3.12
43+
language_version: python3.8
4444

4545
- repo: https://github.com/PyCQA/flake8
4646
rev: 6.0.0
@@ -53,7 +53,7 @@ repos:
5353
hooks:
5454
- id: codespell
5555
args: [
56-
'--ignore-words-list=reord,dout,nd,te,ser,fO,ot,Bu,bu,Ths,UE,Ue,tye,HEl,FO,VeW,WHan,fo,Ot,fPr,bU,GES,uE,Acn',
56+
'--ignore-words-list=reord,dout,nd,te,ser',
5757
--check-filenames,
5858
--check-hidden,
5959
]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ print(op.params.grad)
134134

135135
# Apply gates to qdev with tq.QuantumModule
136136
ops = [
137-
{'name': 'hadamard', 'wires': 0},
137+
{'name': 'hadamard', 'wires': 0},
138138
{'name': 'cnot', 'wires': [0, 1]},
139139
{'name': 'rx', 'wires': 0, 'params': 0.5, 'trainable': True},
140140
{'name': 'u3', 'wires': 0, 'params': [0.1, 0.2, 0.3], 'trainable': True},
@@ -271,7 +271,7 @@ python mnist.py
271271
| measure.py | Measurement of quantum states to get classical values |
272272
| graph.py | Quantum gate graph used in static mode |
273273
| super_layer.py | Layer templates for SuperCircuits |
274-
| plugins/qiskit* | Converters and processors for easy deployment on IBMQ |
274+
| plugins/qiskit* | Convertors and processors for easy deployment on IBMQ |
275275
| examples/| More examples for training QML and VQE models |
276276

277277
## Coding Style

docs/source/conf.py

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,30 @@
2828
# add these directories to sys.path here.
2929
import sys
3030
import os
31+
sys.path.insert(0, os.path.abspath('../..'))
3132

32-
sys.path.insert(0, os.path.abspath("../.."))
33-
34-
# import pathlib
35-
# sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix())
33+
#import pathlib
34+
#sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix())
3635

3736
# -- Project information
3837

39-
project = "TorchQuantum"
40-
copyright = "2021, Hanrui Wang"
41-
author = "Hanrui Wang"
38+
project = 'TorchQuantum'
39+
copyright = '2021, Hanrui Wang'
40+
author = 'Hanrui Wang'
4241

43-
release = "0.1"
44-
version = "0.1.0"
42+
release = '0.1'
43+
version = '0.1.0'
4544

4645
# -- General configuration
4746

4847
extensions = [
49-
"sphinx.ext.duration",
50-
"sphinx.ext.doctest",
51-
"sphinx.ext.autodoc",
52-
"sphinx.ext.autosummary",
53-
"sphinx.ext.intersphinx",
54-
"sphinx.ext.napoleon", # google styled docstring
55-
"sphinx.ext.viewcode", # [source] link to view code
48+
'sphinx.ext.duration',
49+
'sphinx.ext.doctest',
50+
'sphinx.ext.autodoc',
51+
'sphinx.ext.autosummary',
52+
'sphinx.ext.intersphinx',
53+
'sphinx.ext.napoleon', # google styled docstring
54+
'sphinx.ext.viewcode', # [source] link to view code
5655
# 'sphinx.ext.todo',
5756
# 'sphinx.ext.coverage',
5857
# 'sphinxcontrib.katex',
@@ -63,19 +62,19 @@
6362
# 'sphinx.ext.extlinks',
6463
# 'sphinx_autodoc_typehints',
6564
# 'jupyter_sphinx',
66-
"nbsphinx", # support for including Jupyter Notebook (*.ipynb) file
67-
"recommonmark", # support for including markdown (*.md) file
65+
'nbsphinx', # support for including Jupyter Notebook (*.ipynb) file
66+
'recommonmark', # support for including markdown (*.md) file
6867
# 'sphinx_design',
6968
# 'sphinx_reredirects'
7069
]
7170

7271
intersphinx_mapping = {
73-
"python": ("https://docs.python.org/3/", None),
74-
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
72+
'python': ('https://docs.python.org/3/', None),
73+
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
7574
}
76-
intersphinx_disabled_domains = ["std"]
75+
intersphinx_disabled_domains = ['std']
7776

78-
templates_path = ["_templates"]
77+
templates_path = ['_templates']
7978

8079
# -- Options for HTML output
8180

@@ -143,12 +142,12 @@
143142
}
144143
"""
145144

146-
html_theme = "furo"
145+
html_theme = 'furo'
147146
html_theme_options = {
148-
"collapse_navigation": False,
149-
"display_version": True,
150-
"logo_only": False,
151-
"index": "page.html",
147+
'collapse_navigation': False,
148+
'display_version': True,
149+
'logo_only': False,
150+
"index": "page.html"
152151
}
153152

154153
# adjust code block style for readthedocs
@@ -160,4 +159,4 @@
160159
display_gitlab = False
161160
show_source = True
162161
# -- Options for EPUB output
163-
epub_show_urls = "footnote"
162+
epub_show_urls = 'footnote'

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ Files
309309
+-----------------------------------+-----------------------------------+
310310
| super_layer.py | Layer templates for SuperCircuits |
311311
+-----------------------------------+-----------------------------------+
312-
| plugins/qiskit\* | Converters and processors for |
312+
| plugins/qiskit\* | Convertors and processors for |
313313
| | easy deployment on IBMQ |
314314
+-----------------------------------+-----------------------------------+
315315
| examples/ | More examples for training QML |

examples/ICCAD22_tutorial/sec1_basic.ipynb

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)