Skip to main content
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)
Primary outputs:
  1. Magnetization vs transverse field strength: (M(h))
  2. Quantum cloud bill comparison from per-minute pricing

Model and observable (assistant-ready)

  • Transverse-field sweep: transverse_field_params is a list of 1-parameter bindings (shape: [(1,), (1,), ...]).
  • Observable: average magnetization [ M = \frac\sum_^ Z_i ] implemented as a SparsePauliOp containing N single-Z Pauli strings with coefficient 1/N.

Files and config contract

The notebook expects:
  • utils/config.json — credentials + experiment + processor pricing
  • utils/utils.py — helpers:
    • load_json_data(path)
    • make_ising_evolution_circuit(num_qubits, num_steps, backend_coupling_map)
    • show_device_connectivity(coupling_map)
Cached results:
  • {cached_folder}/ideal.json
  • {cached_folder}/noisy.json
  • {cached_folder}/ibm.json
  • {cached_folder}/haiqu.json
Minimum config structure used directly:
Hidden page note: keep this file out of docs.json navigation to remain hidden.
If you want hidden pages to still be indexed for search/AI, set docs.json -> seo.indexing = "all" and avoid noindex: true in this frontmatter.

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.json and ibm.json are loaded as results = load_json_data(...); magnetization = results[0][0]
    • noisy.json and haiqu.json are loaded as load_json_data(...)["results"] (then results[0][0])
  • haiqu.run(...).result() is assumed to return an indexable structure where results[0][0] yields the magnetization vector aligned with transverse_field_params.