---
title: "Independently recalculating a four-site pair-production curve"
description: "Fix the ideal four-site model from Martinez et al. (2016), rebuild its spin Hamiltonian, and compare every sampled observable with the browser."
canonical_url: "https://sandboxphysics.com/stories/lattice-gauge/reproducible-comparison/"
language: "en"
page_type: "story"
alternate_languages:
  zh-CN: "https://sandboxphysics.com/zh/stories/lattice-gauge/reproducible-comparison/"
last_modified: "2026-10-27"
---

[Lattice gauge fields and string breaking](https://sandboxphysics.com/stories/lattice-gauge/)

L4 · Chapter 8

# Independently recalculating a four-site pair-production curve

Sandbox Physics · 2026-10-27

One physical trajectory can be calculated from an explicit spin matrix or from configurations selected using Gauss’s law. We fix the ideal continuous curve in Figure 2a of Martinez et al., arXiv:1605.04570v1, and bring those independent calculations together at every sampled time. Start by choosing the right curve in the legend.

## Before you begin

You need finite-matrix evolution, the physical subspace and expectation values. This calculation starts in the four-site bare staggered product state with zero background field and studies bare-vacuum pair excitation.

[Review the preceding chapter](https://sandboxphysics.com/stories/lattice-gauge/optical-lattice-mapping/)

- Translate the paper’s parameters into the browser convention.
- Compare observables from two independent matrix constructions.
- Separate numerical, finite-system and experimental errors.

## Choose the curve in Figure 2a first

Four trapped ions encode four matter spins. Figure 2a distinguishes continuous ideal evolution, discrete-step evolution, a prediction with experimental errors, and postselected measurements. We choose the continuous ideal Hamiltonian: what state does the specified bare vacuum reach after a given time?

Fix $N=4$, $J/w=1$, $m/w=0.5$ and the left boundary field $\epsilon_0=0$. The initial spin state is $|\uparrow\downarrow\uparrow\downarrow\rangle$. The horizontal axis $wt$ is dimensionless. We save 61 samples from zero to three at spacing $0.05$.

The density rises and falls through coherent pair creation and recombination in this small system. Laser operations, finite Trotter steps and hardware noise remain separate comparisons in the original figure.

Reading: E. A. Martinez et al.

## Construct the matrix from the Methods equation

Methods equation (3) eliminates link fields using Gauss’s law and retains matter spins. Its sites run from $\ell=1$ to $N$. Add the charges to the left of a link to obtain its field operator. Squaring that cumulative field produces interactions between distant spins, encoding the one-dimensional electric energy.

For one spin, $\sigma^z$ has values plus one and minus one in the up and down states. The operator $\sigma^+$ raises down to up and $\sigma^-$ reverses it. The independent reference builds these operators by tensor products in the full sixteen-dimensional spin space. It applies a matrix exponential to the initial state at each time. The browser enumerates six half-filled physical occupations, reconstructs their fields, and diagonalizes a six-dimensional matrix. These are different constructions and evolution algorithms.

$$
\hat L_\ell=\epsilon_0+\frac12\sum_{j=1}^{\ell}\bigl[\hat\sigma_j^z+(-1)^j\bigr]
$$

The spin at each position contributes its charge. The accumulated charge plus the boundary field determines the internal link field.

$$
\begin{aligned}\hat H_S={}&\frac m2\sum_{\ell=1}^N(-1)^\ell\hat\sigma_\ell^z\\&+w\sum_{\ell=1}^{N-1}(\hat\sigma_\ell^+\hat\sigma_{\ell+1}^-+\mathrm{h.c.})\\&+J\sum_{\ell=1}^{N-1}\hat L_\ell^2\end{aligned}
$$

The reference matrix uses the mass term, neighboring spin exchanges and the squared cumulative electric fields from the same operators.

Reading: E. A. Martinez et al. · Sandbox Physics FR04 original numerical references and reproduction scripts

## Translate signs before comparing fields

The browser starts its labels at zero; the paper starts at one. Set $\ell=n+1$ and express the paper’s spin through the browser occupation $f_n$. This transformation exchanges particles and holes and reverses both charge and electric field. Electric-field energy is unchanged.

The paper uses $J L_\ell^2$ and the browser uses $g^2E_n^2/2$. At $J=1$, Electric coupling must therefore be two. An alternating local phase removes the remaining hopping-sign difference. Occupations, field expectations and return probabilities are invariant under that phase choice.

$$
\sigma_\ell^z=1-2f_n,\qquad L_\ell=-E_n,\qquad g^2=2J
$$

Reverse the sign of a local field before comparing it. Electric energies already agree. Use the same reference hopping unit for mass and time.

The input specifies the initial state, boundaries and energy scale together.

| Paper input | Browser input |
| --- | --- |
| $N=4$ | Chain sites: 4 |
| $m/w=0.5$ | Matter mass: 0.5; Matter hopping: 1 |
| $J/w=1$ | Electric coupling: 2 |
| $\epsilon_0=0$ | Both boundary fluxes: 0; Fixed external charges: off |
| $\|\uparrow\downarrow\uparrow\downarrow\rangle$ | $(f_0,f_1,f_2,f_3)=(0,1,0,1)$ |
| Four-site neutral sector | Electric cutoff: 2; physical dimension: 6 |

Reading: E. A. Martinez et al. · Sandbox Physics FR04 original numerical references and reproduction scripts

## Check two observables at one time

The particle density $\nu$ counts particles and antiparticles per site. The browser reports the expected number of pairs. At four sites, one pair gives density one half. A quantum superposition of configurations can have a noninteger expected pair count.

At $wt=1$, the independent reference gives $\nu=0.4474141728$. Multiply by four and divide by two: the expected pair count is $0.8948283456$. The probability of returning to the bare vacuum is $0.2694130176$. The observables answer different questions: the average number of excitations and the probability of recovering one complete initial state.

These are newly generated deterministic references. The files also retain local charges, link fields and normalization. A comparison script checks every sample. The maximum absolute difference between the independent sixteen-dimensional matrix and the browser’s six-dimensional calculation is shown below; it measures agreement for this finite ideal model.

$$
\nu(t)=\frac{1}{2N}\sum_{\ell=1}^N\left\langle(-1)^\ell\hat\sigma_\ell^z+1\right\rangle=\frac{2\langle N_{\mathrm{pair}}(t)\rangle}{N}
$$

At half filling the positive and negative excitation counts agree, so the total excitation count is twice the pair count.

$$
P_{\mathrm{vac}}(t)=|\langle\mathrm{vac}|e^{-i\hat H_St}|\mathrm{vac}\rangle|^2
$$

This is the vacuum-persistence probability for the same state and Hamiltonian. Figure 3 uses this observable; no additional Figure 3 parameter scan is reproduced here.

$$
\max_{t,\,O}|O_{16}(t)-O_6(t)|\simeq2.75\times10^{-15}
$$

The maximum covers 61 fixed times and the saved densities, vacuum probabilities, local fields and charges in the recorded Python, NumPy and SciPy environment.

Reading: Sandbox Physics FR04 original numerical references and reproduction scripts

## Keep the inputs and error checks with the result

Browser trajectories and independent matrix results are saved separately. The reproducer records model version, parameters, algorithms and dependency versions. No random sampling is used, so the seed is null and there are no sampling error bars. Recalculate one time first, then compare every sample and inspect conservation drift along the trajectory.

Different errors need different checks. Eigenvector residuals and normalization drift test arithmetic. Changing the electric cutoff tests omitted link states. Increasing site count tests boundary returns. Pulse errors and selection bias require device records. Combining them into a single error percentage would lose the question each check answers.

For this source-free four-site sector, all accessible fluxes already lie within one unit. Unit-flux configurations are reached, but cutoff one already retains all six neutral configurations and removes no hop within that sector. Increasing it to two leaves the trajectory unchanged. A longer external-source string needs its own cutoff and size comparison.

The same sequence works for the next calculation: fix the version and target curve, specify state and boundaries, translate conventions, define observables, then compare raw numbers from an independent matrix. That reference makes later changes in time stepping, device errors or tensor-network approximations easier to diagnose.

Reading: Sandbox Physics FR04 original numerical references and reproduction scripts · ITensorMPS.jl

## Try the prediction

### [Recalculate the Four-ion model reference](https://sandboxphysics.com/labs/string-breaking/)

1. Choose Four-ion model reference. Confirm four sites, cutoff two and Fixed external charges off in the advanced group. Matter mass is 0.5, Electric coupling is 2 and Matter hopping is 1.
2. Pause evolution and set Observation time to one. Multiply the bare-pair expectation by two and divide by four to compare with the chapter density. Expand the diagnostics and check normalization and Gauss violation.
3. Save the model record. Reverse the sign of the time-one link fields and compare with the independent electricPaper array. Change the cutoff to one and explain why this particular trajectory stays the same.

## Exercises and explanations

1. At $wt=2$, the reference gives $\nu\approx0.1742642797$. What pair count should the browser show?

   Read the explanation

   With four sites, $\langle N_{\mathrm{pair}}\rangle=N\nu/2\approx0.3485285595$. It is an expectation value; individual measurements need not contain fractional pairs.

2. If particle densities agree but every local field has the opposite sign, what should you check first?

   Read the explanation

   Check the charge and field conventions. The transformation here requires a local-field sign reversal. Investigate the model or solver only after converting both calculations to the same convention.

3. Does close agreement between the two algorithms establish the accuracy of the ion experiment?

   Read the explanation

   It establishes agreement when solving the same finite ideal Hamiltonian. The ion experiment also has a discrete gate sequence, noise, preparation and selection effects, each requiring comparison with the appropriate device records.

[Previous: Reading an electric string from atomic occupations](https://sandboxphysics.com/stories/lattice-gauge/optical-lattice-mapping/)

## Sources and calculation scope

1. [E. A. Martinez et al., Real-time dynamics of lattice gauge theories with a few-qubit quantum computer, Nature 534, 516–519 (2016); arXiv:1605.04570v1 (15 May 2016)](https://arxiv.org/html/1605.04570v1)

   Methods equation (3), Figure 2a and the main-text density definition fix the four-site ideal continuous-Hamiltonian calculation: electric energy equal to hopping, mass equal to half the hopping, zero boundary field and the bare spin vacuum. The associated vacuum-persistence observable is defined in the main text and used in Figure 3; no Figure 3 scan is reproduced. DOI: 10.1038/nature18318. The arXiv page displays a perpetual non-exclusive license; no source figures, author code or measured datasets are redistributed.

2. [Sandbox Physics FR04 original numerical references and reproduction scripts](https://github.com/yangzichao/sandboxphysics/tree/main/docs/frontier/fr04)

   benchmarks-browser.json and benchmarks-independent.json retain the separately calculated raw observables; benchmarks-summary.json records their differences, numerical environment, cutoff and finite-size checks. scripts/frontier/fr04/reproduce-benchmarks.mjs and independent-reference.py regenerate the original deterministic records. No experimental data are included.

3. [ITensorMPS.jl, DMRG and MPS Time Evolution official tutorials](https://docs.itensor.org/ITensorMPS/dev/tutorials/DMRG.html)

   The DMRG tutorial defines ground-state optimization and its bond-dimension and discarded-weight controls. The linked MPS Time Evolution tutorial treats a different task. They provide the next numerical method after small-chain exact diagonalization; no large-system tensor-network result is claimed for this course.
