Showing 303 of 330 total issues
Function ode_solver
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def ode_solver(
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Similar blocks of code found in 2 locations. Consider refactoring. Open
loglkhs = multi.log_prob(exp_values * shots) - multi.log_prob(sim_values * shots)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 35.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
loglkhs = binom.log_prob(exp_values * shots) - binom.log_prob(sim_values * shots)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 35.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
multi = tfp.distributions.Multinomial(
total_count=tf.reshape(shots, [shots.shape[0]]), probs=sim_values
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 35.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Identical blocks of code found in 2 locations. Consider refactoring. Open
multi = tfp.distributions.Multinomial(
total_count=tf.reshape(shots, [shots.shape[0]]), probs=sim_values
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 35.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function adaptive_scan
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def adaptive_scan(x_init, fun=None, fun_grad=None, grad_lookup=None, options={}):
Function epc_analytical
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def epc_analytical(propagators: dict, index, dims, proj: bool, cliffords=False):
Function rk38
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def rk38(func, rho, h, dt, col=None):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function lbfgs_grad_free
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def lbfgs_grad_free(x_init, fun=None, fun_grad=None, grad_lookup=None, options={}):
Function gcmaes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def gcmaes(x_init, fun=None, fun_grad=None, grad_lookup=None, options={}):
Function tf_rmsprop
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def tf_rmsprop(
Function lbfgs
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def lbfgs(x_init, fun=None, fun_grad=None, grad_lookup=None, options={}):
Function tf_dU_of_t_lind
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def tf_dU_of_t_lind(h0, hks, col_ops, cflds_t, dt):
Function lindbladian_average_infid_set
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def lindbladian_average_infid_set(
Function state_transfer_from_states
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def state_transfer_from_states(states: tf.Tensor, index, dims, params, n_eval=-1):
Function cmaes
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def cmaes(x_init, fun=None, fun_grad=None, grad_lookup=None, options={}):
Function unitary_infid_set
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def unitary_infid_set(propagators: dict, instructions: dict, index, dims, n_eval=-1):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(