PF research library · 6 min read

Bounded tomography and Husimi phase-space methods

r34 documentation · isaes-quantum-protocols.md

On this page
  1. Complete local-Pauli state tomography
  2. Husimi Q for a declared representation
  3. Qualification scope

These local scientific methods consume retained, explicitly identified inputs. They neither acquire hardware data nor add measurements to an existing run. Both run through the shared analyzer, evidence graph and presentation contracts. The fixture measurements in the qualification tests are identified numerical experiments; they are not hardware observations.

Complete local-Pauli state tomography

quantum_tomography supports one to three qubits and requires all 3^n local X/Y/Z settings. Each setting supplies measured outcome counts and its exact shot count. A bit value of zero means the +1 eigenvalue of its measured axis; one means -1. The setting string is in qubit-index order. Outcome strings use the separately declared little_endian or big_endian convention. The released input contract requires an explicit identity classical-bit/qubit mapping; other layouts must be remapped through a recorded upstream transformation.

For every nonidentity Pauli string, the analyzer pools parity observations from all compatible settings using shot-count weights. If N_P is the number of compatible shots, its estimate is the sum of their signed outcomes divided by N_P. The reconstruction is

[ \widehat\rho = 2^{-n}\sum_{P\in{I,X,Y,Z}^{\otimes n}} \widehat{\langle P\rangle}P,\qquad \widehat{\langle I\rangle}=1. ]

This is a native linear-inversion estimator for the declared complete Pauli protocol, not a claim to support arbitrary tomography or a call to a remote tomography service. Its relationship to local measurement bases and linear inversion can be compared with the Qiskit Experiments fitter documentation.

The following one-qubit example is an explicit numerical fixture with exact balanced X/Y counts and all-positive Z counts. Replace the counts and preparation identity with retained acquisition data for actual analysis.

{
  "dataset": {
    "name": "state_reconstruction", "kind": "quantum_tomography",
    "source": "/data/tomography", "basis": "computational",
    "qubit_order": "little_endian", "origin": "reconstructed_estimate",
    "confidence": 0.95
  },
  "value": {
    "num_qubits": 1,
    "acquisition_origin": "sampled_simulation",
    "protocol": {
      "name": "complete_local_pauli", "version": 1,
      "sampling": "iid", "preparation_stability": "same_state",
      "independent_settings": true, "outcome_convention": "0=+1,1=-1",
      "preparation_id": "documented-one-qubit-numerical-fixture",
      "qubit_mapping": [0]
    },
    "settings": [
      {"basis": "X", "shots": 1000, "counts": {"0": 500, "1": 500}},
      {"basis": "Y", "shots": 1000, "counts": {"0": 500, "1": 500}},
      {"basis": "Z", "shots": 1000, "counts": {"0": 1000}}
    ]
  }
}

The assumptions are independent identically prepared shots, independent settings, a stable preparation shared by every setting, and the declared ideal measurement axes. Those are supplied scientific declarations, not facts inferred from count totals. Hardware-derived input additionally needs an acquisition object with backend, acquisition timestamp including timezone, and protocol or circuit identity. The record retains that declaration without claiming provider authentication. Readout correction or changing preparation across settings requires a separately qualified protocol.

For confidence 1-alpha, the reported half-width for each nonidentity Pauli expectation is sqrt(2 log(2 (4^n-1)/alpha) / N_P). Hoeffding's bounded-variable inequality and a union bound give simultaneous coverage under the declared shot assumptions. Pauli estimates can share shots; their mutual independence is not assumed. These conservative intervals are not clipped to produce an apparent improvement. They are intervals for Pauli expectations, not fidelity bounds, matrix-entry confidence intervals or a joint physical-state confidence region.

Linear inversion can produce a non-positive matrix. The exact reconstructed matrix and eigenvalues remain available, with failed physicality checks and an insufficient status. No implicit positive-semidefinite projection, renormalization or claim of physical-state validity is performed. Missing protocol fields or settings produce an insufficient result without reconstructing an underdetermined state. Malformed counts and duplicate settings are rejected. Each setting is bounded to 100 million shots represented by aggregated counts; raw shot expansion does not occur.

Husimi Q for a declared representation

husimi_q requires an explicit oscillator-Fock or spin representation. A generic multi-qubit array does not specify either representation. The supplied state must be a statevector or square density matrix with at most 32 basis states. Invalid physicality withholds the physical distribution while retaining its diagnostics. Tolerance is explicit and bounded from zero to 0.001. No input state is normalized or projected by the analyzer.

