Skip to content

device#

Includes the device and contact classes.

Modules:

  • base –

    Includes the base device class for electronic transport calculations.

  • inputs –

    Includes the methods to load and parse the input data.

  • qtbm –

    Includes the QTBM device class for electronic transport calculations.

  • scba –

    Includes the SCBA device class for electronic transport calculations.

Classes:

  • BaseDevice –

    A quantum device for electronic transport calculations.

  • QTBMDevice –

    A quantum device for electronic transport calculations.

  • SCBADevice –

    A quantum device for electronic transport calculations.

Functions:

  • create_device –

    Creates a device object based on the configuration.

BaseDevice #

BaseDevice(config: QuatrexConfig)

A quantum device for electronic transport calculations.

Parameters:

  • config (QuatrexConfig) –

    Configuration object containing input paths, device parameters, and computational settings.

Attributes:

  • config (QuatrexConfig) –

    Reference to the configuration object.

  • orbital_coordinates (NDArray) –

    Array of orbital coordinates.

  • atom_coordinates (NDArray) –

    Array of atomic coordinates.

  • atomic_species (NDArray) –

    Array of atom symbols for each atom. NOTE: This array is always on the host since CuPy does not support string arrays.

  • orbital_offsets (NDArray) –

    Array of cumulative orbital counts, used to map from atoms to orbitals. orbital_offsets[i] gives the starting orbital index for atom i.

  • lattice_vectors (NDArray) –

    Array of lattice vectors for the device.

  • potential ((NDArray, optional)) –

    Array of electrostatic potential for each orbital. Can be either None if no potential is provided or a 1D array where the 1D index corresponds to the orbital index or the atom index depending on the shape of the provided potential.

  • kpoints (NDArray) –

    Array of k-points for the device, generated using a Monkhorst-Pack grid based on the configuration.

  • contacts (list[BaseContact]) –

    List of Contact objects representing the semi-infinite leads connected to this device.

  • hamiltonians (dict | DSDBSparse | None) –

    Hamiltonian matrices in either real space (QTBM) or k-space (SCBA).

  • overlap_matrices (dict | DSDBSparse | None) –

    Overlap matrices in either real space (QTBM) or k-space (SCBA).

QTBMDevice #

QTBMDevice(config: QuatrexConfig)

Bases: BaseDevice

A quantum device for electronic transport calculations.

Parameters:

  • config (QuatrexConfig) –

    Configuration object containing input paths, device parameters, and computational settings.

Attributes:

  • config (QuatrexConfig) –

    Reference to the configuration object.

  • orbital_coordinates (NDArray) –

    Array of orbital coordinates.

  • atom_coordinates (NDArray) –

    Array of atomic coordinates.

  • atomic_species (NDArray) –

    Array of atom symbols for each atom. NOTE: This array is always on the host since CuPy does not support string arrays.

  • orbital_offsets (NDArray) –

    Array of cumulative orbital counts, used to map from atoms to orbitals. orbital_offsets[i] gives the starting orbital index for atom i.

  • potential ((NDArray, optional)) –

    Array of electrostatic potential for each orbital. Can be either None if no potential is provided or a 1D array where the 1D index corresponds to the orbital index or the atom index depending on the shape of the provided potential.

  • contacts (list[QTBMContact]) –

    List of Contact objects representing the semi-infinite leads connected to this device.

  • hamiltonians (dict) –

    Dictionary of Hamiltonian matrices indexed by (i, j, k) lattice vectors. Keys are tuples representing the lattice vector indices, values are sparse CSR matrices.

  • overlap_matrices (dict) –

    Dictionary of overlap matrices with the same indexing as hamiltonians. For orthogonal basis sets, defaults to identity matrices.

  • gamma_only (bool) –

    True if only the Gamma point (0,0,0) Hamiltonian is available, indicating that k-point calculations are not possible.

SCBADevice #

SCBADevice(config: QuatrexConfig)

Bases: BaseDevice

A quantum device for electronic transport calculations.

Parameters:

  • config (QuatrexConfig) –

    Configuration object containing input paths, device parameters, and computational settings.

Attributes:

  • config (QuatrexConfig) –

    Reference to the configuration object.

  • orbital_coordinates (NDArray) –

    Array of orbital coordinates.

  • atom_coordinates (NDArray) –

    Array of atomic coordinates.

  • atomic_species (NDArray) –

    Array of atom symbols for each atom. NOTE: This array is always on the host since CuPy does not support string arrays.

  • orbital_offsets (NDArray) –

    Array of cumulative orbital counts, used to map from atoms to orbitals. orbital_offsets[i] gives the starting orbital index for atom i.

  • potential ((NDArray, optional)) –

    Array of electrostatic potential for each orbital. Can be either None if no potential is provided or a 1D array where the 1D index corresponds to the orbital index or the atom index depending on the shape of the provided potential.

  • contacts (list[SCBAContact]) –

    List of Contact objects representing the semi-infinite leads connected to this device.

create_device #

create_device(config: QuatrexConfig, validate_contacts: bool = True) -> QTBMDevice | SCBADevice

Creates a device object based on the configuration.

Parameters:

  • config (QuatrexConfig) –

    The main quatrex configuration.

  • validate_contacts (bool, default: True ) –

    Whether to validate the contacts after creation, by default True.

Returns: