aws / amazon-braket-default-simulator-python
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 336 units with 1,251 lines of code in units (60.3% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (178 lines of code)
    • 0 medium size units (0 lines of code)
    • 17 small units (217 lines of code)
    • 317 very small units (856 lines of code)
0% | 14% | 0% | 17% | 68%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 14% | 0% | 17% | 68%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/braket/default_simulator0% | 14% | 0% | 17% | 68%
src/braket/default_simulator/simulation_strategies0% | 0% | 0% | 0% | 100%
src/braket/simulator0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def properties()
in src/braket/default_simulator/density_matrix_simulator.py
93 1 1
def properties()
in src/braket/default_simulator/state_vector_simulator.py
85 1 1
def _validate_shots_and_ir_results()
in src/braket/default_simulator/simulator.py
16 10 3
def _compute_eigenvalues()
in src/braket/default_simulator/observables.py
16 10 3
def _validate_ir_instructions_compatibility()
in src/braket/default_simulator/simulator.py
15 6 2
def matrix()
in src/braket/default_simulator/gate_operations.py
14 1 1
def matrix()
in src/braket/default_simulator/gate_operations.py
14 1 1
def __init__()
in src/braket/default_simulator/observables.py
14 4 3
def apply_observables()
in src/braket/default_simulator/density_matrix_simulation.py
12 3 2
def matrix()
in src/braket/default_simulator/gate_operations.py
12 1 1
def matrices()
in src/braket/default_simulator/noise_operations.py
12 1 1
def _validate_ir_results_compatibility()
in src/braket/default_simulator/simulator.py
12 6 2
def calculate()
in src/braket/default_simulator/result_types.py
12 5 2
def __init__()
in src/braket/default_simulator/state_vector_simulation.py
12 3 4
def apply_observables()
in src/braket/default_simulator/state_vector_simulation.py
12 3 2
def matrix()
in src/braket/default_simulator/gate_operations.py
11 1 1
def matrix()
in src/braket/default_simulator/gate_operations.py
11 1 1
def matrix()
in src/braket/default_simulator/gate_operations.py
11 1 1
def multiply_matrix()
in src/braket/default_simulator/linalg_utils.py
11 3 4
def matrix()
in src/braket/default_simulator/gate_operations.py
10 1 1