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

QSP iterative angle solver #6694

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

fixing tests

6d353b8
Select commit
Loading
Failed to load commit list.
Draft

QSP iterative angle solver #6694

fixing tests
6d353b8
Select commit
Loading
Failed to load commit list.
codefactor.io / CodeFactor succeeded Dec 16, 2024 in 1s

32 minor issues found.

Annotations

Check notice on line 696 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L696

Trailing whitespace (trailing-whitespace)

Check notice on line 886 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L886

Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)

Check notice on line 579 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L579

Import "import scipy" should be placed at the top of the module (wrong-import-position)

Check notice on line 591 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L591

Anomalous backslash in string: '\s'. String constant might be missing an r prefix. (anomalous-backslash-in-string)

Check notice on line 684 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L684

Trailing whitespace (trailing-whitespace)

Check notice on line 639 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L639

Anomalous backslash in string: '\p'. String constant might be missing an r prefix. (anomalous-backslash-in-string)

Check notice on line 788 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L788

Too many branches (13/12) (too-many-branches)

Check notice on line 894 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L894

Unnecessary "elif" after "return", remove the leading "el" from "elif" (no-else-return)

Check notice on line 575 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L575

String statement has no effect (pointless-string-statement)

Check notice on line 697 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L697

Trailing whitespace (trailing-whitespace)

Check notice on line 591 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L591

Anomalous backslash in string: '\s'. String constant might be missing an r prefix. (anomalous-backslash-in-string)

Check notice on line 608 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L608

Missing function or method docstring (missing-function-docstring)

Check notice on line 684 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L684

Redefining name 'hessian' from outer scope (line 30) (redefined-outer-name)

Check notice on line 686 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L686

Import outside toplevel (autograd.jacobian, autograd.hessian) (import-outside-toplevel)

Check notice on line 30 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L30

Unused hessian imported from autograd (unused-import)

Check notice on line 587 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L587

Import outside toplevel (functools.partial) (import-outside-toplevel)

Check notice on line 587 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L587

Unused partial imported from functools (unused-import)

Check notice on line 588 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L588

Import outside toplevel (functools.wraps) (import-outside-toplevel)

Check notice on line 655 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L655

Import "import math" should be placed at the top of the module (wrong-import-position)

Check notice on line 618 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L618

Import outside toplevel (jax) (import-outside-toplevel)

Check notice on line 607 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L607

Unused argument 'degree' (unused-argument)

Check notice on line 30 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L30

Unused jacobian imported from autograd (unused-import)

Check notice on line 611 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L611

Consider using a generator instead 'sum(coeffs[i] * cheby_pol(x, degree=2 * i + parity) for i in ind)' (consider-using-generator)

Check notice on line 618 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L618

Unused import jax (unused-import)

Check notice on line 628 in pennylane/templates/subroutines/qsvt.py

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

pennylane/templates/subroutines/qsvt.py#L628

Unused import jax (unused-import)