# pmm_tools.models.quasistatic

*module*

Real affine microscopic Hamiltonians for independent quasistatic disorder.

All energies and Gaussian widths are micro-eV; the workflow supplies their
values through the physical parameter dictionary. Noise coordinates are
(mu_L, mu_R, mismatch_L, mismatch_R, dot_mu_or_log_bridge).
second_quantization constructs every operator through the existing models.

## pmm_tools.models.quasistatic.affine_device

*function*

```python
def affine_device(n, physical, *, device)
```

Build fixed real operators once, for broadcast to a worker pool.

Dot coefficients: (1, mu_M, common contact hopping, all Gaussian coordinates).
Direct coefficients: (1, noisy bridge hopping, chain Gaussian coordinates).
Dense small systems store operator matrices; larger systems store their data
on one common CSR sparsity pattern. No Hamiltonian projection is performed.

[View source](https://gitlab.kwant-project.org/qt/pmm_tools/-/blob/e412d66507a554f455ef935b755fc39f28ab4e05/pmm_tools/models/quasistatic.py#L60-L115)

## pmm_tools.models.quasistatic.chain_parameters

*function*

```python
def chain_parameters(n, normal, physical)
```

Hold the nominal t+Delta fixed while applying onsite and mismatch noise.

[View source](https://gitlab.kwant-project.org/qt/pmm_tools/-/blob/e412d66507a554f455ef935b755fc39f28ab4e05/pmm_tools/models/quasistatic.py#L39-L57)

## pmm_tools.models.quasistatic.disorder_coefficients

*function*

```python
def disorder_coefficients(model, normal, control, *, contacts=0.0)
```

Translate standard-normal coordinates into the affine coefficients.

[View source](https://gitlab.kwant-project.org/qt/pmm_tools/-/blob/e412d66507a554f455ef935b755fc39f28ab4e05/pmm_tools/models/quasistatic.py#L118-L126)

## pmm_tools.models.quasistatic.isolated_chain_operators

*function*

```python
def isolated_chain_operators(n, physical)
```

Real dense parity operators for batched, noisy Ramsey preparation.

[View source](https://gitlab.kwant-project.org/qt/pmm_tools/-/blob/e412d66507a554f455ef935b755fc39f28ab4e05/pmm_tools/models/quasistatic.py#L129-L156)

## pmm_tools.models.quasistatic.ramsey_logical_states

*function*

```python
def ramsey_logical_states(model, normal)
```

Batched isolated-chain ee/oo with an empty dot and a clean phase gauge.

[View source](https://gitlab.kwant-project.org/qt/pmm_tools/-/blob/e412d66507a554f455ef935b755fc39f28ab4e05/pmm_tools/models/quasistatic.py#L159-L185)

## pmm_tools.models.quasistatic.sobol_gaussian_draws

*function*

```python
def sobol_gaussian_draws(dimension, start, count, *, seed)
```

Read Gaussian coordinates from one scrambled Sobol sequence at an offset.

A fixed seed and dimension identify the sequence; power-of-two contiguous
batches reproduce a single complete draw. Clipping keeps inverse CDF finite.

[View source](https://gitlab.kwant-project.org/qt/pmm_tools/-/blob/e412d66507a554f455ef935b755fc39f28ab4e05/pmm_tools/models/quasistatic.py#L21-L31)

## pmm_tools.models.quasistatic.sobol_normals

*function*

```python
def sobol_normals(n, scramble, start, count, *, seed)
```

Chain-noise draws with the campaign's dimension and independent scramble seed.

[View source](https://gitlab.kwant-project.org/qt/pmm_tools/-/blob/e412d66507a554f455ef935b755fc39f28ab4e05/pmm_tools/models/quasistatic.py#L34-L36)
