utilsΒΆ

Collection of utility functions used throughout the package.

circuit_complexity(circuit)

Computes the component complexity of the circuit.

generate_circuit_fn(circuit[, jit, concat])

Generates a function to compute the circuit impedance, parameterized by frequency and the circuit parameters.

generate_circuit_fn_impedance_backend(circuit)

Generates a function to compute the circuit impedance, parameterized by frequency and the circuit parameters, using impedance.py.

fit_circuit_parameters(circuit, freq, Z[, ...])

Fits and returns the parameters of a circuit to impedance data.

are_circuits_equivalent(circuit1, circuit2)

Checks if two circuit strings are equivalent.

initialize_priors(p0)

Initializes prior distributions from parameters dictionary.

initialize_priors_from_posteriors(posterior)

Creates new priors based on the posterior distributions.

eval_posterior_predictive(samples, circuit, freq)

Evaluates the posterior predictive distribution of a MCMC run.

validate_circuits_dataframe(circuits)

Ensures that the circuits dataframe if properly formatted/typed.

preprocess_impedance_data(freq, Z[, ...])

Preprocesses/cleans up impedance measurements.

Settings([loglevel, ncores, notebook, ...])

Global settings, e.g., logging, parallelism, etc.

InferenceResult(circuit, mcmc, *, converged, ...)

Container for inference result.

ImpedanceData(freq, Z)

Container for impedance data.