qutip/qutip-qip

View on GitHub
src/qutip_qip/device/processor.py

Summary

Maintainability
A
1 hr
Test Coverage

Function plot_pulses has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring.
Wontfix

    def plot_pulses(
        self,
        title=None,
        figsize=(12, 6),
        dpi=None,
Severity: Minor
Found in src/qutip_qip/device/processor.py - About 2 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function run_state has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
Open

    def run_state(
        self,
        init_state=None,
        analytical=False,
        states=None,
Severity: Minor
Found in src/qutip_qip/device/processor.py - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Function _is_pulses_valid has a Cognitive Complexity of 21 (exceeds 20 allowed). Consider refactoring.
Open

    def _is_pulses_valid(self):
        """
        Check if the pulses are in the correct shape.

        Returns: bool
Severity: Minor
Found in src/qutip_qip/device/processor.py - About 25 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

TODO found
Open

        # TODO test it for non array-like coeff
Severity: Minor
Found in src/qutip_qip/device/processor.py by fixme

TODO found
Open

        # TODO add tests
Severity: Minor
Found in src/qutip_qip/device/processor.py by fixme

TODO found
Open

            # TODO, this can be simplified further, tlist in the solver only
Severity: Minor
Found in src/qutip_qip/device/processor.py by fixme

FIXME found
Wontfix

        # FIXME # Think about the handling of spline_kind.
Severity: Minor
Found in src/qutip_qip/device/processor.py by fixme

There are no issues that match your filters.

Category
Status