Skip to content
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

Fix docstring surrounding whitespace #9689

Merged
merged 2 commits into from
Mar 1, 2023
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
2 changes: 1 addition & 1 deletion qiskit/algorithms/amplitude_amplifiers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Amplitude Amplifiers Package """
"""Amplitude Amplifiers Package"""

from .amplitude_amplifier import AmplitudeAmplifier, AmplitudeAmplifierResult
from .amplification_problem import AmplificationProblem
Expand Down
2 changes: 1 addition & 1 deletion qiskit/algorithms/eigen_solvers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Eigen Solvers Package """
"""Eigen Solvers Package"""

from .numpy_eigen_solver import NumPyEigensolver
from .eigen_solver import Eigensolver, EigensolverResult
Expand Down
2 changes: 1 addition & 1 deletion qiskit/algorithms/factorizers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Factorizers Package """
"""Factorizers Package"""

from .shor import Shor, ShorResult

Expand Down
2 changes: 1 addition & 1 deletion qiskit/algorithms/minimum_eigen_solvers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Minimum Eigen Solvers Package """
"""Minimum Eigen Solvers Package"""

from .vqe import VQE, VQEResult
from .qaoa import QAOA
Expand Down
2 changes: 1 addition & 1 deletion qiskit/algorithms/minimum_eigen_solvers/qaoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" The Quantum Approximate Optimization Algorithm. """
"""The Quantum Approximate Optimization Algorithm."""

from typing import List, Callable, Optional, Union
import warnings
Expand Down
2 changes: 1 addition & 1 deletion qiskit/algorithms/minimum_eigensolvers/qaoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""The quantum approximate optimization algorithm. """
"""The quantum approximate optimization algorithm."""

from __future__ import annotations

Expand Down
2 changes: 1 addition & 1 deletion qiskit/algorithms/optimizers/nlopts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" NLopt based global optimizers """
"""NLopt based global optimizers"""
2 changes: 1 addition & 1 deletion qiskit/algorithms/optimizers/nlopts/direct_l.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" DIviding RECTangles Locally-biased optimizer. """
"""DIviding RECTangles Locally-biased optimizer."""

from .nloptimizer import NLoptOptimizer, NLoptOptimizerType

Expand Down
2 changes: 1 addition & 1 deletion qiskit/algorithms/optimizers/nlopts/direct_l_rand.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""DIviding RECTangles Locally-biased Randomized optimizer. """
"""DIviding RECTangles Locally-biased Randomized optimizer."""

from .nloptimizer import NLoptOptimizer, NLoptOptimizerType

Expand Down
2 changes: 1 addition & 1 deletion qiskit/algorithms/optimizers/nlopts/esch.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" ESCH evolutionary optimizer. """
"""ESCH evolutionary optimizer."""

from .nloptimizer import NLoptOptimizer, NLoptOptimizerType

Expand Down
2 changes: 1 addition & 1 deletion qiskit/algorithms/optimizers/nlopts/isres.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Improved Stochastic Ranking Evolution Strategy optimizer. """
"""Improved Stochastic Ranking Evolution Strategy optimizer."""

from .nloptimizer import NLoptOptimizer, NLoptOptimizerType

Expand Down
2 changes: 1 addition & 1 deletion qiskit/algorithms/optimizers/nlopts/nloptimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Minimize using objective function """
"""Minimize using objective function"""

from typing import List, Optional, Tuple, Callable
from enum import Enum
Expand Down
2 changes: 1 addition & 1 deletion qiskit/algorithms/optimizers/tnc.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""Truncated Newton (TNC) optimizer. """
"""Truncated Newton (TNC) optimizer."""

from typing import Optional

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@


def _binomial_coefficients(n):
""" "Return a dictionary of binomial coefficients
"""Return a dictionary of binomial coefficients

Based-on/forked from sympy's binomial_coefficients() function [#]

Expand All @@ -41,7 +41,7 @@ def _binomial_coefficients(n):


def _large_coefficients_iter(m, n):
""" "Return an iterator of multinomial coefficients
"""Return an iterator of multinomial coefficients

Based-on/forked from sympy's multinomial_coefficients_iterator() function [#]

Expand Down Expand Up @@ -87,7 +87,7 @@ def _large_coefficients_iter(m, n):


def _multinomial_coefficients(m, n):
""" "Return an iterator of multinomial coefficients
"""Return an iterator of multinomial coefficients

Based-on/forked from sympy's multinomial_coefficients() function [#]

Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/converters/circuit_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" CircuitSampler Class """
"""CircuitSampler Class"""


