Skip to content

Apply spell check to tutorials #64

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 28 commits into from
May 21, 2021

Conversation

t-imamichi
Copy link
Collaborator

@t-imamichi t-imamichi commented Mar 31, 2021

Summary

Apply spell check to tutorials by sphinxcontrib-spelling. The output is as follows. The typos are fixed in #63.
https://sphinxcontrib-spelling.readthedocs.io/en/latest/

If CI fails in this PR, you can add words to docs/spelling_wordlist.txt.

$ make spell
pylint -rn --disable=all --enable=spelling --spelling-dict=en_US --spelling-private-dict-file=.pylintdict qiskit_optimization test tools

--------------------------------------------------------------------
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)

make -C docs spell SPHINXOPTS=
Running Sphinx v3.5.3
Initializing Spelling Checker 7.1.0
loading pickled environment... done
Ignoring wiki words
Ignoring acronyms
Ignoring Python builtins
Ignoring importable module names
Ignoring contributor names
Adding contents of /Users/ima/tasks/1_2021/qiskit/opt/docs/spelling_wordlist.txt to custom word list
Adding contents of /Users/ima/tasks/1_2021/qiskit/opt/docs/../.pylintdict to custom word list
Looking for custom word list in /var/folders/vt/58nt4rrd4mz552nj2l96bbnm0000gn/T/tmpo6x_94fe/spelling_wordlist.txt
Scanning contributors
[autosummary] generating autosummary for: apidocs/qiskit_optimization.algorithms.rst, apidocs/qiskit_optimization.applications.rst, apidocs/qiskit_optimization.converters.rst, apidocs/qiskit_optimization.problems.rst, apidocs/qiskit_optimization.rst, index.rst, release_notes.rst, stubs/qiskit_optimization.INFINITY.rst, stubs/qiskit_optimization.QiskitOptimizationError.rst, stubs/qiskit_optimization.QuadraticProgram.rst, ..., tutorials/02_converters_for_quadratic_programs.ipynb, tutorials/03_minimum_eigen_optimizer.ipynb, tutorials/04_grover_optimizer.ipynb, tutorials/05_admm_optimizer.ipynb, tutorials/06_examples_max_cut_and_tsp.ipynb, tutorials/07_examples_vehicle_routing.ipynb, tutorials/08_cvar_optimization.ipynb, tutorials/09_application_classes.ipynb, tutorials/10_warm_start_qaoa.ipynb, tutorials/index.rst
building [mo]: targets for 0 po files that are out of date
building [spelling]: all documents
updating environment: 0 added, 8 changed, 0 removed
reading sources... [100%] tutorials/10_warm_start_qaoa
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/01_quadratic_program.ipynb:1021: Spell check: precicely: You can substitute some of variables with constants or other variables. More precicely, .
Writing /Users/ima/tasks/1_2021/qiskit/opt/docs/_build/tutorials/01_quadratic_program.spelling
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/02_converters_for_quadratic_programs.ipynb:256: Spell check: decimla: . Note that we cut off the part after the decimla point in the converted formulation since the left side of the first constraint in the original formulation.
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/02_converters_for_quadratic_programs.ipynb:256: Spell check: symol: can be only integer values. For the second constraint, basically we apply the same approach. However, the symol in the second constraint is .
Writing /Users/ima/tasks/1_2021/qiskit/opt/docs/_build/tutorials/02_converters_for_quadratic_programs.spelling
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/03_minimum_eigen_optimizer.ipynb:32: Spell check: refere: , which allows to replace the resulting spin variables by Pauli Z matrices, and thus, an Ising Hamiltonian. For more details on this mapping we refere to [1]..
Writing /Users/ima/tasks/1_2021/qiskit/opt/docs/_build/tutorials/03_minimum_eigen_optimizer.spelling
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/05_admm_optimizer.ipynb:70: Spell check: untill: , $) untill termination:.
Writing /Users/ima/tasks/1_2021/qiskit/opt/docs/_build/tutorials/05_admm_optimizer.spelling
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/06_examples_max_cut_and_tsp.ipynb:66: Spell check: Gutman:  (QAOA) by Farhi, Goldstone, and Gutman (2014). We frame the algorithm in the context of .
Writing /Users/ima/tasks/1_2021/qiskit/opt/docs/_build/tutorials/06_examples_max_cut_and_tsp.spelling
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/07_examples_vehicle_routing.ipynb:14: Spell check: Gutman: locations and back to the depot, so as to minimize vehicle-miles traveled, time spent, or similar objective functions. In this notebook we formalize an idealized version of the problem and showcase its solution using the quantum approximate optimization approach of Farhi, Goldstone, and Gutman (2014)..
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/07_examples_vehicle_routing.ipynb:87: Spell check: Gutman: Here, we demonstrate an approach that combines classical and quantum computing steps, following the quantum approximate optimization approach of Farhi, Goldstone, and Gutman (2014). In particular, we use the variational quantum eigensolver (VQE). We stress that given the use of limited depth of the quantum circuits employed (variational forms), it is hard to discuss the speed-up of the algorithm, as the solution obtained is heuristic in nature. At the same time, due to the nature and importance.
Writing /Users/ima/tasks/1_2021/qiskit/opt/docs/_build/tutorials/07_examples_vehicle_routing.spelling
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/09_application_classes.ipynb:9: Spell check: Optimziation: Application Classes for Optimziation Problems.
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/09_application_classes.ipynb:53: Spell check: maximimized: Given an undirected graph, find a partition of nodes into two subsets such that the total weight of the edges between the two subsets is maximimized..
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/09_application_classes.ipynb:61: Spell check: exacly: Given a graph, find a route with the minimum distance such that the route visits each city exacly once..
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/09_application_classes.ipynb:63: Spell check: Vechile: Vechile routing problem.
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/09_application_classes.ipynb:82: Spell check: introdcue: We introdcue examples of the vertex cover problem and the knapsack problem in this page..
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/09_application_classes.ipynb:84: Spell check: avaiable: Examples of the max-cut problem and the traveling salesman problem are avaiable in .
Writing /Users/ima/tasks/1_2021/qiskit/opt/docs/_build/tutorials/09_application_classes.spelling
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/10_warm_start_qaoa.ipynb:585: Spell check: gound: Next, we create the mixer operator for QAOA. When warm-starting QAOA we must ensure that the mixer operator has the initial state as gound state. We therefore chose the Hamiltonian.
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/10_warm_start_qaoa.ipynb:818: Spell check: computs:  which is illustrated below. This solver will solve a QUBO with a warm-start QAOA. It computs .
/Users/ima/tasks/1_2021/qiskit/opt/docs/tutorials/10_warm_start_qaoa.ipynb:818: Spell check: behaviour:  by relaxing the problem. This behaviour is controlled by setting .
Writing /Users/ima/tasks/1_2021/qiskit/opt/docs/_build/tutorials/10_warm_start_qaoa.spelling
writing output... [100%] tutorials/index
WARNING: Found 17 misspelled words
build succeeded, 1 warning.

Details and comments

@t-imamichi t-imamichi mentioned this pull request Mar 31, 2021
@t-imamichi t-imamichi changed the title Apply spell check to tutorials [PoC] Apply spell check to tutorials Mar 31, 2021
@woodsp-ibm
Copy link
Member

Looks good :) I noted in another PR that there is a spell checker extension that can be installed to your jupyter env. so that it does spell checking when you are editing. I installed it some time back as I found it useful. Of course it does not get rid of checking in the build - just means that hopefully notebooks arrive with no spelling mistakes to start with :)

@t-imamichi
Copy link
Collaborator Author

Yes, spell check while editing is important. Which extension do you recommend?

As for the build time spell check, if other spell check tools of notebooks are available, I would like to discuss which to use.

@t-imamichi t-imamichi added the on hold Can not fix yet label Apr 22, 2021
@t-imamichi t-imamichi changed the title [PoC] Apply spell check to tutorials Apply spell check to tutorials May 21, 2021
@t-imamichi t-imamichi added automerge and removed on hold Can not fix yet labels May 21, 2021
@mergify mergify bot merged commit 73955c1 into qiskit-community:main May 21, 2021
@t-imamichi t-imamichi deleted the spellcheck-tutorials branch May 21, 2021 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants