qtcad.transport.josephson_junction module

class GaussianRandomField(sigma: tuple[float, float] = (1e-10, 1e-10), ksi: float = 1e-08)

Bases: GaussianRandomField

Gaussian-random-field model for the two junction interfaces.

The interface height field is defined by an exponential covariance kernel, satisfying

\[\langle h(x,y) h(0, 0) \rangle = \sigma^2 \exp\left(-\frac{x^2 + y^2}{\xi^2}\right),\]

where:

  • \(h(x,y)\) is the height variation, which is periodic in the coordinates \(x\) and \(y\);

  • \(\sigma\) is the root mean square (RMS) value of the roughness amplitude, GaussianRandomField.sigma;

  • \(\xi\) is the transverse correlation length along the \(x\) and \(y\) directions, GaussianRandomField.ksi.

Attributes:
  • sigma – RMS value of the height variation on each of the two interfaces.

  • ksi – Correlation length along the \(x\) and \(y\) directions.

__init__(sigma: tuple[float, float] = (1e-10, 1e-10), ksi: float = 1e-08) None

Constructor for the GaussianRandomField class.

Parameters:
  • sigma – 2-tuple with the RMS value of the height variation on each of the two interfaces. It can be probed experimentally or estimated using molecular-dynamics simulations. For Al/AlOₓ, this quantity must be within the closed interval \([0.05 \times 10^{-9}, 0.3 \times 10^{-9}]~\text{m}\).

  • ksi – Correlation length along the \(x\) and \(y\) directions. It is mostly defined by the grain size of the superconducting material, which imprints thickness variations onto the superconductor/dielectric interfaces. For Al/AlOₓ, this quantity must be within the closed interval \([10 \times 10^{-9}, 150 \times 10^{-9}]~\text{m}\).

class RoughnessModelTemplate

Bases: RoughnessModel

Base class for user-defined roughness models.

This class should provide two methods:

  1. generate_surface, which should be picklable, and output a 2D array over the number of partitions, that is, a NumPy array of shape (n_partitions[0], n_partitions[1]).

  2. validate, which should perform any sanity checks between the inputs to the Josephson-energy solver and the ones to the roughness model. This method should raise exceptions if the inputs are outside the regimes of validity. Also, warnings should be emitted if non-critical sanity checks fail. If any warning was emitted, this method should output a boolean True, otherwise False.

abstractmethod generate_surface(idx: int, side_lengths: ndarray[tuple[Any, ...], dtype[float64]], n_partitions: ndarray[tuple[Any, ...], dtype[int64]], rng_seed: int | None = None) ndarray[tuple[Any, ...], dtype[float64]]

Generates a 2D rough surface.

Parameters:
  • idx – Index of the interface. Either 0 or 1.

  • side_lengths – Two-value array with the lengths of the Josephson junction along the \(x\) and \(y\) directions, respectively. The value of the solver parameter side_lengths will be passed to this argument.

  • n_partitions – Two-value array with the numbers of partitions of the transverse plane of the Josephson junction along the \(x\) and \(y\) directions, respectively. The value of the solver parameter n_partitions will be passed to this argument.

  • rng_seed – Seed for the random number generator, rng_seed.

Returns:

Surface height as a NumPy array of floats of shape (n_partitions[0], n_partitions[1]).

abstractmethod validate(solver_params: SolverParams, thickness: float, side_lengths: ndarray[tuple[Any, ...], dtype[float64]]) bool

Check Josephson-energy solver’s parameters against roughness model’s ones.

This will be called before performing any calculations.

Parameters:
  • solver_params – Parameters of the Josephson-energy solver.

  • thickness – Dielectric layer’s thickness.

  • side_lengths – Two-value array containing the side lengths of the junction.

Returns:

True if any warning was emitted, else False.

class Solver(solver_params: SolverParams | None = None, roughness_model: RoughnessModel | None = None, thickness: float = 1e-09, side_lengths: tuple[float, float] | list[float] | ndarray[tuple[Any, ...], dtype[float64]] | None = None, layout_file: str | Path | None = None)

Bases: Solver

Solver for Josephson-energy variability induced by interface roughness.

The solver is based on the model by Zhu et al.’s ‘Device Variability of Josephson Junctions Induced by Interface Roughness’ (2026), https://doi.org/10.48550/arXiv.2602.03037, which uses the Ambegaokar–Baratoff formula. For more details, please see Josephson-energy solver.

Notes

  • The junction is modeled as many parallel tunneling channels distributed over the \(xy\) plane.

  • The tunnel barrier is treated as a locally uniform square barrier along the transport direction.

  • Every call the solver generates a new ensemble of rough interfaces using roughness_model,.

  • The roughness of the two interfaces is assumed to be uncorrelated.

Attributes:
  • thickness – Thickness of the dielectric layer.

  • side_lengths – Two-value tuple with the lengths of the Josephson junction along the \(x\) and \(y\) directions.

  • layout_file – If not None, path to the OAS/GDS layout file used to extract the lengths found in side_lengths.

  • energy_distribution – Array with the n_samples Josephson energies computed over the n_samples samples. Each sample is associated to two surfaces with distinct roughness profiles.

  • mean_value – Mean value of the distribution of Josephson energies.

  • std_deviation – Standard deviation from the mean value of the distribution of Josephson energies.

  • solver_params – The parameters of the solver.

  • roughness_model – Set-up roughness model.

__init__(solver_params: SolverParams | None = None, roughness_model: RoughnessModel | None = None, thickness: float = 1e-09, side_lengths: tuple[float, float] | list[float] | ndarray[tuple[Any, ...], dtype[float64]] | None = None, layout_file: str | Path | None = None) None

Constructor for the Solver class.

Notes

Parameters:
  • solver_params – The parameters of the solver.

  • roughness_model – Set-up roughness model.

  • thickness – Thickness of the dielectric layer. This defines the width of the effective tunnel square-potential barrier. This quantity must be within the closed interval \([0.1 \times 10^{-9}, 3.0 \times 10^{-9}]~\text{m}\). Default: 1e-9.

  • side_lengths – Two-value tuple with the lengths of the Josephson junction along the \(x\) and \(y\) directions. The lengths must be greater than 1e-9. Default: None, which results in (200e-9, 200e-9) being used if layout_file is not passed.

    If layout_file is provided, this parameter should not be passed.

  • layout_file – Path to the OAS/GDS layout file comprising two named shapes that intersect to form a rectangular Josephson junction. The attribute side_lengths will be set automatically by extracting the side lengths of the overlap region forming the Josephson junction. Default: None.

property energy_distribution: ndarray[tuple[Any, ...], dtype[float64]]

Josephson energies computed over n_samples different samples, each with two surfaces with distinct roughness profiles.

layout_file: str | Path | None
property mean_value: float

Mean value of the distribution of Josephson energies.

plot_distribution(distribution: ndarray[tuple[Any, ...], dtype[float64]] | None = None, n_bins: int = 50, fit: bool = True, show_figure: bool = True, output: str | Path | None = None, figsize: tuple[float, float] = (6, 4), kwargs_hist: dict | None = None, kwargs_fit: dict | None = None, kwargs_savefig: dict | None = None, xlims: str | tuple[float, float] = 'centred', ghz: bool = True) tuple[Figure, Axes]

Plot the histogram of Josephson energies.

Parameters:
  • distribution – The distribution of Josephson energies to plot. If None, the distribution stored in the solver instance, self.energy_distribution, is used.

  • n_bins – Number of bins for the histogram.

  • fit – If True, the plots will include a log-normal fit curve of the probability density function (PDF) of the distribution.

  • show_figure – Whether to display the figure.

  • output – Optional path to save the figure. If provided, the figure is saved with 300 DPI.

  • figsize – Width and height of the figure (in centimeters).

  • kwargs_hist – Optional dictionary of keyword arguments to pass to matplotlib.axes.Axes.hist.

  • kwargs_fit – Optional dictionary of keyword arguments to pass to matplotlib.axes.Axes.plot for the fitted PDF curve.

  • kwargs_savefig – Optional dictionary of keyword arguments to pass to matplotlib.pyplot.savefig when saving the figure.

  • xlims – Controls the \(x\)-axis limits. If centred, the \(x\)-axis will span from 0 to 2 times the mean of the Josephson energy distribution. If auto, the \(x\)-axis limits are autoscaled to span the data values. If a 2-tuple of floats is passed, they will define the \(x\)-axis limits.

  • ghz – Whether to show the results in units of gigahertz (GHz) instead of joules (J).

Returns:

A tuple containing

  • fig: The generated figure object.

  • axis: The generated axis object.

plot_surfaces(idx: int = 0, show_figure: bool = True, output: str | Path | None = None, figsize: tuple[float, float] = (9, 4), kwargs_savefig: dict | None = None, nm: bool = True) tuple[Figure, ndarray[tuple[Any, ...], dtype[Axes]]]

Plot the two rough interfaces for one sampled junction.

The roughness profile is described by roughness_model.

Parameters:
  • idx – Index of the profile to plot.

  • show_figure – Whether to display the figure.

  • output – Optional path to save the figure.

  • figsize – Width and height of the figure (in inches).

  • kwargs_savefig – Optional dictionary of keyword arguments to pass to matplotlib.pyplot.savefig.

  • nm – Whether to show the results in units of nanometres (nm) instead of metres (m).

Returns:

A tuple containing

  • fig: The generated figure object.

  • axes: Array of the generated axes objects.

roughness_model: RoughnessModel | None
side_lengths: tuple[float, float] | list[float] | NDArray[np.float64]
solve() None

Run the Josephson-energy solver.

This method modifies self.energy_distribution, self.mean_value and self.std_deviation.

solver_params = qtcad.transport.josephson_junction.SolverParams | None
property std_deviation: float

Standard deviation from the mean value of the distribution of Josephson energies.

thickness: float
class SolverParams(inp_dict: None = None)

Bases: SolverParams

Parameters to pass to the Josephson-energy solver.

Attributes:
  • n_partitions – Two-value tuple with the number of partitions of the transverse plane of the Josephson junction along the \(x\) and \(y\) directions, respectively. Default: (256, 256).

  • n_samples – Number of distinct Josephson junctions to be sampled. This number should be high enough to generate statistically significant results. Default: 5000.

  • potential_barrier_height – Height of the effective square tunnel barrier across the junction. This quantity must be within the closed interval \([1.60 \times 10^{-20}, 4.81 \times 10^{-19}]~\text{J}\) (that is, from 0.1 to 3 eV). Default: 1.76e-19 (that is, 1.10 eV).

  • sc_gap – Size of the superconducting energy gap, \(\Delta\), measured from the chemical potential. It is half of the energy required to break a Cooper pair apart, \(2|\Delta|\). Default: 2.8e-23 (that is, 0.18 meV, value for bulk Al, see Poole Jr. et al. ‘Superconductivity’, 2007).

  • max_cpus – Maximum number of CPUs the Josephson-energy solver is allowed to use during the simulation. If None, the total number of available logical CPUs is used. That is, the CPU count on the machine or len(os.sched_getaffinity(0)), if available and has a lower value. Default: None.

  • rng_seed – Seed for the random number generator (RNG) used to construct the interfaces of the Josephson junctions. This value will also be passed to the roughness model. If None, the state of the RNG will be initialized from a pseudo-random source. Default: None.

__init__(inp_dict: None = None) None

Instantiate the SolverParams object.

Parameters:

inp_dict – Dictionary specifying the solver parameters to be used instead of their default values.

max_cpus: int | None
n_partitions: tuple[int, int] | list[int] | ndarray[tuple[Any, ...], dtype[int64]]
n_samples: int
potential_barrier_height: float
rng_seed: ndarray[tuple[Any, ...], dtype[int64]] | None
sc_gap: float