# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/08_backends.ipynb (unless otherwise specified).


from __future__ import annotations


__all__ = ['circuit_backends']

# Internal Cell
#nbdev_comment from __future__ import annotations

try:
    import jax
    JAX_AVAILABLE = True
except ImportError:
    JAX_AVAILABLE = False

try:
    import klujax
    KLUJAX_AVAILABLE = True
except ImportError:
    KLUJAX_AVAILABLE = False

from .default import evaluate_circuit
from .klu import evaluate_circuit_klu
from .additive import evaluate_circuit_additive

# Cell

circuit_backends = {
    "default": evaluate_circuit,
    "klu": evaluate_circuit_klu,
    "additive": evaluate_circuit_additive,
}

if (not JAX_AVAILABLE) or (not KLUJAX_AVAILABLE):
    del circuit_backends["klu"]