This page is intended as retrieval context for an AI assistant. It preserves the notebook’s full code flow while making implicit assumptions explicit (config keys, file paths, expected return shapes).
What the notebook does (high level)
It benchmarks a utility-scale quantum dynamics simulation of the 2D transverse-field Ising model (TFIM) on 127 qubits across four scenarios:- Ideal (noise-free, loaded from cache)
- Noisy (raw hardware run; or cached)
- IBM (mitigated results and runtime taken from IBM Nature paper; loaded from cache)
- Haiqu (hardware run with Haiqu mitigation; or cached)
- Magnetization vs transverse field strength: (M(h))
- Quantum cloud bill comparison from per-minute pricing
Model and observable (assistant-ready)
- Transverse-field sweep:
transverse_field_paramsis a list of 1-parameter bindings (shape:[(1,), (1,), ...]). - Observable: average magnetization
[
M = \frac\sum_^ Z_i
]
implemented as a
SparsePauliOpcontainingNsingle-ZPauli strings with coefficient1/N.
Files and config contract
The notebook expects:utils/config.json— credentials + experiment + processor pricingutils/utils.py— helpers:load_json_data(path)make_ising_evolution_circuit(num_qubits, num_steps, backend_coupling_map)show_device_connectivity(coupling_map)
{cached_folder}/ideal.json{cached_folder}/noisy.json{cached_folder}/ibm.json{cached_folder}/haiqu.json
Full notebook code flow (verbatim, ordered)
The following sections reproduce the notebook’s executable flow in the same order as the.ipynb.
1
1) Import, load config, init Haiqu, read device connectivity
2
2) Define the parameter sweep and build the parameterized evolution circuit
3
3) Build the magnetization observable as SparsePauliOp
4
4) Define the four scenario runners (Ideal / Noisy / IBM / Haiqu)
5
5) Run all scenarios and tabulate results
6
6) Plot magnetization curves and log to Haiqu experiment
7
7) Compute bill breakdown, plot log-scale costs, and log to Haiqu
AI retrieval notes (non-obvious but important)
device_execution = any(config["device_credentials"].values())controls whether the notebook runs live jobs or loads cached JSON.- Cached file format differs:
ideal.jsonandibm.jsonare loaded asresults = load_json_data(...); magnetization = results[0][0]noisy.jsonandhaiqu.jsonare loaded asload_json_data(...)["results"](thenresults[0][0])
haiqu.run(...).result()is assumed to return an indexable structure whereresults[0][0]yields the magnetization vector aligned withtransverse_field_params.