For an oscillator, use representation: "oscillator_fock", basis: "fock_number_ascending", and fock_cutoff equal to the number of retained basis states. Coordinates explicitly mean dimensionless alpha=real+i*imag, with the normalization

[ Q(\alpha)=\pi^{-1}\langle\alpha|\rho|\alpha\rangle, \qquad \int_{\mathbb R^2} Q(\alpha),d\Re\alpha,d\Im\alpha=1. ]

The coherent-state coefficient at number k is exp(-abs(alpha)^2/2) alpha^k/sqrt(k!). Its finite coefficient vector is not renormalized. The finite Fock model is embedded with zero population outside its declared basis; this does not establish convergence to a larger physical model. The top retained Fock population is reported as a truncation diagnostic.

{
  "dataset": {
    "name": "vacuum_q", "kind": "husimi_q", "source": "/data/vacuum",
    "origin": "numerical_state", "representation": "oscillator_fock",
    "basis": "fock_number_ascending", "fock_cutoff": 1
  },
  "value": {
    "state": {"real": [1], "imag": [0]},
    "coordinate_convention": "alpha=real+i*imag",
    "alpha_real": [-2, -1, 0, 1, 2],
    "alpha_imag": [-2, -1, 0, 1, 2]
  }
}

This small example illustrates the schema; it is not a converged quadrature grid. For a spin, use representation: "spin", basis: "spin_jz_descending", and integer twice_spin from 1 to 31. The state dimension must be twice_spin+1. The basis order is m=j,j-1,...,-j. Coordinates use polar theta from zero to pi and azimuthal phi from zero to 2*pi, in radians:

[ Q(\theta,\phi)=\frac{2j+1}{4\pi} \langle\theta,\phi|\rho|\theta,\phi\rangle, \qquad \int Q(\theta,\phi)\sin\theta,d\theta,d\phi=1. ]

The coherent-state coefficient at index k is sqrt(binomial(2j,k)) cos(theta/2)^(2j-k) sin(theta/2)^k exp(i*k*phi). The prefactor above is the normalized density per unit solid angle. Keep it distinct from libraries returning the bare coherent-state overlap; the QuTiP spin Q implementation provides an independent convention reference.

{
  "dataset": {
    "name": "spin_q", "kind": "husimi_q", "source": "/data/spin",
    "origin": "numerical_state", "representation": "spin",
    "basis": "spin_jz_descending", "twice_spin": 1
  },
  "value": {
    "state": {"real": [1, 0], "imag": [0, 0]},
    "coordinate_convention": "polar_theta_azimuth_phi_radians",
    "theta": [0, 1.5707963267948966, 3.141592653589793],
    "phi": [0, 3.141592653589793, 6.283185307179586]
  }
}

Each axis has 3–257 finite increasing points. Oscillator real/imaginary coordinates lie within [-12,12]. Total grid size is bounded to 8192 points and 10 million dimension-squared work units. Irregular coordinate spacing is retained. The finding and figure preserve exact coordinate arrays, basis conventions, normalization and density values.

Numerical normalization uses trapezoidal quadrature on the supplied domain, including the spin sin(theta) measure. A coarser grid with retained endpoints provides a resolution diagnostic, not a rigorous error estimate. A small oscillator window can contain much less than unit mass. Partial spin domains are also allowed and labeled. Neither grid is rescaled to force a unit integral. Fine/coarse integration difference, finite-domain mass, and the full-domain unit normalization target remain separate. No sampling uncertainty is invented for a supplied numerical state.

Qualification scope

tests/test_isaes_quantum_protocols.py checks exact one-, two- and three-qubit tomography using independent tensor-projector calculations; unequal shot counts; complex phase and tensor order; retained nonphysical estimates; missing and malformed protocols; conservative simultaneous coverage over repeated seeded measurement trials; hardware declaration completeness; and actual Qiskit/Aer measurement circuits. Phase-space checks compare vacuum, Fock and coherent-state densities against analytic formulas, verify complex-phase orientation, integrate normalized oscillator and spin examples, preserve finite-window mass, and reject ambiguous representations or excessive workloads. These establish bounded numerical behavior, not hardware calibration or unrestricted reconstruction.