[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-nvidia-writing-experiment-scripts":3,"mdc--8o1oaj-key":34,"related-repo-nvidia-writing-experiment-scripts":2000,"related-org-nvidia-writing-experiment-scripts":2079},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"writing-experiment-scripts","author quantum experiment scripts","Author new experiment scripts that are compatible with the lab system's auto-discovery. Use when the user asks to create a new experiment type, add a custom measurement, or write a Python script that should be discoverable via the `lab` and `run_experiment` tools. Covers required function signatures, type hints, docstrings, and return formats.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},"nvidia","NVIDIA","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fnvidia.png",[12,14,17,20],{"name":9,"slug":8,"type":13},"tag",{"name":15,"slug":16,"type":13},"Python","python",{"name":18,"slug":19,"type":13},"Laboratory","laboratory",{"name":21,"slug":22,"type":13},"Quantum Computing","quantum-computing",57,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FQuantum-Calibration-Agent-Blueprint","2026-07-14T05:32:42.253966",null,17,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"This is a reference agent blueprint for AI-powered quantum device calibration. It provides an intelligent agent interface for discovering, executing, and analyzing quantum calibration experiments with support for automated workflows and vision-based analysis.","https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FQuantum-Calibration-Agent-Blueprint\u002Ftree\u002FHEAD\u002Fdata\u002Fknowledge\u002Fskills\u002Fwriting-experiment-scripts","---\nname: writing-experiment-scripts\ndescription: Author new experiment scripts that are compatible with the lab system's auto-discovery. Use when the user asks to create a new experiment type, add a custom measurement, or write a Python script that should be discoverable via the `lab` and `run_experiment` tools. Covers required function signatures, type hints, docstrings, and return formats.\n---\n\n# Writing Experiment Scripts\n\nHow to create experiment scripts compatible with the lab system.\n\n## Quick Reference\n\n| Requirement | Details |\n|-------------|---------|\n| Location | Scripts directory (see system prompt) |\n| Function | ONE public function per file (no `_` prefix) |\n| Type hints | Required with `Annotated` bounds |\n| Docstring | Google-style with Args\u002FReturns |\n| Return | Dict with `status`, `results`, `arrays`, `plots` |\n\n## Function Signature\n\n```python\nfrom typing import Annotated\n\ndef experiment_name(\n    param1: Annotated[float, (min, max)] = default,\n    param2: Annotated[int, (min, max)] = default,\n    target: str = \"qubit_0\",\n) -> dict:\n    \"\"\"Short description of the experiment.\n\n    Args:\n        param1: Description with units\n        param2: Description with units\n        target: Target qubit identifier\n\n    Returns:\n        Measurement results with data and plots\n    \"\"\"\n    # Implementation\n    return {...}\n```\n\n## Return Format\n\n### Success\n```python\n{\n    \"status\": \"success\",\n    \"results\": {\n        \"peak_frequency\": 5042.3,    # Scalar results\n        \"linewidth_mhz\": 1.2,\n    },\n    \"arrays\": {\n        \"frequencies\": [4900.0, 4902.0, ...],  # Array data\n        \"amplitudes\": [0.01, 0.02, ...],\n    },\n    \"plots\": [\n        {\"name\": \"spectrum\", \"format\": \"png\", \"data\": \"base64...\"},\n    ],\n    \"metadata\": {\n        \"target\": \"qubit_0\",\n        \"experiment_type\": \"qubit_spectroscopy\",\n    },\n}\n```\n\n### Failure\n```python\n{\n    \"status\": \"failed\",\n    \"error\": \"No peak found in frequency range\"\n}\n```\n\n## Parameter Types\n\n### Supported Types\n- `float` - Floating point numbers\n- `int` - Integers\n- `str` - Strings (no range validation)\n- `bool` - Boolean flags\n- `list` - Lists (no range validation)\n\n### Range Constraints\n```python\nfrom typing import Annotated\n\n# Float with range [0.0, 100.0]\namplitude: Annotated[float, (0.0, 100.0)] = 50.0\n\n# Int with range [1, 10000]\nnum_averages: Annotated[int, (1, 10000)] = 1000\n```\n\n**Important:** Parameters without defaults are required. Parameters with defaults are optional.\n\n## Complete Example\n\n```python\n\"\"\"Simulated qubit spectroscopy experiment.\"\"\"\nfrom typing import Annotated\nimport numpy as np\nimport base64\nimport io\n\n\ndef qubit_spectroscopy(\n    start: Annotated[float, (3000.0, 8000.0)] = 4900.0,\n    stop: Annotated[float, (3000.0, 8000.0)] = 5100.0,\n    step: Annotated[float, (0.1, 100.0)] = 2.0,\n    num_avs: Annotated[int, (1, 10000)] = 1000,\n    target: str = \"qubit_0\",\n) -> dict:\n    \"\"\"Qubit spectroscopy frequency sweep.\n\n    Performs a frequency sweep to find the qubit resonance frequency.\n\n    Args:\n        start: Start frequency in MHz\n        stop: Stop frequency in MHz\n        step: Frequency step in MHz\n        num_avs: Number of averages\n        target: Target qubit identifier\n\n    Returns:\n        Measurement results with frequency estimate and data\n    \"\"\"\n    # Generate frequency array\n    frequencies = np.arange(start, stop + step, step)\n\n    # Simulate measurement (replace with real hardware calls)\n    center_freq = (start + stop) \u002F 2\n    linewidth = 3.0\n    signal = 1.0 \u002F (1.0 + ((frequencies - center_freq) \u002F linewidth) ** 2)\n    noise = np.random.normal(0, 0.05, len(frequencies))\n    magnitude = signal + noise\n\n    # Find peak\n    peak_idx = np.argmax(magnitude)\n    frequency_guess = float(frequencies[peak_idx])\n\n    # Generate plot (optional)\n    plots = []\n    try:\n        import matplotlib\n        matplotlib.use('Agg')\n        import matplotlib.pyplot as plt\n\n        fig, ax = plt.subplots(figsize=(10, 6))\n        ax.plot(frequencies, magnitude, 'b-')\n        ax.axvline(frequency_guess, color='r', linestyle='--')\n        ax.set_xlabel('Frequency (MHz)')\n        ax.set_ylabel('Magnitude')\n        ax.set_title(f'Spectroscopy - {target}')\n\n        buf = io.BytesIO()\n        fig.savefig(buf, format='png', dpi=100)\n        buf.seek(0)\n        plots.append({\n            \"name\": \"spectroscopy\",\n            \"format\": \"png\",\n            \"data\": base64.b64encode(buf.read()).decode('ascii')\n        })\n        plt.close(fig)\n    except ImportError:\n        pass\n\n    return {\n        \"status\": \"success\",\n        \"results\": {\n            \"frequency_guess\": frequency_guess,\n            \"linewidth_mhz\": linewidth,\n        },\n        \"arrays\": {\n            \"frequencies\": frequencies.tolist(),\n            \"magnitude\": magnitude.tolist(),\n        },\n        \"plots\": plots,\n        \"metadata\": {\n            \"target\": target,\n            \"experiment_type\": \"qubit_spectroscopy\",\n        },\n    }\n```\n\n## Common Patterns\n\n### Sweep Experiment\n```python\ndef frequency_sweep(\n    start: Annotated[float, (1000.0, 10000.0)] = 4000.0,\n    stop: Annotated[float, (1000.0, 10000.0)] = 6000.0,\n    step: Annotated[float, (0.1, 100.0)] = 1.0,\n) -> dict:\n```\n\n### Time-Domain Measurement\n```python\ndef t1_measurement(\n    delay_start: Annotated[float, (0.0, 1000.0)] = 0.0,\n    delay_stop: Annotated[float, (0.0, 1000.0)] = 100.0,\n    num_points: Annotated[int, (10, 500)] = 50,\n    num_averages: Annotated[int, (100, 50000)] = 1000,\n) -> dict:\n```\n\n### Amplitude Calibration\n```python\ndef rabi_amplitude(\n    amp_start: Annotated[float, (0.0, 1.0)] = 0.0,\n    amp_stop: Annotated[float, (0.0, 1.0)] = 1.0,\n    num_points: Annotated[int, (10, 200)] = 50,\n    drive_frequency: Annotated[float, (3000.0, 8000.0)] = 5000.0,\n) -> dict:\n```\n\n## Validation\n\nAfter creating or modifying an experiment script, **always validate it** using the CLI tool:\n\n```bash\nqca experiments validate \u003Cpath-to-script> --human\n```\n\nThis command checks:\n- File exists and is a valid Python file\n- Contains a public function (no underscore prefix)\n- Function has `-> dict` return type annotation\n- Parameters have type hints (ideally with `Annotated` ranges)\n- Syntax is valid\n\n**Example output (valid script):**\n```\nValidation Result: VALID\nFile: scripts\u002Fmy_experiment.py\n\n┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Check                  ┃ Status   ┃ Details                                 ┃\n┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ file_exists            │ ✓ PASS   │ File exists                             │\n│ python_file            │ ✓ PASS   │ File has .py extension                  │\n│ not_private            │ ✓ PASS   │ File is public (no underscore prefix)   │\n│ syntax_valid           │ ✓ PASS   │ Python syntax is valid                  │\n│ has_public_function    │ ✓ PASS   │ Found public function: my_experiment    │\n│ return_type_dict       │ ✓ PASS   │ Return type is dict                     │\n│ has_docstring          │ ✓ PASS   │ Function has docstring                  │\n│ has_typed_parameters   │ ✓ PASS   │ Found 3 typed parameter(s)              │\n│ has_annotated_ranges   │ ✓ PASS   │ 3 parameter(s) have range constraints   │\n│ optional_parameters    │ ✓ PASS   │ 3 optional parameter(s) with defaults   │\n└────────────────────────┴──────────┴─────────────────────────────────────────┘\n\nExperiment Schema:\n  Name: my_experiment\n  Description: My experiment description.\n  Module Path: \u002Fpath\u002Fto\u002Fscripts\u002Fmy_experiment.py\n\nParameters:\n┏━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┓\n┃ Name          ┃ Type  ┃ Required ┃ Default ┃ Range        ┃\n┡━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━┩\n│ amplitude     │ float │ No       │ 0.5     │ 0.0 to 1.0   │\n│ num_points    │ int   │ No       │ 51      │ 10 to 200    │\n│ target        │ str   │ No       │ qubit_0 │ -            │\n└───────────────┴───────┴──────────┴─────────┴──────────────┘\n```\n\n**Example output (invalid script):**\n```\nValidation Result: INVALID\nFile: scripts\u002Fbad_experiment.py\n\n┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Check                  ┃ Status   ┃ Details                         ┃\n┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ file_exists            │ ✓ PASS   │ File exists                     │\n│ python_file            │ ✓ PASS   │ File has .py extension          │\n│ not_private            │ ✓ PASS   │ File is public                  │\n│ syntax_valid           │ ✓ PASS   │ Python syntax is valid          │\n│ has_public_function    │ ✓ PASS   │ Found public function: my_func  │\n│ return_type_dict       │ ✗ FAIL   │ No return type annotation       │\n└────────────────────────┴──────────┴─────────────────────────────────┘\n\nErrors:\n  • Function must have return type annotation '-> dict'\n```\n\nAfter validation passes, verify the experiment appears in the list:\n```bash\nqca experiments list --human\n```\n\n## Checklist\n\nBefore running your script:\n\n- [ ] File is in the scripts directory\n- [ ] Only ONE public function (no `_` prefix)\n- [ ] All parameters have type hints with `Annotated`\n- [ ] All parameters have default values (or are intentionally required)\n- [ ] Function has Google-style docstring\n- [ ] Returns dict with `status` key\n- [ ] Arrays are converted to lists (`.tolist()`)\n- [ ] Plots are base64-encoded PNG or Plotly JSON\n- [ ] **Run `qca experiments validate \u003Cpath> --human` to verify**\n- [ ] **Run `qca experiments list --human` to confirm discovery**\n",{"data":35,"body":36},{"name":4,"description":6},{"type":37,"children":38},"root",[39,47,53,60,198,204,385,391,398,547,553,590,596,602,662,668,728,739,745,1468,1474,1480,1526,1532,1586,1592,1646,1652,1664,1720,1725,1768,1776,1786,1794,1803,1808,1835,1841,1846,1994],{"type":40,"tag":41,"props":42,"children":43},"element","h1",{"id":4},[44],{"type":45,"value":46},"text","Writing Experiment Scripts",{"type":40,"tag":48,"props":49,"children":50},"p",{},[51],{"type":45,"value":52},"How to create experiment scripts compatible with the lab system.",{"type":40,"tag":54,"props":55,"children":57},"h2",{"id":56},"quick-reference",[58],{"type":45,"value":59},"Quick Reference",{"type":40,"tag":61,"props":62,"children":63},"table",{},[64,83],{"type":40,"tag":65,"props":66,"children":67},"thead",{},[68],{"type":40,"tag":69,"props":70,"children":71},"tr",{},[72,78],{"type":40,"tag":73,"props":74,"children":75},"th",{},[76],{"type":45,"value":77},"Requirement",{"type":40,"tag":73,"props":79,"children":80},{},[81],{"type":45,"value":82},"Details",{"type":40,"tag":84,"props":85,"children":86},"tbody",{},[87,101,123,144,157],{"type":40,"tag":69,"props":88,"children":89},{},[90,96],{"type":40,"tag":91,"props":92,"children":93},"td",{},[94],{"type":45,"value":95},"Location",{"type":40,"tag":91,"props":97,"children":98},{},[99],{"type":45,"value":100},"Scripts directory (see system prompt)",{"type":40,"tag":69,"props":102,"children":103},{},[104,109],{"type":40,"tag":91,"props":105,"children":106},{},[107],{"type":45,"value":108},"Function",{"type":40,"tag":91,"props":110,"children":111},{},[112,114,121],{"type":45,"value":113},"ONE public function per file (no ",{"type":40,"tag":115,"props":116,"children":118},"code",{"className":117},[],[119],{"type":45,"value":120},"_",{"type":45,"value":122}," prefix)",{"type":40,"tag":69,"props":124,"children":125},{},[126,131],{"type":40,"tag":91,"props":127,"children":128},{},[129],{"type":45,"value":130},"Type hints",{"type":40,"tag":91,"props":132,"children":133},{},[134,136,142],{"type":45,"value":135},"Required with ",{"type":40,"tag":115,"props":137,"children":139},{"className":138},[],[140],{"type":45,"value":141},"Annotated",{"type":45,"value":143}," bounds",{"type":40,"tag":69,"props":145,"children":146},{},[147,152],{"type":40,"tag":91,"props":148,"children":149},{},[150],{"type":45,"value":151},"Docstring",{"type":40,"tag":91,"props":153,"children":154},{},[155],{"type":45,"value":156},"Google-style with Args\u002FReturns",{"type":40,"tag":69,"props":158,"children":159},{},[160,165],{"type":40,"tag":91,"props":161,"children":162},{},[163],{"type":45,"value":164},"Return",{"type":40,"tag":91,"props":166,"children":167},{},[168,170,176,178,184,185,191,192],{"type":45,"value":169},"Dict with ",{"type":40,"tag":115,"props":171,"children":173},{"className":172},[],[174],{"type":45,"value":175},"status",{"type":45,"value":177},", ",{"type":40,"tag":115,"props":179,"children":181},{"className":180},[],[182],{"type":45,"value":183},"results",{"type":45,"value":177},{"type":40,"tag":115,"props":186,"children":188},{"className":187},[],[189],{"type":45,"value":190},"arrays",{"type":45,"value":177},{"type":40,"tag":115,"props":193,"children":195},{"className":194},[],[196],{"type":45,"value":197},"plots",{"type":40,"tag":54,"props":199,"children":201},{"id":200},"function-signature",[202],{"type":45,"value":203},"Function Signature",{"type":40,"tag":205,"props":206,"children":210},"pre",{"className":207,"code":208,"language":16,"meta":209,"style":209},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from typing import Annotated\n\ndef experiment_name(\n    param1: Annotated[float, (min, max)] = default,\n    param2: Annotated[int, (min, max)] = default,\n    target: str = \"qubit_0\",\n) -> dict:\n    \"\"\"Short description of the experiment.\n\n    Args:\n        param1: Description with units\n        param2: Description with units\n        target: Target qubit identifier\n\n    Returns:\n        Measurement results with data and plots\n    \"\"\"\n    # Implementation\n    return {...}\n","",[211],{"type":40,"tag":115,"props":212,"children":213},{"__ignoreMap":209},[214,225,235,244,253,262,271,280,289,297,306,315,324,333,341,350,359,367,376],{"type":40,"tag":215,"props":216,"children":219},"span",{"class":217,"line":218},"line",1,[220],{"type":40,"tag":215,"props":221,"children":222},{},[223],{"type":45,"value":224},"from typing import Annotated\n",{"type":40,"tag":215,"props":226,"children":228},{"class":217,"line":227},2,[229],{"type":40,"tag":215,"props":230,"children":232},{"emptyLinePlaceholder":231},true,[233],{"type":45,"value":234},"\n",{"type":40,"tag":215,"props":236,"children":238},{"class":217,"line":237},3,[239],{"type":40,"tag":215,"props":240,"children":241},{},[242],{"type":45,"value":243},"def experiment_name(\n",{"type":40,"tag":215,"props":245,"children":247},{"class":217,"line":246},4,[248],{"type":40,"tag":215,"props":249,"children":250},{},[251],{"type":45,"value":252},"    param1: Annotated[float, (min, max)] = default,\n",{"type":40,"tag":215,"props":254,"children":256},{"class":217,"line":255},5,[257],{"type":40,"tag":215,"props":258,"children":259},{},[260],{"type":45,"value":261},"    param2: Annotated[int, (min, max)] = default,\n",{"type":40,"tag":215,"props":263,"children":265},{"class":217,"line":264},6,[266],{"type":40,"tag":215,"props":267,"children":268},{},[269],{"type":45,"value":270},"    target: str = \"qubit_0\",\n",{"type":40,"tag":215,"props":272,"children":274},{"class":217,"line":273},7,[275],{"type":40,"tag":215,"props":276,"children":277},{},[278],{"type":45,"value":279},") -> dict:\n",{"type":40,"tag":215,"props":281,"children":283},{"class":217,"line":282},8,[284],{"type":40,"tag":215,"props":285,"children":286},{},[287],{"type":45,"value":288},"    \"\"\"Short description of the experiment.\n",{"type":40,"tag":215,"props":290,"children":292},{"class":217,"line":291},9,[293],{"type":40,"tag":215,"props":294,"children":295},{"emptyLinePlaceholder":231},[296],{"type":45,"value":234},{"type":40,"tag":215,"props":298,"children":300},{"class":217,"line":299},10,[301],{"type":40,"tag":215,"props":302,"children":303},{},[304],{"type":45,"value":305},"    Args:\n",{"type":40,"tag":215,"props":307,"children":309},{"class":217,"line":308},11,[310],{"type":40,"tag":215,"props":311,"children":312},{},[313],{"type":45,"value":314},"        param1: Description with units\n",{"type":40,"tag":215,"props":316,"children":318},{"class":217,"line":317},12,[319],{"type":40,"tag":215,"props":320,"children":321},{},[322],{"type":45,"value":323},"        param2: Description with units\n",{"type":40,"tag":215,"props":325,"children":327},{"class":217,"line":326},13,[328],{"type":40,"tag":215,"props":329,"children":330},{},[331],{"type":45,"value":332},"        target: Target qubit identifier\n",{"type":40,"tag":215,"props":334,"children":336},{"class":217,"line":335},14,[337],{"type":40,"tag":215,"props":338,"children":339},{"emptyLinePlaceholder":231},[340],{"type":45,"value":234},{"type":40,"tag":215,"props":342,"children":344},{"class":217,"line":343},15,[345],{"type":40,"tag":215,"props":346,"children":347},{},[348],{"type":45,"value":349},"    Returns:\n",{"type":40,"tag":215,"props":351,"children":353},{"class":217,"line":352},16,[354],{"type":40,"tag":215,"props":355,"children":356},{},[357],{"type":45,"value":358},"        Measurement results with data and plots\n",{"type":40,"tag":215,"props":360,"children":361},{"class":217,"line":27},[362],{"type":40,"tag":215,"props":363,"children":364},{},[365],{"type":45,"value":366},"    \"\"\"\n",{"type":40,"tag":215,"props":368,"children":370},{"class":217,"line":369},18,[371],{"type":40,"tag":215,"props":372,"children":373},{},[374],{"type":45,"value":375},"    # Implementation\n",{"type":40,"tag":215,"props":377,"children":379},{"class":217,"line":378},19,[380],{"type":40,"tag":215,"props":381,"children":382},{},[383],{"type":45,"value":384},"    return {...}\n",{"type":40,"tag":54,"props":386,"children":388},{"id":387},"return-format",[389],{"type":45,"value":390},"Return Format",{"type":40,"tag":392,"props":393,"children":395},"h3",{"id":394},"success",[396],{"type":45,"value":397},"Success",{"type":40,"tag":205,"props":399,"children":401},{"className":207,"code":400,"language":16,"meta":209,"style":209},"{\n    \"status\": \"success\",\n    \"results\": {\n        \"peak_frequency\": 5042.3,    # Scalar results\n        \"linewidth_mhz\": 1.2,\n    },\n    \"arrays\": {\n        \"frequencies\": [4900.0, 4902.0, ...],  # Array data\n        \"amplitudes\": [0.01, 0.02, ...],\n    },\n    \"plots\": [\n        {\"name\": \"spectrum\", \"format\": \"png\", \"data\": \"base64...\"},\n    ],\n    \"metadata\": {\n        \"target\": \"qubit_0\",\n        \"experiment_type\": \"qubit_spectroscopy\",\n    },\n}\n",[402],{"type":40,"tag":115,"props":403,"children":404},{"__ignoreMap":209},[405,413,421,429,437,445,453,461,469,477,484,492,500,508,516,524,532,539],{"type":40,"tag":215,"props":406,"children":407},{"class":217,"line":218},[408],{"type":40,"tag":215,"props":409,"children":410},{},[411],{"type":45,"value":412},"{\n",{"type":40,"tag":215,"props":414,"children":415},{"class":217,"line":227},[416],{"type":40,"tag":215,"props":417,"children":418},{},[419],{"type":45,"value":420},"    \"status\": \"success\",\n",{"type":40,"tag":215,"props":422,"children":423},{"class":217,"line":237},[424],{"type":40,"tag":215,"props":425,"children":426},{},[427],{"type":45,"value":428},"    \"results\": {\n",{"type":40,"tag":215,"props":430,"children":431},{"class":217,"line":246},[432],{"type":40,"tag":215,"props":433,"children":434},{},[435],{"type":45,"value":436},"        \"peak_frequency\": 5042.3,    # Scalar results\n",{"type":40,"tag":215,"props":438,"children":439},{"class":217,"line":255},[440],{"type":40,"tag":215,"props":441,"children":442},{},[443],{"type":45,"value":444},"        \"linewidth_mhz\": 1.2,\n",{"type":40,"tag":215,"props":446,"children":447},{"class":217,"line":264},[448],{"type":40,"tag":215,"props":449,"children":450},{},[451],{"type":45,"value":452},"    },\n",{"type":40,"tag":215,"props":454,"children":455},{"class":217,"line":273},[456],{"type":40,"tag":215,"props":457,"children":458},{},[459],{"type":45,"value":460},"    \"arrays\": {\n",{"type":40,"tag":215,"props":462,"children":463},{"class":217,"line":282},[464],{"type":40,"tag":215,"props":465,"children":466},{},[467],{"type":45,"value":468},"        \"frequencies\": [4900.0, 4902.0, ...],  # Array data\n",{"type":40,"tag":215,"props":470,"children":471},{"class":217,"line":291},[472],{"type":40,"tag":215,"props":473,"children":474},{},[475],{"type":45,"value":476},"        \"amplitudes\": [0.01, 0.02, ...],\n",{"type":40,"tag":215,"props":478,"children":479},{"class":217,"line":299},[480],{"type":40,"tag":215,"props":481,"children":482},{},[483],{"type":45,"value":452},{"type":40,"tag":215,"props":485,"children":486},{"class":217,"line":308},[487],{"type":40,"tag":215,"props":488,"children":489},{},[490],{"type":45,"value":491},"    \"plots\": [\n",{"type":40,"tag":215,"props":493,"children":494},{"class":217,"line":317},[495],{"type":40,"tag":215,"props":496,"children":497},{},[498],{"type":45,"value":499},"        {\"name\": \"spectrum\", \"format\": \"png\", \"data\": \"base64...\"},\n",{"type":40,"tag":215,"props":501,"children":502},{"class":217,"line":326},[503],{"type":40,"tag":215,"props":504,"children":505},{},[506],{"type":45,"value":507},"    ],\n",{"type":40,"tag":215,"props":509,"children":510},{"class":217,"line":335},[511],{"type":40,"tag":215,"props":512,"children":513},{},[514],{"type":45,"value":515},"    \"metadata\": {\n",{"type":40,"tag":215,"props":517,"children":518},{"class":217,"line":343},[519],{"type":40,"tag":215,"props":520,"children":521},{},[522],{"type":45,"value":523},"        \"target\": \"qubit_0\",\n",{"type":40,"tag":215,"props":525,"children":526},{"class":217,"line":352},[527],{"type":40,"tag":215,"props":528,"children":529},{},[530],{"type":45,"value":531},"        \"experiment_type\": \"qubit_spectroscopy\",\n",{"type":40,"tag":215,"props":533,"children":534},{"class":217,"line":27},[535],{"type":40,"tag":215,"props":536,"children":537},{},[538],{"type":45,"value":452},{"type":40,"tag":215,"props":540,"children":541},{"class":217,"line":369},[542],{"type":40,"tag":215,"props":543,"children":544},{},[545],{"type":45,"value":546},"}\n",{"type":40,"tag":392,"props":548,"children":550},{"id":549},"failure",[551],{"type":45,"value":552},"Failure",{"type":40,"tag":205,"props":554,"children":556},{"className":207,"code":555,"language":16,"meta":209,"style":209},"{\n    \"status\": \"failed\",\n    \"error\": \"No peak found in frequency range\"\n}\n",[557],{"type":40,"tag":115,"props":558,"children":559},{"__ignoreMap":209},[560,567,575,583],{"type":40,"tag":215,"props":561,"children":562},{"class":217,"line":218},[563],{"type":40,"tag":215,"props":564,"children":565},{},[566],{"type":45,"value":412},{"type":40,"tag":215,"props":568,"children":569},{"class":217,"line":227},[570],{"type":40,"tag":215,"props":571,"children":572},{},[573],{"type":45,"value":574},"    \"status\": \"failed\",\n",{"type":40,"tag":215,"props":576,"children":577},{"class":217,"line":237},[578],{"type":40,"tag":215,"props":579,"children":580},{},[581],{"type":45,"value":582},"    \"error\": \"No peak found in frequency range\"\n",{"type":40,"tag":215,"props":584,"children":585},{"class":217,"line":246},[586],{"type":40,"tag":215,"props":587,"children":588},{},[589],{"type":45,"value":546},{"type":40,"tag":54,"props":591,"children":593},{"id":592},"parameter-types",[594],{"type":45,"value":595},"Parameter Types",{"type":40,"tag":392,"props":597,"children":599},{"id":598},"supported-types",[600],{"type":45,"value":601},"Supported Types",{"type":40,"tag":603,"props":604,"children":605},"ul",{},[606,618,629,640,651],{"type":40,"tag":607,"props":608,"children":609},"li",{},[610,616],{"type":40,"tag":115,"props":611,"children":613},{"className":612},[],[614],{"type":45,"value":615},"float",{"type":45,"value":617}," - Floating point numbers",{"type":40,"tag":607,"props":619,"children":620},{},[621,627],{"type":40,"tag":115,"props":622,"children":624},{"className":623},[],[625],{"type":45,"value":626},"int",{"type":45,"value":628}," - Integers",{"type":40,"tag":607,"props":630,"children":631},{},[632,638],{"type":40,"tag":115,"props":633,"children":635},{"className":634},[],[636],{"type":45,"value":637},"str",{"type":45,"value":639}," - Strings (no range validation)",{"type":40,"tag":607,"props":641,"children":642},{},[643,649],{"type":40,"tag":115,"props":644,"children":646},{"className":645},[],[647],{"type":45,"value":648},"bool",{"type":45,"value":650}," - Boolean flags",{"type":40,"tag":607,"props":652,"children":653},{},[654,660],{"type":40,"tag":115,"props":655,"children":657},{"className":656},[],[658],{"type":45,"value":659},"list",{"type":45,"value":661}," - Lists (no range validation)",{"type":40,"tag":392,"props":663,"children":665},{"id":664},"range-constraints",[666],{"type":45,"value":667},"Range Constraints",{"type":40,"tag":205,"props":669,"children":671},{"className":207,"code":670,"language":16,"meta":209,"style":209},"from typing import Annotated\n\n# Float with range [0.0, 100.0]\namplitude: Annotated[float, (0.0, 100.0)] = 50.0\n\n# Int with range [1, 10000]\nnum_averages: Annotated[int, (1, 10000)] = 1000\n",[672],{"type":40,"tag":115,"props":673,"children":674},{"__ignoreMap":209},[675,682,689,697,705,712,720],{"type":40,"tag":215,"props":676,"children":677},{"class":217,"line":218},[678],{"type":40,"tag":215,"props":679,"children":680},{},[681],{"type":45,"value":224},{"type":40,"tag":215,"props":683,"children":684},{"class":217,"line":227},[685],{"type":40,"tag":215,"props":686,"children":687},{"emptyLinePlaceholder":231},[688],{"type":45,"value":234},{"type":40,"tag":215,"props":690,"children":691},{"class":217,"line":237},[692],{"type":40,"tag":215,"props":693,"children":694},{},[695],{"type":45,"value":696},"# Float with range [0.0, 100.0]\n",{"type":40,"tag":215,"props":698,"children":699},{"class":217,"line":246},[700],{"type":40,"tag":215,"props":701,"children":702},{},[703],{"type":45,"value":704},"amplitude: Annotated[float, (0.0, 100.0)] = 50.0\n",{"type":40,"tag":215,"props":706,"children":707},{"class":217,"line":255},[708],{"type":40,"tag":215,"props":709,"children":710},{"emptyLinePlaceholder":231},[711],{"type":45,"value":234},{"type":40,"tag":215,"props":713,"children":714},{"class":217,"line":264},[715],{"type":40,"tag":215,"props":716,"children":717},{},[718],{"type":45,"value":719},"# Int with range [1, 10000]\n",{"type":40,"tag":215,"props":721,"children":722},{"class":217,"line":273},[723],{"type":40,"tag":215,"props":724,"children":725},{},[726],{"type":45,"value":727},"num_averages: Annotated[int, (1, 10000)] = 1000\n",{"type":40,"tag":48,"props":729,"children":730},{},[731,737],{"type":40,"tag":732,"props":733,"children":734},"strong",{},[735],{"type":45,"value":736},"Important:",{"type":45,"value":738}," Parameters without defaults are required. Parameters with defaults are optional.",{"type":40,"tag":54,"props":740,"children":742},{"id":741},"complete-example",[743],{"type":45,"value":744},"Complete Example",{"type":40,"tag":205,"props":746,"children":748},{"className":207,"code":747,"language":16,"meta":209,"style":209},"\"\"\"Simulated qubit spectroscopy experiment.\"\"\"\nfrom typing import Annotated\nimport numpy as np\nimport base64\nimport io\n\n\ndef qubit_spectroscopy(\n    start: Annotated[float, (3000.0, 8000.0)] = 4900.0,\n    stop: Annotated[float, (3000.0, 8000.0)] = 5100.0,\n    step: Annotated[float, (0.1, 100.0)] = 2.0,\n    num_avs: Annotated[int, (1, 10000)] = 1000,\n    target: str = \"qubit_0\",\n) -> dict:\n    \"\"\"Qubit spectroscopy frequency sweep.\n\n    Performs a frequency sweep to find the qubit resonance frequency.\n\n    Args:\n        start: Start frequency in MHz\n        stop: Stop frequency in MHz\n        step: Frequency step in MHz\n        num_avs: Number of averages\n        target: Target qubit identifier\n\n    Returns:\n        Measurement results with frequency estimate and data\n    \"\"\"\n    # Generate frequency array\n    frequencies = np.arange(start, stop + step, step)\n\n    # Simulate measurement (replace with real hardware calls)\n    center_freq = (start + stop) \u002F 2\n    linewidth = 3.0\n    signal = 1.0 \u002F (1.0 + ((frequencies - center_freq) \u002F linewidth) ** 2)\n    noise = np.random.normal(0, 0.05, len(frequencies))\n    magnitude = signal + noise\n\n    # Find peak\n    peak_idx = np.argmax(magnitude)\n    frequency_guess = float(frequencies[peak_idx])\n\n    # Generate plot (optional)\n    plots = []\n    try:\n        import matplotlib\n        matplotlib.use('Agg')\n        import matplotlib.pyplot as plt\n\n        fig, ax = plt.subplots(figsize=(10, 6))\n        ax.plot(frequencies, magnitude, 'b-')\n        ax.axvline(frequency_guess, color='r', linestyle='--')\n        ax.set_xlabel('Frequency (MHz)')\n        ax.set_ylabel('Magnitude')\n        ax.set_title(f'Spectroscopy - {target}')\n\n        buf = io.BytesIO()\n        fig.savefig(buf, format='png', dpi=100)\n        buf.seek(0)\n        plots.append({\n            \"name\": \"spectroscopy\",\n            \"format\": \"png\",\n            \"data\": base64.b64encode(buf.read()).decode('ascii')\n        })\n        plt.close(fig)\n    except ImportError:\n        pass\n\n    return {\n        \"status\": \"success\",\n        \"results\": {\n            \"frequency_guess\": frequency_guess,\n            \"linewidth_mhz\": linewidth,\n        },\n        \"arrays\": {\n            \"frequencies\": frequencies.tolist(),\n            \"magnitude\": magnitude.tolist(),\n        },\n        \"plots\": plots,\n        \"metadata\": {\n            \"target\": target,\n            \"experiment_type\": \"qubit_spectroscopy\",\n        },\n    }\n",[749],{"type":40,"tag":115,"props":750,"children":751},{"__ignoreMap":209},[752,760,767,775,783,791,798,805,813,821,829,837,845,852,859,867,874,882,889,896,905,914,923,932,940,948,956,965,973,982,991,999,1008,1017,1026,1035,1044,1053,1061,1070,1079,1088,1096,1105,1114,1123,1132,1141,1150,1158,1167,1176,1185,1194,1203,1212,1220,1228,1237,1246,1255,1264,1273,1282,1291,1300,1309,1318,1326,1335,1344,1353,1362,1371,1380,1389,1398,1407,1415,1424,1433,1442,1451,1459],{"type":40,"tag":215,"props":753,"children":754},{"class":217,"line":218},[755],{"type":40,"tag":215,"props":756,"children":757},{},[758],{"type":45,"value":759},"\"\"\"Simulated qubit spectroscopy experiment.\"\"\"\n",{"type":40,"tag":215,"props":761,"children":762},{"class":217,"line":227},[763],{"type":40,"tag":215,"props":764,"children":765},{},[766],{"type":45,"value":224},{"type":40,"tag":215,"props":768,"children":769},{"class":217,"line":237},[770],{"type":40,"tag":215,"props":771,"children":772},{},[773],{"type":45,"value":774},"import numpy as np\n",{"type":40,"tag":215,"props":776,"children":777},{"class":217,"line":246},[778],{"type":40,"tag":215,"props":779,"children":780},{},[781],{"type":45,"value":782},"import base64\n",{"type":40,"tag":215,"props":784,"children":785},{"class":217,"line":255},[786],{"type":40,"tag":215,"props":787,"children":788},{},[789],{"type":45,"value":790},"import io\n",{"type":40,"tag":215,"props":792,"children":793},{"class":217,"line":264},[794],{"type":40,"tag":215,"props":795,"children":796},{"emptyLinePlaceholder":231},[797],{"type":45,"value":234},{"type":40,"tag":215,"props":799,"children":800},{"class":217,"line":273},[801],{"type":40,"tag":215,"props":802,"children":803},{"emptyLinePlaceholder":231},[804],{"type":45,"value":234},{"type":40,"tag":215,"props":806,"children":807},{"class":217,"line":282},[808],{"type":40,"tag":215,"props":809,"children":810},{},[811],{"type":45,"value":812},"def qubit_spectroscopy(\n",{"type":40,"tag":215,"props":814,"children":815},{"class":217,"line":291},[816],{"type":40,"tag":215,"props":817,"children":818},{},[819],{"type":45,"value":820},"    start: Annotated[float, (3000.0, 8000.0)] = 4900.0,\n",{"type":40,"tag":215,"props":822,"children":823},{"class":217,"line":299},[824],{"type":40,"tag":215,"props":825,"children":826},{},[827],{"type":45,"value":828},"    stop: Annotated[float, (3000.0, 8000.0)] = 5100.0,\n",{"type":40,"tag":215,"props":830,"children":831},{"class":217,"line":308},[832],{"type":40,"tag":215,"props":833,"children":834},{},[835],{"type":45,"value":836},"    step: Annotated[float, (0.1, 100.0)] = 2.0,\n",{"type":40,"tag":215,"props":838,"children":839},{"class":217,"line":317},[840],{"type":40,"tag":215,"props":841,"children":842},{},[843],{"type":45,"value":844},"    num_avs: Annotated[int, (1, 10000)] = 1000,\n",{"type":40,"tag":215,"props":846,"children":847},{"class":217,"line":326},[848],{"type":40,"tag":215,"props":849,"children":850},{},[851],{"type":45,"value":270},{"type":40,"tag":215,"props":853,"children":854},{"class":217,"line":335},[855],{"type":40,"tag":215,"props":856,"children":857},{},[858],{"type":45,"value":279},{"type":40,"tag":215,"props":860,"children":861},{"class":217,"line":343},[862],{"type":40,"tag":215,"props":863,"children":864},{},[865],{"type":45,"value":866},"    \"\"\"Qubit spectroscopy frequency sweep.\n",{"type":40,"tag":215,"props":868,"children":869},{"class":217,"line":352},[870],{"type":40,"tag":215,"props":871,"children":872},{"emptyLinePlaceholder":231},[873],{"type":45,"value":234},{"type":40,"tag":215,"props":875,"children":876},{"class":217,"line":27},[877],{"type":40,"tag":215,"props":878,"children":879},{},[880],{"type":45,"value":881},"    Performs a frequency sweep to find the qubit resonance frequency.\n",{"type":40,"tag":215,"props":883,"children":884},{"class":217,"line":369},[885],{"type":40,"tag":215,"props":886,"children":887},{"emptyLinePlaceholder":231},[888],{"type":45,"value":234},{"type":40,"tag":215,"props":890,"children":891},{"class":217,"line":378},[892],{"type":40,"tag":215,"props":893,"children":894},{},[895],{"type":45,"value":305},{"type":40,"tag":215,"props":897,"children":899},{"class":217,"line":898},20,[900],{"type":40,"tag":215,"props":901,"children":902},{},[903],{"type":45,"value":904},"        start: Start frequency in MHz\n",{"type":40,"tag":215,"props":906,"children":908},{"class":217,"line":907},21,[909],{"type":40,"tag":215,"props":910,"children":911},{},[912],{"type":45,"value":913},"        stop: Stop frequency in MHz\n",{"type":40,"tag":215,"props":915,"children":917},{"class":217,"line":916},22,[918],{"type":40,"tag":215,"props":919,"children":920},{},[921],{"type":45,"value":922},"        step: Frequency step in MHz\n",{"type":40,"tag":215,"props":924,"children":926},{"class":217,"line":925},23,[927],{"type":40,"tag":215,"props":928,"children":929},{},[930],{"type":45,"value":931},"        num_avs: Number of averages\n",{"type":40,"tag":215,"props":933,"children":935},{"class":217,"line":934},24,[936],{"type":40,"tag":215,"props":937,"children":938},{},[939],{"type":45,"value":332},{"type":40,"tag":215,"props":941,"children":943},{"class":217,"line":942},25,[944],{"type":40,"tag":215,"props":945,"children":946},{"emptyLinePlaceholder":231},[947],{"type":45,"value":234},{"type":40,"tag":215,"props":949,"children":951},{"class":217,"line":950},26,[952],{"type":40,"tag":215,"props":953,"children":954},{},[955],{"type":45,"value":349},{"type":40,"tag":215,"props":957,"children":959},{"class":217,"line":958},27,[960],{"type":40,"tag":215,"props":961,"children":962},{},[963],{"type":45,"value":964},"        Measurement results with frequency estimate and data\n",{"type":40,"tag":215,"props":966,"children":968},{"class":217,"line":967},28,[969],{"type":40,"tag":215,"props":970,"children":971},{},[972],{"type":45,"value":366},{"type":40,"tag":215,"props":974,"children":976},{"class":217,"line":975},29,[977],{"type":40,"tag":215,"props":978,"children":979},{},[980],{"type":45,"value":981},"    # Generate frequency array\n",{"type":40,"tag":215,"props":983,"children":985},{"class":217,"line":984},30,[986],{"type":40,"tag":215,"props":987,"children":988},{},[989],{"type":45,"value":990},"    frequencies = np.arange(start, stop + step, step)\n",{"type":40,"tag":215,"props":992,"children":994},{"class":217,"line":993},31,[995],{"type":40,"tag":215,"props":996,"children":997},{"emptyLinePlaceholder":231},[998],{"type":45,"value":234},{"type":40,"tag":215,"props":1000,"children":1002},{"class":217,"line":1001},32,[1003],{"type":40,"tag":215,"props":1004,"children":1005},{},[1006],{"type":45,"value":1007},"    # Simulate measurement (replace with real hardware calls)\n",{"type":40,"tag":215,"props":1009,"children":1011},{"class":217,"line":1010},33,[1012],{"type":40,"tag":215,"props":1013,"children":1014},{},[1015],{"type":45,"value":1016},"    center_freq = (start + stop) \u002F 2\n",{"type":40,"tag":215,"props":1018,"children":1020},{"class":217,"line":1019},34,[1021],{"type":40,"tag":215,"props":1022,"children":1023},{},[1024],{"type":45,"value":1025},"    linewidth = 3.0\n",{"type":40,"tag":215,"props":1027,"children":1029},{"class":217,"line":1028},35,[1030],{"type":40,"tag":215,"props":1031,"children":1032},{},[1033],{"type":45,"value":1034},"    signal = 1.0 \u002F (1.0 + ((frequencies - center_freq) \u002F linewidth) ** 2)\n",{"type":40,"tag":215,"props":1036,"children":1038},{"class":217,"line":1037},36,[1039],{"type":40,"tag":215,"props":1040,"children":1041},{},[1042],{"type":45,"value":1043},"    noise = np.random.normal(0, 0.05, len(frequencies))\n",{"type":40,"tag":215,"props":1045,"children":1047},{"class":217,"line":1046},37,[1048],{"type":40,"tag":215,"props":1049,"children":1050},{},[1051],{"type":45,"value":1052},"    magnitude = signal + noise\n",{"type":40,"tag":215,"props":1054,"children":1056},{"class":217,"line":1055},38,[1057],{"type":40,"tag":215,"props":1058,"children":1059},{"emptyLinePlaceholder":231},[1060],{"type":45,"value":234},{"type":40,"tag":215,"props":1062,"children":1064},{"class":217,"line":1063},39,[1065],{"type":40,"tag":215,"props":1066,"children":1067},{},[1068],{"type":45,"value":1069},"    # Find peak\n",{"type":40,"tag":215,"props":1071,"children":1073},{"class":217,"line":1072},40,[1074],{"type":40,"tag":215,"props":1075,"children":1076},{},[1077],{"type":45,"value":1078},"    peak_idx = np.argmax(magnitude)\n",{"type":40,"tag":215,"props":1080,"children":1082},{"class":217,"line":1081},41,[1083],{"type":40,"tag":215,"props":1084,"children":1085},{},[1086],{"type":45,"value":1087},"    frequency_guess = float(frequencies[peak_idx])\n",{"type":40,"tag":215,"props":1089,"children":1091},{"class":217,"line":1090},42,[1092],{"type":40,"tag":215,"props":1093,"children":1094},{"emptyLinePlaceholder":231},[1095],{"type":45,"value":234},{"type":40,"tag":215,"props":1097,"children":1099},{"class":217,"line":1098},43,[1100],{"type":40,"tag":215,"props":1101,"children":1102},{},[1103],{"type":45,"value":1104},"    # Generate plot (optional)\n",{"type":40,"tag":215,"props":1106,"children":1108},{"class":217,"line":1107},44,[1109],{"type":40,"tag":215,"props":1110,"children":1111},{},[1112],{"type":45,"value":1113},"    plots = []\n",{"type":40,"tag":215,"props":1115,"children":1117},{"class":217,"line":1116},45,[1118],{"type":40,"tag":215,"props":1119,"children":1120},{},[1121],{"type":45,"value":1122},"    try:\n",{"type":40,"tag":215,"props":1124,"children":1126},{"class":217,"line":1125},46,[1127],{"type":40,"tag":215,"props":1128,"children":1129},{},[1130],{"type":45,"value":1131},"        import matplotlib\n",{"type":40,"tag":215,"props":1133,"children":1135},{"class":217,"line":1134},47,[1136],{"type":40,"tag":215,"props":1137,"children":1138},{},[1139],{"type":45,"value":1140},"        matplotlib.use('Agg')\n",{"type":40,"tag":215,"props":1142,"children":1144},{"class":217,"line":1143},48,[1145],{"type":40,"tag":215,"props":1146,"children":1147},{},[1148],{"type":45,"value":1149},"        import matplotlib.pyplot as plt\n",{"type":40,"tag":215,"props":1151,"children":1153},{"class":217,"line":1152},49,[1154],{"type":40,"tag":215,"props":1155,"children":1156},{"emptyLinePlaceholder":231},[1157],{"type":45,"value":234},{"type":40,"tag":215,"props":1159,"children":1161},{"class":217,"line":1160},50,[1162],{"type":40,"tag":215,"props":1163,"children":1164},{},[1165],{"type":45,"value":1166},"        fig, ax = plt.subplots(figsize=(10, 6))\n",{"type":40,"tag":215,"props":1168,"children":1170},{"class":217,"line":1169},51,[1171],{"type":40,"tag":215,"props":1172,"children":1173},{},[1174],{"type":45,"value":1175},"        ax.plot(frequencies, magnitude, 'b-')\n",{"type":40,"tag":215,"props":1177,"children":1179},{"class":217,"line":1178},52,[1180],{"type":40,"tag":215,"props":1181,"children":1182},{},[1183],{"type":45,"value":1184},"        ax.axvline(frequency_guess, color='r', linestyle='--')\n",{"type":40,"tag":215,"props":1186,"children":1188},{"class":217,"line":1187},53,[1189],{"type":40,"tag":215,"props":1190,"children":1191},{},[1192],{"type":45,"value":1193},"        ax.set_xlabel('Frequency (MHz)')\n",{"type":40,"tag":215,"props":1195,"children":1197},{"class":217,"line":1196},54,[1198],{"type":40,"tag":215,"props":1199,"children":1200},{},[1201],{"type":45,"value":1202},"        ax.set_ylabel('Magnitude')\n",{"type":40,"tag":215,"props":1204,"children":1206},{"class":217,"line":1205},55,[1207],{"type":40,"tag":215,"props":1208,"children":1209},{},[1210],{"type":45,"value":1211},"        ax.set_title(f'Spectroscopy - {target}')\n",{"type":40,"tag":215,"props":1213,"children":1215},{"class":217,"line":1214},56,[1216],{"type":40,"tag":215,"props":1217,"children":1218},{"emptyLinePlaceholder":231},[1219],{"type":45,"value":234},{"type":40,"tag":215,"props":1221,"children":1222},{"class":217,"line":23},[1223],{"type":40,"tag":215,"props":1224,"children":1225},{},[1226],{"type":45,"value":1227},"        buf = io.BytesIO()\n",{"type":40,"tag":215,"props":1229,"children":1231},{"class":217,"line":1230},58,[1232],{"type":40,"tag":215,"props":1233,"children":1234},{},[1235],{"type":45,"value":1236},"        fig.savefig(buf, format='png', dpi=100)\n",{"type":40,"tag":215,"props":1238,"children":1240},{"class":217,"line":1239},59,[1241],{"type":40,"tag":215,"props":1242,"children":1243},{},[1244],{"type":45,"value":1245},"        buf.seek(0)\n",{"type":40,"tag":215,"props":1247,"children":1249},{"class":217,"line":1248},60,[1250],{"type":40,"tag":215,"props":1251,"children":1252},{},[1253],{"type":45,"value":1254},"        plots.append({\n",{"type":40,"tag":215,"props":1256,"children":1258},{"class":217,"line":1257},61,[1259],{"type":40,"tag":215,"props":1260,"children":1261},{},[1262],{"type":45,"value":1263},"            \"name\": \"spectroscopy\",\n",{"type":40,"tag":215,"props":1265,"children":1267},{"class":217,"line":1266},62,[1268],{"type":40,"tag":215,"props":1269,"children":1270},{},[1271],{"type":45,"value":1272},"            \"format\": \"png\",\n",{"type":40,"tag":215,"props":1274,"children":1276},{"class":217,"line":1275},63,[1277],{"type":40,"tag":215,"props":1278,"children":1279},{},[1280],{"type":45,"value":1281},"            \"data\": base64.b64encode(buf.read()).decode('ascii')\n",{"type":40,"tag":215,"props":1283,"children":1285},{"class":217,"line":1284},64,[1286],{"type":40,"tag":215,"props":1287,"children":1288},{},[1289],{"type":45,"value":1290},"        })\n",{"type":40,"tag":215,"props":1292,"children":1294},{"class":217,"line":1293},65,[1295],{"type":40,"tag":215,"props":1296,"children":1297},{},[1298],{"type":45,"value":1299},"        plt.close(fig)\n",{"type":40,"tag":215,"props":1301,"children":1303},{"class":217,"line":1302},66,[1304],{"type":40,"tag":215,"props":1305,"children":1306},{},[1307],{"type":45,"value":1308},"    except ImportError:\n",{"type":40,"tag":215,"props":1310,"children":1312},{"class":217,"line":1311},67,[1313],{"type":40,"tag":215,"props":1314,"children":1315},{},[1316],{"type":45,"value":1317},"        pass\n",{"type":40,"tag":215,"props":1319,"children":1321},{"class":217,"line":1320},68,[1322],{"type":40,"tag":215,"props":1323,"children":1324},{"emptyLinePlaceholder":231},[1325],{"type":45,"value":234},{"type":40,"tag":215,"props":1327,"children":1329},{"class":217,"line":1328},69,[1330],{"type":40,"tag":215,"props":1331,"children":1332},{},[1333],{"type":45,"value":1334},"    return {\n",{"type":40,"tag":215,"props":1336,"children":1338},{"class":217,"line":1337},70,[1339],{"type":40,"tag":215,"props":1340,"children":1341},{},[1342],{"type":45,"value":1343},"        \"status\": \"success\",\n",{"type":40,"tag":215,"props":1345,"children":1347},{"class":217,"line":1346},71,[1348],{"type":40,"tag":215,"props":1349,"children":1350},{},[1351],{"type":45,"value":1352},"        \"results\": {\n",{"type":40,"tag":215,"props":1354,"children":1356},{"class":217,"line":1355},72,[1357],{"type":40,"tag":215,"props":1358,"children":1359},{},[1360],{"type":45,"value":1361},"            \"frequency_guess\": frequency_guess,\n",{"type":40,"tag":215,"props":1363,"children":1365},{"class":217,"line":1364},73,[1366],{"type":40,"tag":215,"props":1367,"children":1368},{},[1369],{"type":45,"value":1370},"            \"linewidth_mhz\": linewidth,\n",{"type":40,"tag":215,"props":1372,"children":1374},{"class":217,"line":1373},74,[1375],{"type":40,"tag":215,"props":1376,"children":1377},{},[1378],{"type":45,"value":1379},"        },\n",{"type":40,"tag":215,"props":1381,"children":1383},{"class":217,"line":1382},75,[1384],{"type":40,"tag":215,"props":1385,"children":1386},{},[1387],{"type":45,"value":1388},"        \"arrays\": {\n",{"type":40,"tag":215,"props":1390,"children":1392},{"class":217,"line":1391},76,[1393],{"type":40,"tag":215,"props":1394,"children":1395},{},[1396],{"type":45,"value":1397},"            \"frequencies\": frequencies.tolist(),\n",{"type":40,"tag":215,"props":1399,"children":1401},{"class":217,"line":1400},77,[1402],{"type":40,"tag":215,"props":1403,"children":1404},{},[1405],{"type":45,"value":1406},"            \"magnitude\": magnitude.tolist(),\n",{"type":40,"tag":215,"props":1408,"children":1410},{"class":217,"line":1409},78,[1411],{"type":40,"tag":215,"props":1412,"children":1413},{},[1414],{"type":45,"value":1379},{"type":40,"tag":215,"props":1416,"children":1418},{"class":217,"line":1417},79,[1419],{"type":40,"tag":215,"props":1420,"children":1421},{},[1422],{"type":45,"value":1423},"        \"plots\": plots,\n",{"type":40,"tag":215,"props":1425,"children":1427},{"class":217,"line":1426},80,[1428],{"type":40,"tag":215,"props":1429,"children":1430},{},[1431],{"type":45,"value":1432},"        \"metadata\": {\n",{"type":40,"tag":215,"props":1434,"children":1436},{"class":217,"line":1435},81,[1437],{"type":40,"tag":215,"props":1438,"children":1439},{},[1440],{"type":45,"value":1441},"            \"target\": target,\n",{"type":40,"tag":215,"props":1443,"children":1445},{"class":217,"line":1444},82,[1446],{"type":40,"tag":215,"props":1447,"children":1448},{},[1449],{"type":45,"value":1450},"            \"experiment_type\": \"qubit_spectroscopy\",\n",{"type":40,"tag":215,"props":1452,"children":1454},{"class":217,"line":1453},83,[1455],{"type":40,"tag":215,"props":1456,"children":1457},{},[1458],{"type":45,"value":1379},{"type":40,"tag":215,"props":1460,"children":1462},{"class":217,"line":1461},84,[1463],{"type":40,"tag":215,"props":1464,"children":1465},{},[1466],{"type":45,"value":1467},"    }\n",{"type":40,"tag":54,"props":1469,"children":1471},{"id":1470},"common-patterns",[1472],{"type":45,"value":1473},"Common Patterns",{"type":40,"tag":392,"props":1475,"children":1477},{"id":1476},"sweep-experiment",[1478],{"type":45,"value":1479},"Sweep Experiment",{"type":40,"tag":205,"props":1481,"children":1483},{"className":207,"code":1482,"language":16,"meta":209,"style":209},"def frequency_sweep(\n    start: Annotated[float, (1000.0, 10000.0)] = 4000.0,\n    stop: Annotated[float, (1000.0, 10000.0)] = 6000.0,\n    step: Annotated[float, (0.1, 100.0)] = 1.0,\n) -> dict:\n",[1484],{"type":40,"tag":115,"props":1485,"children":1486},{"__ignoreMap":209},[1487,1495,1503,1511,1519],{"type":40,"tag":215,"props":1488,"children":1489},{"class":217,"line":218},[1490],{"type":40,"tag":215,"props":1491,"children":1492},{},[1493],{"type":45,"value":1494},"def frequency_sweep(\n",{"type":40,"tag":215,"props":1496,"children":1497},{"class":217,"line":227},[1498],{"type":40,"tag":215,"props":1499,"children":1500},{},[1501],{"type":45,"value":1502},"    start: Annotated[float, (1000.0, 10000.0)] = 4000.0,\n",{"type":40,"tag":215,"props":1504,"children":1505},{"class":217,"line":237},[1506],{"type":40,"tag":215,"props":1507,"children":1508},{},[1509],{"type":45,"value":1510},"    stop: Annotated[float, (1000.0, 10000.0)] = 6000.0,\n",{"type":40,"tag":215,"props":1512,"children":1513},{"class":217,"line":246},[1514],{"type":40,"tag":215,"props":1515,"children":1516},{},[1517],{"type":45,"value":1518},"    step: Annotated[float, (0.1, 100.0)] = 1.0,\n",{"type":40,"tag":215,"props":1520,"children":1521},{"class":217,"line":255},[1522],{"type":40,"tag":215,"props":1523,"children":1524},{},[1525],{"type":45,"value":279},{"type":40,"tag":392,"props":1527,"children":1529},{"id":1528},"time-domain-measurement",[1530],{"type":45,"value":1531},"Time-Domain Measurement",{"type":40,"tag":205,"props":1533,"children":1535},{"className":207,"code":1534,"language":16,"meta":209,"style":209},"def t1_measurement(\n    delay_start: Annotated[float, (0.0, 1000.0)] = 0.0,\n    delay_stop: Annotated[float, (0.0, 1000.0)] = 100.0,\n    num_points: Annotated[int, (10, 500)] = 50,\n    num_averages: Annotated[int, (100, 50000)] = 1000,\n) -> dict:\n",[1536],{"type":40,"tag":115,"props":1537,"children":1538},{"__ignoreMap":209},[1539,1547,1555,1563,1571,1579],{"type":40,"tag":215,"props":1540,"children":1541},{"class":217,"line":218},[1542],{"type":40,"tag":215,"props":1543,"children":1544},{},[1545],{"type":45,"value":1546},"def t1_measurement(\n",{"type":40,"tag":215,"props":1548,"children":1549},{"class":217,"line":227},[1550],{"type":40,"tag":215,"props":1551,"children":1552},{},[1553],{"type":45,"value":1554},"    delay_start: Annotated[float, (0.0, 1000.0)] = 0.0,\n",{"type":40,"tag":215,"props":1556,"children":1557},{"class":217,"line":237},[1558],{"type":40,"tag":215,"props":1559,"children":1560},{},[1561],{"type":45,"value":1562},"    delay_stop: Annotated[float, (0.0, 1000.0)] = 100.0,\n",{"type":40,"tag":215,"props":1564,"children":1565},{"class":217,"line":246},[1566],{"type":40,"tag":215,"props":1567,"children":1568},{},[1569],{"type":45,"value":1570},"    num_points: Annotated[int, (10, 500)] = 50,\n",{"type":40,"tag":215,"props":1572,"children":1573},{"class":217,"line":255},[1574],{"type":40,"tag":215,"props":1575,"children":1576},{},[1577],{"type":45,"value":1578},"    num_averages: Annotated[int, (100, 50000)] = 1000,\n",{"type":40,"tag":215,"props":1580,"children":1581},{"class":217,"line":264},[1582],{"type":40,"tag":215,"props":1583,"children":1584},{},[1585],{"type":45,"value":279},{"type":40,"tag":392,"props":1587,"children":1589},{"id":1588},"amplitude-calibration",[1590],{"type":45,"value":1591},"Amplitude Calibration",{"type":40,"tag":205,"props":1593,"children":1595},{"className":207,"code":1594,"language":16,"meta":209,"style":209},"def rabi_amplitude(\n    amp_start: Annotated[float, (0.0, 1.0)] = 0.0,\n    amp_stop: Annotated[float, (0.0, 1.0)] = 1.0,\n    num_points: Annotated[int, (10, 200)] = 50,\n    drive_frequency: Annotated[float, (3000.0, 8000.0)] = 5000.0,\n) -> dict:\n",[1596],{"type":40,"tag":115,"props":1597,"children":1598},{"__ignoreMap":209},[1599,1607,1615,1623,1631,1639],{"type":40,"tag":215,"props":1600,"children":1601},{"class":217,"line":218},[1602],{"type":40,"tag":215,"props":1603,"children":1604},{},[1605],{"type":45,"value":1606},"def rabi_amplitude(\n",{"type":40,"tag":215,"props":1608,"children":1609},{"class":217,"line":227},[1610],{"type":40,"tag":215,"props":1611,"children":1612},{},[1613],{"type":45,"value":1614},"    amp_start: Annotated[float, (0.0, 1.0)] = 0.0,\n",{"type":40,"tag":215,"props":1616,"children":1617},{"class":217,"line":237},[1618],{"type":40,"tag":215,"props":1619,"children":1620},{},[1621],{"type":45,"value":1622},"    amp_stop: Annotated[float, (0.0, 1.0)] = 1.0,\n",{"type":40,"tag":215,"props":1624,"children":1625},{"class":217,"line":246},[1626],{"type":40,"tag":215,"props":1627,"children":1628},{},[1629],{"type":45,"value":1630},"    num_points: Annotated[int, (10, 200)] = 50,\n",{"type":40,"tag":215,"props":1632,"children":1633},{"class":217,"line":255},[1634],{"type":40,"tag":215,"props":1635,"children":1636},{},[1637],{"type":45,"value":1638},"    drive_frequency: Annotated[float, (3000.0, 8000.0)] = 5000.0,\n",{"type":40,"tag":215,"props":1640,"children":1641},{"class":217,"line":264},[1642],{"type":40,"tag":215,"props":1643,"children":1644},{},[1645],{"type":45,"value":279},{"type":40,"tag":54,"props":1647,"children":1649},{"id":1648},"validation",[1650],{"type":45,"value":1651},"Validation",{"type":40,"tag":48,"props":1653,"children":1654},{},[1655,1657,1662],{"type":45,"value":1656},"After creating or modifying an experiment script, ",{"type":40,"tag":732,"props":1658,"children":1659},{},[1660],{"type":45,"value":1661},"always validate it",{"type":45,"value":1663}," using the CLI tool:",{"type":40,"tag":205,"props":1665,"children":1669},{"className":1666,"code":1667,"language":1668,"meta":209,"style":209},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","qca experiments validate \u003Cpath-to-script> --human\n","bash",[1670],{"type":40,"tag":115,"props":1671,"children":1672},{"__ignoreMap":209},[1673],{"type":40,"tag":215,"props":1674,"children":1675},{"class":217,"line":218},[1676,1682,1688,1693,1699,1704,1710,1715],{"type":40,"tag":215,"props":1677,"children":1679},{"style":1678},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1680],{"type":45,"value":1681},"qca",{"type":40,"tag":215,"props":1683,"children":1685},{"style":1684},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1686],{"type":45,"value":1687}," experiments",{"type":40,"tag":215,"props":1689,"children":1690},{"style":1684},[1691],{"type":45,"value":1692}," validate",{"type":40,"tag":215,"props":1694,"children":1696},{"style":1695},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1697],{"type":45,"value":1698}," \u003C",{"type":40,"tag":215,"props":1700,"children":1701},{"style":1684},[1702],{"type":45,"value":1703},"path-to-scrip",{"type":40,"tag":215,"props":1705,"children":1707},{"style":1706},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1708],{"type":45,"value":1709},"t",{"type":40,"tag":215,"props":1711,"children":1712},{"style":1695},[1713],{"type":45,"value":1714},">",{"type":40,"tag":215,"props":1716,"children":1717},{"style":1684},[1718],{"type":45,"value":1719}," --human\n",{"type":40,"tag":48,"props":1721,"children":1722},{},[1723],{"type":45,"value":1724},"This command checks:",{"type":40,"tag":603,"props":1726,"children":1727},{},[1728,1733,1738,1751,1763],{"type":40,"tag":607,"props":1729,"children":1730},{},[1731],{"type":45,"value":1732},"File exists and is a valid Python file",{"type":40,"tag":607,"props":1734,"children":1735},{},[1736],{"type":45,"value":1737},"Contains a public function (no underscore prefix)",{"type":40,"tag":607,"props":1739,"children":1740},{},[1741,1743,1749],{"type":45,"value":1742},"Function has ",{"type":40,"tag":115,"props":1744,"children":1746},{"className":1745},[],[1747],{"type":45,"value":1748},"-> dict",{"type":45,"value":1750}," return type annotation",{"type":40,"tag":607,"props":1752,"children":1753},{},[1754,1756,1761],{"type":45,"value":1755},"Parameters have type hints (ideally with ",{"type":40,"tag":115,"props":1757,"children":1759},{"className":1758},[],[1760],{"type":45,"value":141},{"type":45,"value":1762}," ranges)",{"type":40,"tag":607,"props":1764,"children":1765},{},[1766],{"type":45,"value":1767},"Syntax is valid",{"type":40,"tag":48,"props":1769,"children":1770},{},[1771],{"type":40,"tag":732,"props":1772,"children":1773},{},[1774],{"type":45,"value":1775},"Example output (valid script):",{"type":40,"tag":205,"props":1777,"children":1781},{"className":1778,"code":1780,"language":45},[1779],"language-text","Validation Result: VALID\nFile: scripts\u002Fmy_experiment.py\n\n┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Check                  ┃ Status   ┃ Details                                 ┃\n┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ file_exists            │ ✓ PASS   │ File exists                             │\n│ python_file            │ ✓ PASS   │ File has .py extension                  │\n│ not_private            │ ✓ PASS   │ File is public (no underscore prefix)   │\n│ syntax_valid           │ ✓ PASS   │ Python syntax is valid                  │\n│ has_public_function    │ ✓ PASS   │ Found public function: my_experiment    │\n│ return_type_dict       │ ✓ PASS   │ Return type is dict                     │\n│ has_docstring          │ ✓ PASS   │ Function has docstring                  │\n│ has_typed_parameters   │ ✓ PASS   │ Found 3 typed parameter(s)              │\n│ has_annotated_ranges   │ ✓ PASS   │ 3 parameter(s) have range constraints   │\n│ optional_parameters    │ ✓ PASS   │ 3 optional parameter(s) with defaults   │\n└────────────────────────┴──────────┴─────────────────────────────────────────┘\n\nExperiment Schema:\n  Name: my_experiment\n  Description: My experiment description.\n  Module Path: \u002Fpath\u002Fto\u002Fscripts\u002Fmy_experiment.py\n\nParameters:\n┏━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━┓\n┃ Name          ┃ Type  ┃ Required ┃ Default ┃ Range        ┃\n┡━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━┩\n│ amplitude     │ float │ No       │ 0.5     │ 0.0 to 1.0   │\n│ num_points    │ int   │ No       │ 51      │ 10 to 200    │\n│ target        │ str   │ No       │ qubit_0 │ -            │\n└───────────────┴───────┴──────────┴─────────┴──────────────┘\n",[1782],{"type":40,"tag":115,"props":1783,"children":1784},{"__ignoreMap":209},[1785],{"type":45,"value":1780},{"type":40,"tag":48,"props":1787,"children":1788},{},[1789],{"type":40,"tag":732,"props":1790,"children":1791},{},[1792],{"type":45,"value":1793},"Example output (invalid script):",{"type":40,"tag":205,"props":1795,"children":1798},{"className":1796,"code":1797,"language":45},[1779],"Validation Result: INVALID\nFile: scripts\u002Fbad_experiment.py\n\n┏━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓\n┃ Check                  ┃ Status   ┃ Details                         ┃\n┡━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩\n│ file_exists            │ ✓ PASS   │ File exists                     │\n│ python_file            │ ✓ PASS   │ File has .py extension          │\n│ not_private            │ ✓ PASS   │ File is public                  │\n│ syntax_valid           │ ✓ PASS   │ Python syntax is valid          │\n│ has_public_function    │ ✓ PASS   │ Found public function: my_func  │\n│ return_type_dict       │ ✗ FAIL   │ No return type annotation       │\n└────────────────────────┴──────────┴─────────────────────────────────┘\n\nErrors:\n  • Function must have return type annotation '-> dict'\n",[1799],{"type":40,"tag":115,"props":1800,"children":1801},{"__ignoreMap":209},[1802],{"type":45,"value":1797},{"type":40,"tag":48,"props":1804,"children":1805},{},[1806],{"type":45,"value":1807},"After validation passes, verify the experiment appears in the list:",{"type":40,"tag":205,"props":1809,"children":1811},{"className":1666,"code":1810,"language":1668,"meta":209,"style":209},"qca experiments list --human\n",[1812],{"type":40,"tag":115,"props":1813,"children":1814},{"__ignoreMap":209},[1815],{"type":40,"tag":215,"props":1816,"children":1817},{"class":217,"line":218},[1818,1822,1826,1831],{"type":40,"tag":215,"props":1819,"children":1820},{"style":1678},[1821],{"type":45,"value":1681},{"type":40,"tag":215,"props":1823,"children":1824},{"style":1684},[1825],{"type":45,"value":1687},{"type":40,"tag":215,"props":1827,"children":1828},{"style":1684},[1829],{"type":45,"value":1830}," list",{"type":40,"tag":215,"props":1832,"children":1833},{"style":1684},[1834],{"type":45,"value":1719},{"type":40,"tag":54,"props":1836,"children":1838},{"id":1837},"checklist",[1839],{"type":45,"value":1840},"Checklist",{"type":40,"tag":48,"props":1842,"children":1843},{},[1844],{"type":45,"value":1845},"Before running your script:",{"type":40,"tag":603,"props":1847,"children":1850},{"className":1848},[1849],"contains-task-list",[1851,1863,1878,1892,1901,1910,1926,1943,1952,1974],{"type":40,"tag":607,"props":1852,"children":1855},{"className":1853},[1854],"task-list-item",[1856,1861],{"type":40,"tag":1857,"props":1858,"children":1860},"input",{"disabled":231,"type":1859},"checkbox",[],{"type":45,"value":1862}," File is in the scripts directory",{"type":40,"tag":607,"props":1864,"children":1866},{"className":1865},[1854],[1867,1870,1872,1877],{"type":40,"tag":1857,"props":1868,"children":1869},{"disabled":231,"type":1859},[],{"type":45,"value":1871}," Only ONE public function (no ",{"type":40,"tag":115,"props":1873,"children":1875},{"className":1874},[],[1876],{"type":45,"value":120},{"type":45,"value":122},{"type":40,"tag":607,"props":1879,"children":1881},{"className":1880},[1854],[1882,1885,1887],{"type":40,"tag":1857,"props":1883,"children":1884},{"disabled":231,"type":1859},[],{"type":45,"value":1886}," All parameters have type hints with ",{"type":40,"tag":115,"props":1888,"children":1890},{"className":1889},[],[1891],{"type":45,"value":141},{"type":40,"tag":607,"props":1893,"children":1895},{"className":1894},[1854],[1896,1899],{"type":40,"tag":1857,"props":1897,"children":1898},{"disabled":231,"type":1859},[],{"type":45,"value":1900}," All parameters have default values (or are intentionally required)",{"type":40,"tag":607,"props":1902,"children":1904},{"className":1903},[1854],[1905,1908],{"type":40,"tag":1857,"props":1906,"children":1907},{"disabled":231,"type":1859},[],{"type":45,"value":1909}," Function has Google-style docstring",{"type":40,"tag":607,"props":1911,"children":1913},{"className":1912},[1854],[1914,1917,1919,1924],{"type":40,"tag":1857,"props":1915,"children":1916},{"disabled":231,"type":1859},[],{"type":45,"value":1918}," Returns dict with ",{"type":40,"tag":115,"props":1920,"children":1922},{"className":1921},[],[1923],{"type":45,"value":175},{"type":45,"value":1925}," key",{"type":40,"tag":607,"props":1927,"children":1929},{"className":1928},[1854],[1930,1933,1935,1941],{"type":40,"tag":1857,"props":1931,"children":1932},{"disabled":231,"type":1859},[],{"type":45,"value":1934}," Arrays are converted to lists (",{"type":40,"tag":115,"props":1936,"children":1938},{"className":1937},[],[1939],{"type":45,"value":1940},".tolist()",{"type":45,"value":1942},")",{"type":40,"tag":607,"props":1944,"children":1946},{"className":1945},[1854],[1947,1950],{"type":40,"tag":1857,"props":1948,"children":1949},{"disabled":231,"type":1859},[],{"type":45,"value":1951}," Plots are base64-encoded PNG or Plotly JSON",{"type":40,"tag":607,"props":1953,"children":1955},{"className":1954},[1854],[1956,1959,1961],{"type":40,"tag":1857,"props":1957,"children":1958},{"disabled":231,"type":1859},[],{"type":45,"value":1960}," ",{"type":40,"tag":732,"props":1962,"children":1963},{},[1964,1966,1972],{"type":45,"value":1965},"Run ",{"type":40,"tag":115,"props":1967,"children":1969},{"className":1968},[],[1970],{"type":45,"value":1971},"qca experiments validate \u003Cpath> --human",{"type":45,"value":1973}," to verify",{"type":40,"tag":607,"props":1975,"children":1977},{"className":1976},[1854],[1978,1981,1982],{"type":40,"tag":1857,"props":1979,"children":1980},{"disabled":231,"type":1859},[],{"type":45,"value":1960},{"type":40,"tag":732,"props":1983,"children":1984},{},[1985,1986,1992],{"type":45,"value":1965},{"type":40,"tag":115,"props":1987,"children":1989},{"className":1988},[],[1990],{"type":45,"value":1991},"qca experiments list --human",{"type":45,"value":1993}," to confirm discovery",{"type":40,"tag":1995,"props":1996,"children":1997},"style",{},[1998],{"type":45,"value":1999},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2001,"total":264},[2002,2015,2030,2044,2059,2072],{"slug":2003,"name":2003,"fn":2004,"description":2005,"org":2006,"tags":2007,"stars":23,"repoUrl":24,"updatedAt":2014},"analysis-scripts","analyze quantum experiment data","Write and run Python scripts to analyze quantum experiment data stored in HDF5 files. Use when the user asks to analyze experiment results, fit peaks or curves, extract features from measurement arrays, or when reusable analysis logic should be saved alongside an experiment for future reuse.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2008,2011,2012,2013],{"name":2009,"slug":2010,"type":13},"Data Analysis","data-analysis",{"name":9,"slug":8,"type":13},{"name":15,"slug":16,"type":13},{"name":21,"slug":22,"type":13},"2026-07-14T05:32:45.980229",{"slug":2016,"name":2016,"fn":2017,"description":2018,"org":2019,"tags":2020,"stars":23,"repoUrl":24,"updatedAt":2029},"experiment-execution","run quantum calibration experiments","Reference guide for running individual quantum calibration experiments and interpreting their results. Use when the user asks to run a single experiment (e.g. resonator spectroscopy, qubit spectroscopy, T1, T2), inspect experiment plots with the VLM, or query experiment history and schemas via the lab tool.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2021,2024,2025,2026],{"name":2022,"slug":2023,"type":13},"Benchmarking","benchmarking",{"name":9,"slug":8,"type":13},{"name":21,"slug":22,"type":13},{"name":2027,"slug":2028,"type":13},"Simulation","simulation","2026-07-14T05:32:41.013079",{"slug":2031,"name":2031,"fn":2032,"description":2033,"org":2034,"tags":2035,"stars":23,"repoUrl":24,"updatedAt":2043},"vlm-configuration","configure Vision Language Models","Configure the Vision Language Model (VLM) used for analyzing experiment plots. Use when the user asks to change the VLM provider or model, adjust temperature or max_tokens, enable or disable thinking mode, or troubleshoot VLM-related behavior in config.yaml.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2036,2039,2042],{"name":2037,"slug":2038,"type":13},"AI Infrastructure","ai-infrastructure",{"name":2040,"slug":2041,"type":13},"LLM","llm",{"name":9,"slug":8,"type":13},"2026-07-14T05:32:43.482864",{"slug":2045,"name":2045,"fn":2046,"description":2047,"org":2048,"tags":2049,"stars":23,"repoUrl":24,"updatedAt":2058},"workflow-execution","execute quantum calibration workflows","Execute a previously planned calibration workflow node by node, tracking progress and handling failures. Use when the user asks to run, resume, or continue an existing workflow, or to execute a sequence of calibration steps that has already been defined in data\u002Fworkflows\u002F.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2050,2053,2054,2055],{"name":2051,"slug":2052,"type":13},"Automation","automation",{"name":9,"slug":8,"type":13},{"name":21,"slug":22,"type":13},{"name":2056,"slug":2057,"type":13},"Workflow Automation","workflow-automation","2026-07-14T05:32:44.734587",{"slug":2060,"name":2060,"fn":2061,"description":2062,"org":2063,"tags":2064,"stars":23,"repoUrl":24,"updatedAt":2071},"workflow-planning","plan quantum calibration workflows","Plan a new calibration workflow by discussing experiment sequences, success\u002Ffailure criteria, and extracted parameters with the user before any files are created. Use when the user asks to plan, design, or create a new calibration sequence, or to build a multi-step workflow for a qubit or device. Requires explicit user confirmation before writing workflow files.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2065,2066,2069,2070],{"name":9,"slug":8,"type":13},{"name":2067,"slug":2068,"type":13},"Planning","planning",{"name":21,"slug":22,"type":13},{"name":2056,"slug":2057,"type":13},"2026-07-14T05:32:39.734157",{"slug":4,"name":4,"fn":5,"description":6,"org":2073,"tags":2074,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2075,2076,2077,2078],{"name":18,"slug":19,"type":13},{"name":9,"slug":8,"type":13},{"name":15,"slug":16,"type":13},{"name":21,"slug":22,"type":13},{"items":2080,"total":2235},[2081,2099,2115,2126,2138,2152,2165,2179,2192,2203,2217,2226],{"slug":2082,"name":2082,"fn":2083,"description":2084,"org":2085,"tags":2086,"stars":2096,"repoUrl":2097,"updatedAt":2098},"nemoclaw-user-guide","retrieve NemoClaw documentation and configuration","Guides human users' AI agents to the NemoClaw docs MCP server and canonical Fern documentation in Markdown form. Use when users ask how to install, configure, operate, troubleshoot, secure, or learn NemoClaw with an AI coding assistant. Trigger keywords - nemoclaw docs, use nemoclaw with ai agent, nemoclaw mcp docs, nemoclaw install help, nemoclaw quickstart, nemoclaw markdown docs, llms.txt, agent skills.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2087,2090,2093],{"name":2088,"slug":2089,"type":13},"Documentation","documentation",{"name":2091,"slug":2092,"type":13},"MCP","mcp",{"name":2094,"slug":2095,"type":13},"Search","search",21777,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FNemoClaw","2026-07-20T06:00:01.461044",{"slug":2100,"name":2100,"fn":2101,"description":2102,"org":2103,"tags":2104,"stars":2112,"repoUrl":2113,"updatedAt":2114},"mcore-build-and-dependency","manage Megatron-LM development environments","Container-based dev environment setup and dependency management for Megatron-LM. Covers acquiring and launching the CI container, uv package management, and updating uv.lock.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2105,2108,2111],{"name":2106,"slug":2107,"type":13},"Containers","containers",{"name":2109,"slug":2110,"type":13},"Deployment","deployment",{"name":15,"slug":16,"type":13},17049,"https:\u002F\u002Fgithub.com\u002FNVIDIA\u002FMegatron-LM","2026-07-27T06:06:11.249662",{"slug":2116,"name":2116,"fn":2117,"description":2118,"org":2119,"tags":2120,"stars":2112,"repoUrl":2113,"updatedAt":2125},"mcore-bump-base-image","update NVIDIA PyTorch base images","Bump the NVIDIA PyTorch base image (`nvcr.io\u002Fnvidia\u002Fpytorch:YY.MM-py3`) used by Megatron-LM CI. Covers the two pin sites (GitHub CI in `docker\u002F.ngc_version.dev` and GitLab CI in `.gitlab\u002Fstages\u002F01.build.yml`), the post-bump CI loop (re-run functional tests, refresh golden values, mark broken tests), and the gotchas that bit PRs",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2121,2124],{"name":2122,"slug":2123,"type":13},"CI\u002FCD","ci-cd",{"name":2109,"slug":2110,"type":13},"2026-07-14T05:25:59.97109",{"slug":2127,"name":2127,"fn":2128,"description":2129,"org":2130,"tags":2131,"stars":2112,"repoUrl":2113,"updatedAt":2137},"mcore-cicd","manage CI\u002FCD pipelines for Megatron-LM","CI\u002FCD reference for Megatron-LM. Covers CI pipeline structure, PR scope labels, triggering internal GitLab CI (which force-pushes the current branch to a pull-request\u002FBRANCH ref — always dry-run and verify the destination first; never run against shared or protected branches), and CI failure investigation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2132,2133,2134],{"name":2122,"slug":2123,"type":13},{"name":2109,"slug":2110,"type":13},{"name":2135,"slug":2136,"type":13},"GitHub","github","2026-07-27T06:06:12.278222",{"slug":2139,"name":2139,"fn":2140,"description":2141,"org":2142,"tags":2143,"stars":2112,"repoUrl":2113,"updatedAt":2151},"mcore-create-issue","investigate CI failures and create issues","Investigate a failing GitHub Actions run or job and create a GitHub issue for the failure.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2144,2147,2148],{"name":2145,"slug":2146,"type":13},"Debugging","debugging",{"name":2135,"slug":2136,"type":13},{"name":2149,"slug":2150,"type":13},"Triage","triage","2026-07-14T05:25:57.442089",{"slug":2153,"name":2153,"fn":2154,"description":2155,"org":2156,"tags":2157,"stars":2112,"repoUrl":2113,"updatedAt":2164},"mcore-linting-and-formatting","lint and format Megatron-LM code","Linting and formatting for Megatron-LM. Covers running autoformat.sh, tools (ruff, black, isort, pylint, mypy), and code style rules.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2158,2161],{"name":2159,"slug":2160,"type":13},"Best Practices","best-practices",{"name":2162,"slug":2163,"type":13},"Code Analysis","code-analysis","2026-07-14T05:25:56.18433",{"slug":2166,"name":2166,"fn":2167,"description":2168,"org":2169,"tags":2170,"stars":2112,"repoUrl":2113,"updatedAt":2178},"mcore-migrate-gpt-to-hybrid","migrate Megatron-LM models to HybridModel","Migration guide for moving Megatron Core GPTModel checkpoints, model providers, training commands, and layer mappings to HybridModel.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2171,2174,2177],{"name":2172,"slug":2173,"type":13},"Machine Learning","machine-learning",{"name":2175,"slug":2176,"type":13},"Migration","migration",{"name":9,"slug":8,"type":13},"2026-07-17T06:07:11.777011",{"slug":2180,"name":2180,"fn":2181,"description":2182,"org":2183,"tags":2184,"stars":2112,"repoUrl":2113,"updatedAt":2191},"mcore-onboard-gb200-1node-tests","onboard functional tests for GB200","Onboard 1-node GitHub MR functional tests for GB200 from existing mr-scoped 2-node tests.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2185,2188],{"name":2186,"slug":2187,"type":13},"QA","qa",{"name":2189,"slug":2190,"type":13},"Testing","testing","2026-07-14T05:25:53.673039",{"slug":2193,"name":2193,"fn":2194,"description":2195,"org":2196,"tags":2197,"stars":2112,"repoUrl":2113,"updatedAt":2202},"mcore-run-on-slurm","launch distributed training jobs on SLURM","How to launch distributed Megatron-LM training jobs on a SLURM cluster. Covers a minimal sbatch skeleton, environment-variable setup for torch.distributed.run, CUDA_DEVICE_MAX_CONNECTIONS rules across hardware and parallelism modes, container conventions, monitoring, and per-rank failure diagnosis.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2198,2199],{"name":2109,"slug":2110,"type":13},{"name":2200,"slug":2201,"type":13},"Infrastructure","infrastructure","2026-07-14T05:25:49.362534",{"slug":2204,"name":2204,"fn":2205,"description":2206,"org":2207,"tags":2208,"stars":2112,"repoUrl":2113,"updatedAt":2216},"mcore-split-pr","split pull requests to reduce review load","Split a PR into multiple PRs to reduce the number of required CODEOWNERS reviewer groups.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2209,2212,2213],{"name":2210,"slug":2211,"type":13},"Code Review","code-review",{"name":2135,"slug":2136,"type":13},{"name":2214,"slug":2215,"type":13},"Pull Requests","pull-requests","2026-07-14T05:26:01.226578",{"slug":2218,"name":2218,"fn":2219,"description":2220,"org":2221,"tags":2222,"stars":2112,"repoUrl":2113,"updatedAt":2225},"mcore-testing","run and manage Megatron-LM tests","Test system for Megatron-LM. Covers test layout, recipe YAML structure, adding and running unit and functional tests, golden values, marker filters, and CI parity.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2223,2224],{"name":2186,"slug":2187,"type":13},{"name":2189,"slug":2190,"type":13},"2026-07-14T05:25:54.928983",{"slug":2227,"name":2227,"fn":2228,"description":2229,"org":2230,"tags":2231,"stars":2112,"repoUrl":2113,"updatedAt":2234},"nightly-sync","manage nightly main-to-dev sync workflows","Domain knowledge for the nightly main-to-dev sync workflow. Covers merge strategy, CI architecture, failure investigation, and known issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":9},[2232,2233],{"name":2051,"slug":2052,"type":13},{"name":2122,"slug":2123,"type":13},"2026-07-30T05:29:03.275638",496]