import logging
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/converters/converter_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" ConverterBase Class """
"""ConverterBase Class"""

from abc import ABC, abstractmethod

Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/converters/dict_to_circuit_sum.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""DictToCircuitSum Class """
"""DictToCircuitSum Class"""

from qiskit.opflow.converters.converter_base import ConverterBase
from qiskit.opflow.list_ops.list_op import ListOp
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/converters/pauli_basis_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" PauliBasisChange Class """
"""PauliBasisChange Class"""

from functools import partial, reduce
from typing import Callable, List, Optional, Tuple, Union, cast
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/converters/two_qubit_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Z2 Symmetry Tapering Converter Class """
"""Z2 Symmetry Tapering Converter Class"""

import logging
from typing import List, Tuple, Union, cast
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/evolutions/evolution_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" EvolutionBase Class """
"""EvolutionBase Class"""

from abc import ABC, abstractmethod

Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/evolutions/evolution_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" EvolutionFactory Class """
"""EvolutionFactory Class"""

from qiskit.opflow.operator_base import OperatorBase
from qiskit.opflow.evolutions.evolution_base import EvolutionBase
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/evolutions/evolved_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" EvolutionOp Class """
"""EvolutionOp Class"""

from typing import List, Optional, Set, Union, cast

Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/evolutions/matrix_evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" MatrixEvolution Class """
"""MatrixEvolution Class"""

import logging

Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/evolutions/pauli_trotter_evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" PauliTrotterEvolution Class """
"""PauliTrotterEvolution Class"""

import logging
from typing import Optional, Union, cast
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/evolutions/trotterizations/suzuki.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Suzuki Class """
"""Suzuki Class"""

from typing import List, Union, cast

Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/evolutions/trotterizations/trotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Trotter Class """
"""Trotter Class"""

from qiskit.opflow.evolutions.trotterizations.suzuki import Suzuki

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Trotterization Algorithm Base """
"""Trotterization Algorithm Base"""

from abc import abstractmethod

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""TrotterizationFactory Class """
"""TrotterizationFactory Class"""

from qiskit.opflow.evolutions.trotterizations.qdrift import QDrift
from qiskit.opflow.evolutions.trotterizations.suzuki import Suzuki
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/expectations/aer_pauli_expectation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" AerPauliExpectation Class """
"""AerPauliExpectation Class"""

import logging
from functools import reduce
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/expectations/expectation_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" ExpectationBase Class """
"""ExpectationBase Class"""

from abc import abstractmethod
from typing import Union
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/expectations/expectation_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" ExpectationFactory Class """
"""ExpectationFactory Class"""

import logging
from typing import Optional, Union
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/expectations/matrix_expectation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" MatrixExpectation Class """
"""MatrixExpectation Class"""

from typing import Union

Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/expectations/pauli_expectation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" PauliExpectation Class """
"""PauliExpectation Class"""

import logging
from typing import Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

"""CircuitGradient Class """
"""CircuitGradient Class"""

from abc import abstractmethod
from typing import List, Union, Optional, Tuple, Set
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/gradients/circuit_qfis/circuit_qfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" CircuitQFI Class """
"""CircuitQFI Class"""

from abc import abstractmethod
from typing import List, Union
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/gradients/derivative_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" DerivativeBase Class """
"""DerivativeBase Class"""

import warnings
from abc import abstractmethod
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/gradients/natural_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" Natural Gradient. """
"""Natural Gradient."""

from collections.abc import Iterable
from typing import List, Tuple, Callable, Optional, Union
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/list_ops/composed_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" ComposedOp Class """
"""ComposedOp Class"""

from functools import partial, reduce
from typing import List, Optional, Union, cast, Dict
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/list_ops/list_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" ListOp Operator Class """
"""ListOp Operator Class"""

from functools import reduce
from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Sequence, Union, cast
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/list_ops/summed_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" SummedOp Class """
"""SummedOp Class"""

from typing import List, Union, cast, Dict

Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/list_ops/tensored_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" TensoredOp Class """
"""TensoredOp Class"""

from functools import partial, reduce
from typing import List, Union, cast, Dict
Expand Down
2 changes: 1 addition & 1 deletion qiskit/opflow/operator_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.

""" OperatorBase Class """
"""OperatorBase Class"""

import itertools
from abc import ABC, abstractmethod
Expand Down
Loading