quchip.analysis.effective_hamiltonian¶
Static-ZZ pathway attribution and des-Cloizeaux effective-Hamiltonian extraction.
Two analysis primitives built on the dressed-state and Schrieffer-Wolff (SW)
machinery of quchip.chip.sw and quchip.chip.analysis:
- analyze_static_zz
analyze_static_zz()— the exact residual ZZ between two devices (dispersive_shift(), unchanged), plus a 2nd-order SW attribution of the virtual states mediating it. The exactzzvalue is the “ZZ = 0 while J stays on target” loss primitive of a calibration sweep;pathwaysis a diagnostic for which virtual transition dominates it.- effective_hamiltonian
effective_hamiltonian()— the des-Cloizeaux effective Hamiltonian on a user-chosen computational subspace: dense, GHz, with eigenvalues that are exactly the labeled dressed energies of the requested bare states.
Both routes are algebra on the chip’s exact dressed spectrum (no perturbative
truncation for the reported zz or effective_hamiltonian eigenvalues),
so they stay differentiable end-to-end whenever the chip’s backend supports
differentiating through its eigensolver.
References
Bravyi, DiVincenzo & Loss, Schrieffer-Wolff transformation for quantum many-body systems, Ann. Phys. 326, 2793 (2011). Blais et al., Circuit quantum electrodynamics, RMP 93, 025005 (2021), §IV.C (static ZZ) and the des-Cloizeaux perturbation-theory appendix convention for projecting onto a computational subspace.
- class quchip.analysis.effective_hamiltonian.StaticZZResult(zz, pathways, device_a, device_b, device_labels)[source]¶
Bases:
objectStore exact static ZZ between two devices, plus its 2nd-order SW pathway attribution.
- Parameters:
- zz¶
E(1,1) - E(1,0) - E(0,1) + E(0,0), identical todispersive_shift(device_a, device_b)()— exact, not perturbative.- Type:
Any
- pathways¶
(bare_occupation, amount)pairs: the contribution of each virtual intermediate state to the 2nd-order SW correction of the(1_a, 1_b)diagonal matrix element,amount = 1/2 * V_ik*V_ki*(1/(E_i - E_k) + 1/(E_i - E_k))forithe(1_a, 1_b)bare index — a decomposition of that one energy correction, not ofzzitself (which combines four dressed energies exactly).bare_occupationis a full chip-length Fock tuple, in device order.
- device_a, device_b
Resolved device labels.
- device_labels¶
Chip device labels in tensor-product order, for reading
pathways’ occupation tuples.
- Amounts stay in the array namespace of the chip's parameters (JAX in, JAX
- out) — traceable and differentiable, precision-filtered only on the
- concrete path (:func:`~quchip.chip.sw.pathway_attribution`).
- quchip.analysis.effective_hamiltonian.analyze_static_zz(chip, device_a, device_b)[source]¶
Compute exact static ZZ between two devices, plus its 2nd-order SW pathway attribution.
zzisdispersive_shift(), unchanged — the exact, all-orders residual coupling.pathwaysdecomposes the 2nd-order SW correction to the(1_a, 1_b)diagonal energy into its virtual-intermediate-state contributions (pathway_attribution()), read off a partition that keeps only the four computational states of(a, b)(every other device grounded) — the natural loss primitive for a calibration sweep that holdszznear zero while some other exchange (e.g. aeliminate()-mediatedJ) stays on target.- Parameters:
chip (Chip)
device_a (str or BaseDevice) – The two devices whose static ZZ is analyzed.
device_b (str or BaseDevice) – The two devices whose static ZZ is analyzed.
- Return type:
Examples
>>> from quchip import Capacitive, Chip, DuffingTransmon >>> from quchip.analysis import analyze_static_zz >>> q0 = DuffingTransmon(freq=5.0, anharmonicity=-0.25, levels=3, label="q0") >>> q1 = DuffingTransmon(freq=5.2, anharmonicity=-0.24, levels=3, label="q1") >>> chip = Chip([q0, q1], couplings=[Capacitive(q0, q1, g=0.01)]) >>> result = analyze_static_zz(chip, "q0", "q1") >>> zz = result.zz # exact residual ZZ, GHz
- class quchip.analysis.effective_hamiltonian.EffectiveHamiltonianResult(h_eff, basis, device_labels)[source]¶
Bases:
objectStore the des-Cloizeaux effective Hamiltonian on a labeled computational subspace.
h_effis built asS^-1/2 (W E W^dagger) S^-1/2withWthe overlap block between the requested bare states and their assigned dressed states,Ethe labeled dressed energies, andS = W W^daggerthe (generally non-orthonormal) overlap Gram matrix — the symmetric (Löwdin) orthonormalization ofexact_reduction()’s pairwise construction, generalized to an arbitrary number of kept states.S^-1/2 Wis unitary by construction, soh_effis unitarily similar todiag(E): its eigenvalues are exactly the labeled dressed energies, to numerical precision, regardless of how strongly the kept states hybridize with the rest of the chip. Off-diagonal entries carry the effective couplings between kept states; the diagonal is not, in general, individually equal to any one dressed energy once couplings mix the kept states.
- quchip.analysis.effective_hamiltonian.effective_hamiltonian(chip, subspace)[source]¶
Compute the des-Cloizeaux effective Hamiltonian on a user-chosen computational subspace.
Reuses the chip’s dressed spectrum (
_compute_array_labeled()) rather than re-diagonalizing: one full-chip diagonalization drives both this anddispersive_shift(). SeeEffectiveHamiltonianResultfor the construction and its exactness guarantee.- Parameters:
- Return type:
Examples
>>> from quchip import Capacitive, Chip, DuffingTransmon >>> from quchip.analysis import effective_hamiltonian >>> q0 = DuffingTransmon(freq=5.0, anharmonicity=-0.25, levels=3, label="q0") >>> q1 = DuffingTransmon(freq=5.2, anharmonicity=-0.24, levels=3, label="q1") >>> chip = Chip([q0, q1], couplings=[Capacitive(q0, q1, g=0.01)]) >>> result = effective_hamiltonian(chip, ["q0", "q1"]) >>> result.h_eff.shape (4, 4)
- quchip.analysis.effective_hamiltonian.effective_hamiltonian_between_states(chip, state_a, state_b)[source]¶
Compute the 2x2 Löwdin-orthonormalized effective Hamiltonian between two explicit bare states.
The same des-Cloizeaux construction
effective_hamiltonian()uses (seeEffectiveHamiltonianResult), specialized to exactly the two-state subspace spanned by state_a and state_b — not the four-state product subspace a["a", "b"]bare-sequence spec toeffective_hamiltonian()would build (each device’s full qubit subspace independently), which is a different projection. This is the natural primitive for a static exchange rate between two single-excitation bare states \(|1_a, 0_b\rangle\) and \(|0_a, 1_b\rangle\): the returned matrix’s off-diagonal entry is that exchange rate, in GHz.- Parameters:
- Returns:
(2, 2)Hermitian matrix, GHz, in the array namespace of the chip’s backend. Eigenvalues are exactly state_a and state_b’s labeled dressed energies, to numerical precision.- Return type:
Any
Examples
>>> from quchip import Capacitive, Chip, DuffingTransmon >>> from quchip.analysis import effective_hamiltonian_between_states >>> q0 = DuffingTransmon(freq=5.0, anharmonicity=-0.25, levels=3, label="q0") >>> q1 = DuffingTransmon(freq=5.2, anharmonicity=-0.24, levels=3, label="q1") >>> chip = Chip([q0, q1], couplings=[Capacitive(q0, q1, g=0.01)]) >>> h_eff = effective_hamiltonian_between_states(chip, (1, 0), (0, 1)) >>> h_eff.shape (2, 2)