{
  "cells": [
    {
      "cell_type": "markdown",
      "id": "title",
      "metadata": {},
      "source": "#### COMS 4281 — Intro to Quantum Computing\n# Programming Assignment 1\n### Fall 2026\n### Due: See the course website\n\nWe will turn ideas from class into circuits, test them in simulation, and run a few on a real quantum computer. There are four problems, worth 75 points total.\n\n**AI.** You may use AI, but please try each part yourself first. The point is to understand how the math becomes a program. You should understand the code and answers you submit.\n\n**Collaboration.** You may work with up to two classmates; but the hardware runs must be done on your own account. Write your own code and answers, and list your collaborators below.\n\n**Collaborators:**\n\n**How to work.** Replace each `raise NotImplementedError(...)` line with your code, and fill in the answer cells. Most answers need only 1–3 sentences. The plotting code is supplied. You can finish the simulation work while hardware jobs wait.\n\n**What to submit.** Save and submit this `.ipynb` file with your answers and outputs. The last code cell includes your saved hardware results. You are graded on your work and explanations; noisy hardware results are fine.\n"
    },
    {
      "cell_type": "markdown",
      "id": "setup",
      "metadata": {},
      "source": "# Setup\n\nOpen this notebook in the **Columbia CS** workspace in qBraid Lab. Use the Qiskit kernel from Assignment 0, or **Python 3** if that is the only option. Run cells with **Shift+Enter**.\n\nIf the notebook says `No module named 'matplotlib'`, remove the `#` from the first `%pip` line below and run the cell once. If Qiskit, Aer, or qBraid is missing, use the second line. After installing, restart the kernel and run from the top.\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "install",
      "metadata": {},
      "outputs": [],
      "source": "# If matplotlib is missing:\n# %pip install matplotlib\n\n# If Qiskit, Aer, or qBraid is missing:\n# %pip install \"qbraid[qiskit]==0.13.0\" \"qiskit>=2.5,<3\" \"qiskit-aer==0.17.2\" matplotlib\n"
    },
    {
      "cell_type": "markdown",
      "id": "gate-reference",
      "metadata": {},
      "source": [
        "### A few Qiskit commands\n",
        "\n",
        "Qubits start in $|0\\rangle$ and are numbered from 0. Gates run in the order you write them.\n",
        "\n",
        "| Command | What it does |\n",
        "|---|---|\n",
        "| `qc.x(0)`, `qc.h(0)`, `qc.z(0)` | Apply $X$, $H$, or $Z$ to qubit 0 |\n",
        "| `qc.cx(0, 1)` | CNOT: control 0, target 1 |\n",
        "| `qc.ccx(0, 1, 2)` | Toffoli: controls 0 and 1, target 2 |\n",
        "| `qc.compose(other, inplace=True)` | Append another circuit |\n",
        "| `other.inverse()` | Undo another circuit |\n",
        "| `qc.measure(0, 0)` | Measure qubit 0 into classical bit 0 |\n",
        "\n",
        "Here is a complete example. It prepares $|1\\rangle$ and measures it. Circuit functions in this assignment use the same pattern.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "worked-example",
      "metadata": {},
      "outputs": [],
      "source": [
        "from qiskit import QuantumCircuit\n",
        "\n",
        "# Prepare |1> and measure it as a small Qiskit example.\n",
        "def example():\n",
        "    qc = QuantumCircuit(1, 1)  # One qubit and one classical bit.\n",
        "    qc.x(0)\n",
        "    qc.measure(0, 0)\n",
        "    return qc\n",
        "\n",
        "print(example().draw(output=\"text\"))\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "helper-note",
      "metadata": {},
      "source": [
        "Run the next two supplied helper cells. You do not need to read or edit their code.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "core-helpers",
      "metadata": {
        "collapsed": true,
        "jupyter": {
          "outputs_hidden": true,
          "source_hidden": true
        },
        "tags": [
          "supplied-helper",
          "hide-input"
        ]
      },
      "outputs": [],
      "source": "import json\nimport hashlib\nfrom collections import deque\nfrom datetime import datetime, timezone\nfrom pathlib import Path\nfrom importlib.metadata import version\n\nimport numpy as np\nimport matplotlib.pyplot as plt\nfrom IPython.display import display, JSON\n\nfrom qiskit import QuantumCircuit, transpile, qasm2\nfrom qiskit.quantum_info import Statevector\nfrom qiskit_aer import AerSimulator\nfrom qiskit_aer.noise import NoiseModel, depolarizing_error, ReadoutError\n\nSEED = 4281\nSIM_SHOTS = 4096\nHW_SHOTS = 256\nANGLE_POINTS = 10\nRB_SHOTS = HW_SHOTS\nRB_LENGTHS = list(range(10, 101, 10))\n\n# These are illustrative noise parameters, not a calibration of the device.\nONE_QUBIT_NOISE = 0.003\nTWO_QUBIT_NOISE = 0.02\nREADOUT_NOISE = 0.02\n\n# Return measurement bits in qubit order, starting with qubit 0.\ndef bits(key, width):\n    \"\"\"Return [c0, c1, ...], although the displayed string is ...c1c0.\"\"\"\n    if isinstance(key, (int, np.integer)):\n        text = format(int(key), f\"0{width}b\")\n    else:\n        text = str(key).replace(\" \", \"\")\n        if text.startswith(\"0x\"):\n            text = format(int(text, 16), f\"0{width}b\")\n        text = text.zfill(width)\n    if len(text) != width or set(text) - {\"0\", \"1\"}:\n        raise ValueError(f\"Expected a {width}-bit outcome, got {key!r}.\")\n    return [int(c) for c in text[::-1]]\n\n# Format measurement outcomes as bit strings of the expected length.\ndef clean_counts(raw, width):\n    if not isinstance(raw, dict):\n        raise TypeError(\"Expected one dictionary of counts, not a batch result.\")\n    out = {}\n    for key, count in raw.items():\n        if int(count) != count or count < 0:\n            raise ValueError(\"Counts must be nonnegative integers.\")\n        text = \"\".join(str(b) for b in bits(key, width)[::-1])\n        out[text] = out.get(text, 0) + int(count)\n    if sum(out.values()) == 0:\n        raise ValueError(\"No measurement shots were returned.\")\n    return out\n\n# Find the fraction of shots that satisfy the given condition.\ndef event_probability(counts, predicate, width):\n    total = sum(counts.values())\n    if total <= 0:\n        raise ValueError(\"Cannot compute a probability from empty counts.\")\n    return sum(n for key, n in counts.items() if predicate(bits(key, width))) / total\n\n# Estimate sampling uncertainty for a measured probability.\ndef wilson_interval(p, shots, z=1.96):\n    \"\"\"An approximate 95% binomial interval; it works at p=0 and p=1 too.\"\"\"\n    denom = 1 + z*z/shots\n    middle = (p + z*z/(2*shots)) / denom\n    half = z*np.sqrt(p*(1-p)/shots + z*z/(4*shots*shots)) / denom\n    return max(0.0, middle-half), min(1.0, middle+half)\n\n# Build the simple noise model used in the simulator.\ndef make_noise(p1=ONE_QUBIT_NOISE, p2=TWO_QUBIT_NOISE, pm=READOUT_NOISE):\n    if not all(0 <= p <= 1 for p in (p1, p2, pm)):\n        raise ValueError(\"Noise parameters must be between 0 and 1.\")\n    model = NoiseModel()\n    if p1:\n        model.add_all_qubit_quantum_error(depolarizing_error(p1, 1), [\"u\"])\n    if p2:\n        model.add_all_qubit_quantum_error(depolarizing_error(p2, 2), [\"cx\"])\n    if pm:\n        model.add_all_qubit_readout_error(ReadoutError([[1-pm, pm], [pm, 1-pm]]))\n    return model\n\n# Run the named circuits in the local simulator and collect their counts.\ndef simulate(circuits, shots=SIM_SHOTS, noise=None, seed=SEED):\n    \"\"\"Run a named collection of circuits locally. This never uses qBraid credits.\"\"\"\n    if not circuits:\n        return {}\n    simulator = AerSimulator(noise_model=noise)\n    names = list(circuits)\n    compiled = transpile(list(circuits.values()), basis_gates=[\"u\", \"cx\"],\n                         optimization_level=0, seed_transpiler=SEED)\n    result = simulator.run(compiled, shots=shots, seed_simulator=seed).result()\n    if not result.success:\n        raise RuntimeError(\"The local simulation did not finish successfully.\")\n    return {name: clean_counts(result.get_counts(i), circuits[name].num_clbits)\n            for i, name in enumerate(names)}\n\n# Compute an outcome probability from the state vector before sampling.\ndef exact_probability(circuit, predicate, measured_qubits):\n    \"\"\"Exact probability before the final measurements; no sampling.\"\"\"\n    state = Statevector.from_instruction(circuit.remove_final_measurements(inplace=False))\n    probabilities = state.probabilities(qargs=list(measured_qubits))\n    width = len(measured_qubits)\n    return float(sum(p for i, p in enumerate(probabilities)\n                     if predicate(bits(i, width))))\n\n# Plot and print the probabilities and their sampling uncertainty.\ndef compare_probabilities(names, datasets, predicate, width, title, ylabel):\n    \"\"\"Plot and print the results that are available.\"\"\"\n    rows = []\n    fig, ax = plt.subplots(figsize=(9, 4))\n    for source_index, (source, results) in enumerate(datasets.items()):\n        x, y, lower, upper = [], [], [], []\n        offset = (source_index - (len(datasets)-1)/2) * 0.15\n        for i, name in enumerate(names):\n            if name not in results:\n                continue\n            counts = results[name]\n            p = event_probability(counts, predicate, width)\n            shots = sum(counts.values())\n            lo, hi = wilson_interval(p, shots)\n            rows.append({\"circuit\": name, \"source\": source, \"probability\": p,\n                         \"shots\": shots, \"95% low\": lo, \"95% high\": hi})\n            x.append(i+offset); y.append(p)\n            lower.append(max(0, p-lo)); upper.append(max(0, hi-p))\n        if x:\n            ax.errorbar(x, y, yerr=[lower, upper], fmt=\"o\", capsize=3, label=source)\n    ax.set_xticks(range(len(names)), names, rotation=40, ha=\"right\")\n    ax.set_ylim(-0.04, 1.04)\n    ax.set_title(title); ax.set_ylabel(ylabel)\n    if rows:\n        ax.legend()\n    fig.tight_layout(); plt.show()\n    for row in rows:\n        print(f\"{row['source']}, {row['circuit']}: {row['probability']:.1%} \"\n              f\"({row['shots']} shots, 95% interval {row['95% low']:.1%}–{row['95% high']:.1%})\")\n\nprint(\"Simulation helpers ready.\")\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "hardware-helpers",
      "metadata": {
        "tags": [
          "supplied-helper",
          "hide-input"
        ]
      },
      "outputs": [],
      "source": [
        "# Supplied helpers. Choose a machine and spending limits in the settings cell.\n",
        "DEVICE_IDS = {\n",
        "    \"Rigetti\": \"rigetti:rigetti:qpu:cepheus-1-108q\",\n",
        "    \"IQM\": \"aws:iqm:qpu:garnet\",\n",
        "    \"IonQ\": \"aws:ionq:qpu:forte-enterprise-1\",\n",
        "}\n",
        "RESULTS_DIR = Path(\"coms4281_pa1_results\")\n",
        "_provider = None\n",
        "_device = None\n",
        "RETRYABLE_STATUSES = (\"FAILED\", \"CANCELLED\")\n",
        "\n",
        "# Read the saved job IDs and results from the results folder.\n",
        "def load_manifest():\n",
        "    path = RESULTS_DIR / \"manifest.json\"\n",
        "    return json.loads(path.read_text()) if path.exists() else {}\n",
        "\n",
        "# Save the job record after a submission or a results update.\n",
        "def save_manifest(manifest):\n",
        "    RESULTS_DIR.mkdir(exist_ok=True)\n",
        "    temporary = RESULTS_DIR / \"manifest.tmp\"\n",
        "    temporary.write_text(json.dumps(manifest, indent=2, sort_keys=True))\n",
        "    temporary.replace(RESULTS_DIR / \"manifest.json\")\n",
        "\n",
        "# Connect to the machine chosen in the settings cell.\n",
        "def connect_hardware(api_key=None):\n",
        "    global _provider, _device\n",
        "    if not ENABLE_HARDWARE:\n",
        "        raise RuntimeError(\"Set ENABLE_HARDWARE = True when you are ready.\")\n",
        "    from qbraid.runtime import QbraidProvider\n",
        "    if _provider is None or api_key is not None:\n",
        "        _provider = QbraidProvider(api_key=api_key) if api_key else QbraidProvider()\n",
        "        _device = None\n",
        "    if _device is None or _device.id != DEVICE_ID:\n",
        "        _device = _provider.get_device(DEVICE_ID)\n",
        "    return _device\n",
        "\n",
        "# Show the selected machine, credit balance, and estimated costs.\n",
        "def show_hardware_info():\n",
        "    device = connect_hardware()\n",
        "    balance = float(_provider.client.get_credits_balance()[\"qbraidCredits\"])\n",
        "    print(\"Device:\", DEVICE_ID, \"—\", device.status().name)\n",
        "    print(f\"Available qBraid credits: {balance:.1f}\")\n",
        "    if MACHINE in (\"IQM\", \"IonQ\"):\n",
        "        print(f\"{MACHINE} can cost much more than Rigetti. Use it at your own risk.\")\n",
        "    jobs = 1 + 2 * ANGLE_POINTS + 3  # Warm-up, phase sweep in two bases, and Problem 4.\n",
        "    if DEVICE_ID == DEVICE_IDS[\"Rigetti\"]:\n",
        "        jobs += len(RB_LENGTHS)\n",
        "    quote = _provider.client.estimate_cost(DEVICE_ID, shots=HW_SHOTS)\n",
        "    if not quote.pricingAvailable:\n",
        "        print(\"No estimate is available. Ask a TA before submitting.\")\n",
        "        return\n",
        "    per_job = float(quote.estimatedCost)\n",
        "    if not np.isfinite(per_job) or per_job < 0:\n",
        "        raise ValueError(\"Invalid cost estimate. Ask a TA before submitting.\")\n",
        "    estimated_total = jobs * per_job\n",
        "    print(f\"Estimated cost of one {HW_SHOTS:,}-shot job: {per_job:.1f} credits.\")\n",
        "    print(f\"Rough estimate for all {jobs} circuits: {estimated_total:.1f} credits, before reuse.\")\n",
        "    print(\"Final charges can differ. Check each batch before submitting.\")\n",
        "    if estimated_total > balance or estimated_total > MAX_CREDITS_TOTAL:\n",
        "        print(\"The full set of jobs may exceed your balance or cap. Compare cheaper options before your first job.\")\n",
        "\n",
        "# Prepare each circuit and give it a key so saved results can be reused.\n",
        "def hardware_plan(circuits, shots, preserve_gates=False):\n",
        "    plan = []\n",
        "    for name, circuit in circuits.items():\n",
        "        program = circuit\n",
        "        runtime_options = {}\n",
        "        program_text = qasm2.dumps(circuit)\n",
        "        if preserve_gates:\n",
        "            program, runtime_options = benchmark_hardware_program(circuit, DEVICE_ID)\n",
        "            program_text = program\n",
        "        identity = {\"program\": program_text, \"device\": DEVICE_ID, \"shots\": shots}\n",
        "        if preserve_gates:\n",
        "            identity.update(preserve_gates=True, runtime_options=runtime_options)\n",
        "        key = hashlib.sha256(json.dumps(identity, sort_keys=True).encode()).hexdigest()[:24]\n",
        "        plan.append({\"name\": name, \"key\": key, \"circuit\": program,\n",
        "                     \"runtime_options\": runtime_options,\n",
        "                     \"shots\": shots, \"width\": circuit.num_clbits})\n",
        "    return plan\n",
        "\n",
        "# Preview or submit new jobs, or explicitly retry failed or cancelled jobs.\n",
        "def submit_hardware(label, circuits, submit=False, shots=HW_SHOTS, preserve_gates=False,\n",
        "                    retry_failed=False):\n",
        "    \"\"\"Preview or submit jobs within the student's spending caps.\"\"\"\n",
        "    if preserve_gates and DEVICE_ID != DEVICE_IDS[\"Rigetti\"]:\n",
        "        print(\"Problem 2 uses simulation on this route. No jobs submitted.\")\n",
        "        return\n",
        "    plan = hardware_plan(circuits, shots, preserve_gates=preserve_gates)\n",
        "    manifest = load_manifest()\n",
        "    unique = {entry[\"key\"]: entry for entry in plan}\n",
        "    if any(key in manifest and not manifest[key].get(\"job_id\") for key in unique):\n",
        "        raise RuntimeError(\"An earlier submission needs recovery. Ask a TA to check Quantum Jobs.\")\n",
        "    failed = [entry for key, entry in unique.items()\n",
        "              if key in manifest and manifest[key].get(\"status\") in RETRYABLE_STATUSES\n",
        "              and \"counts\" not in manifest[key]]\n",
        "    if retry_failed:\n",
        "        pending = failed\n",
        "    else:\n",
        "        pending = [entry for key, entry in unique.items() if key not in manifest]\n",
        "    if not pending:\n",
        "        if retry_failed:\n",
        "            print(f\"No failed or cancelled jobs to retry on {MACHINE}. Run the results cell to refresh statuses.\")\n",
        "            print(\"For a first run on this machine, use retry_failed=False.\")\n",
        "        else:\n",
        "            print(f\"Jobs already recorded on {MACHINE}. Run the results cell for their status.\")\n",
        "            if failed:\n",
        "                print(\"To preview a retry, use submit=False, retry_failed=True.\")\n",
        "        return\n",
        "    if not submit:\n",
        "        action = \"retry\" if retry_failed else \"submit\"\n",
        "        print(f\"{label} preview: would {action} {len(pending)} job(s) at {shots} shots each.\")\n",
        "    if not ENABLE_HARDWARE:\n",
        "        print(\"Hardware is off. To see prices, set ENABLE_HARDWARE = True in Settings and rerun Settings.\")\n",
        "        return\n",
        "    device = connect_hardware()\n",
        "    device_info = _provider.client.get_device(device.id)\n",
        "    status = device_info.status.name\n",
        "    print(\"Device:\", DEVICE_ID, \"—\", status)\n",
        "    if status != \"ONLINE\":\n",
        "        if device_info.nextAvailable is not None:\n",
        "            next_available = device_info.nextAvailable.strftime(\"%Y-%m-%d %H:%M %Z\")\n",
        "            print(f\"Next availability listed by qBraid: {next_available.strip()}.\")\n",
        "        if submit:\n",
        "            raise RuntimeError(\"The device is not online. Keep working in simulation and preview again later.\")\n",
        "        print(\"Keep working in simulation. Rerun this preview later to check the device again.\")\n",
        "    balance = float(_provider.client.get_credits_balance()[\"qbraidCredits\"])\n",
        "    quote = _provider.client.estimate_cost(DEVICE_ID, shots=shots)\n",
        "    if not quote.pricingAvailable:\n",
        "        if not submit:\n",
        "            print(\"No cost estimate is available. Ask a TA before submitting.\")\n",
        "            return\n",
        "        raise RuntimeError(\"No cost estimate is available. Ask a TA before submitting.\")\n",
        "    per_job = float(quote.estimatedCost)\n",
        "    if not np.isfinite(per_job) or per_job < 0:\n",
        "        raise RuntimeError(\"The cost estimate is invalid. Ask a TA.\")\n",
        "    estimate = per_job * len(pending)\n",
        "    reserved = sum(float(r.get(\"actual_credits\", r.get(\"estimated_credits\", 0)))\n",
        "                   for r in manifest.values())\n",
        "    print(f\"Estimated cost: {estimate:.1f} credits. Available: {balance:.1f}.\")\n",
        "    print(f\"Recorded use/reservations across all machines: {reserved:.1f} credits.\")\n",
        "    if not all(np.isfinite(value) and value > 0\n",
        "               for value in (MAX_CREDITS_PER_JOB, MAX_CREDITS_TOTAL)):\n",
        "        raise ValueError(\"Set positive, finite spending caps within your credit allowance.\")\n",
        "    over_cap = per_job > MAX_CREDITS_PER_JOB or reserved + estimate > MAX_CREDITS_TOTAL\n",
        "    if not submit:\n",
        "        if over_cap or estimate > balance:\n",
        "            print(\"This batch exceeds your spending limit or balance. Review your choice before submitting.\")\n",
        "        elif status == \"ONLINE\":\n",
        "            print(\"Preview only. To submit, set submit=True, run once, then set it back to False.\")\n",
        "        return\n",
        "    if over_cap or estimate > balance:\n",
        "        raise RuntimeError(\"This batch exceeds your spending limit or balance. Choose a cheaper machine or review your caps and allowance.\")\n",
        "    if retry_failed:\n",
        "        from qbraid.runtime import QbraidJob\n",
        "        for entry in pending:\n",
        "            job_id = manifest[entry[\"key\"]][\"job_id\"]\n",
        "            status = QbraidJob(job_id, client=_provider.client).status().name\n",
        "            if status not in RETRYABLE_STATUSES:\n",
        "                print(f\"Job {job_id} is {status}. Run the results cell before trying again.\")\n",
        "                return\n",
        "    for entry in pending:\n",
        "        if retry_failed:\n",
        "            previous = manifest[entry[\"key\"]]\n",
        "            # Keep the old job ID and its cost estimate in the spending record.\n",
        "            manifest[f\"{entry['key']}:{previous['job_id']}\"] = previous\n",
        "        record = {k:v for k,v in entry.items() if k != \"circuit\"}\n",
        "        record.update(device=DEVICE_ID, part=label, job_id=None, status=\"SUBMITTING\",\n",
        "                      estimated_credits=per_job)\n",
        "        manifest[entry[\"key\"]] = record\n",
        "        save_manifest(manifest)  # An uncertain request is never retried automatically.\n",
        "        try:\n",
        "            options = {}\n",
        "            if entry[\"runtime_options\"]:\n",
        "                options[\"runtime_options\"] = entry[\"runtime_options\"]\n",
        "            job = device.run(entry[\"circuit\"], shots=shots,\n",
        "                             name=f\"COMS4281-PA1-{label}-{entry['name']}\", **options)\n",
        "        except Exception:\n",
        "            record[\"status\"] = \"CHECK_QUANTUM_JOBS\"\n",
        "            save_manifest(manifest)\n",
        "            raise\n",
        "        record.update(job_id=job.id, status=\"SUBMITTED\")\n",
        "        save_manifest(manifest)\n",
        "        print(entry[\"name\"], \"->\", job.id)\n",
        "\n",
        "# Check saved jobs and gather their completed measurement counts.\n",
        "def collect_hardware(circuits, shots=HW_SHOTS, preserve_gates=False):\n",
        "    \"\"\"Read saved results and check pending jobs. Never submits a job.\"\"\"\n",
        "    if preserve_gates and DEVICE_ID != DEVICE_IDS[\"Rigetti\"]:\n",
        "        print(\"Use the simulation plot from part (b) for Problem 2.\")\n",
        "        return {}\n",
        "    manifest = load_manifest()\n",
        "    out = {}\n",
        "    jobs = {}\n",
        "    plan = hardware_plan(circuits, shots, preserve_gates=preserve_gates)\n",
        "    for entry in plan:\n",
        "        record = manifest.get(entry[\"key\"])\n",
        "        if record is None:\n",
        "            continue\n",
        "        if \"counts\" not in record and ENABLE_HARDWARE and record.get(\"job_id\"):\n",
        "            connect_hardware()\n",
        "            from qbraid.runtime import QbraidJob\n",
        "            if record[\"job_id\"] not in jobs:\n",
        "                job = QbraidJob(record[\"job_id\"], client=_provider.client)\n",
        "                status = job.status().name\n",
        "                record[\"status\"] = status\n",
        "                print(f\"{entry['name']}: {status} (job ID: {job.id})\")\n",
        "                if status == \"COMPLETED\":\n",
        "                    result = job.result()\n",
        "                    if not result.success:\n",
        "                        raise RuntimeError(f\"Job {job.id} failed. Ask a TA.\")\n",
        "                    # qBraid's SDK already puts classical bit 0 on the right.\n",
        "                    counts = clean_counts(result.data.get_counts(), entry[\"width\"])\n",
        "                    if sum(counts.values()) != shots:\n",
        "                        raise RuntimeError(\"Unexpected shot count. Ask a TA to check this job.\")\n",
        "                    record.update(counts=counts, counts_bit_order=\"sdk\", source=\"real hardware\")\n",
        "                    charged = (getattr(result, \"details\", None) or {}).get(\"cost\")\n",
        "                    if charged is not None:\n",
        "                        charged = float(charged)\n",
        "                        if np.isfinite(charged) and charged >= 0:\n",
        "                            record[\"actual_credits\"] = charged\n",
        "                jobs[record[\"job_id\"]] = dict(record)\n",
        "            else:\n",
        "                record.update(jobs[record[\"job_id\"]])\n",
        "            save_manifest(manifest)\n",
        "        if \"counts\" in record:\n",
        "            if record.get(\"counts_bit_order\") != \"sdk\":\n",
        "                counts = clean_counts(record[\"counts\"], entry[\"width\"])\n",
        "                # The earlier notebook marked its reversed Rigetti counts \"qiskit\".\n",
        "                if (record.get(\"counts_bit_order\") == \"qiskit\"\n",
        "                        and record[\"device\"] == DEVICE_IDS[\"Rigetti\"]):\n",
        "                    counts = {outcome[::-1]: count for outcome, count in counts.items()}\n",
        "                record.update(counts=counts, counts_bit_order=\"sdk\")\n",
        "                save_manifest(manifest)\n",
        "            out[entry[\"name\"]] = record[\"counts\"]\n",
        "    print(f\"Hardware results: {len(out)}/{len(circuits)} complete.\")\n",
        "    if len(out) == len(circuits):\n",
        "        print(\"All results are ready.\")\n",
        "    elif ENABLE_HARDWARE:\n",
        "        print(\"You can continue with simulation. Rerun this results cell later; it spends no credits.\")\n",
        "        failed = [entry[\"name\"] for entry in plan\n",
        "                  if manifest.get(entry[\"key\"], {}).get(\"status\") in RETRYABLE_STATUSES]\n",
        "        if failed:\n",
        "            print(\"Failed or cancelled:\", \", \".join(failed))\n",
        "            print(\"Check the job in Quantum Jobs. To preview a retry, use submit=False, retry_failed=True.\")\n",
        "        uncertain = [entry[\"name\"] for entry in plan\n",
        "                     if entry[\"key\"] in manifest and not manifest[entry[\"key\"]].get(\"job_id\")]\n",
        "        if uncertain:\n",
        "            print(\"Ask a TA to check Quantum Jobs before trying again:\", \", \".join(uncertain))\n",
        "    else:\n",
        "        print(\"Hardware is off; saved results, if any, are shown.\")\n",
        "    return out\n",
        "\n",
        "print(\"Hardware helpers ready. No jobs submitted.\")\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "bit-order",
      "metadata": {},
      "source": [
        "### Reading the results\n",
        "\n",
        "Qiskit (somewhat annoyingly) puts bit 0 on the **right**: `\"001\"` means qubit 0 is 1 and qubits 1 and 2 are 0. The notebook displays hardware results in this same order. Our `bits` helper returns the bits in qubit order.\n",
        "\n",
        "For the three-bit functions below, **`[x0, x1, b] = [q0, q1, q2]`**. Qubit 3 is the oracle target: it changes from $t$ to $t\\oplus f(x)$. Other qubits are scratch space.\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "hardware-note",
      "metadata": {},
      "source": [
        "### Running hardware jobs\n",
        "\n",
        "**We strongly recommend Rigetti. IQM and IonQ can cost much more in qBraid credits and may use up your allowance. Use either at your own risk. You are responsible for the credits you spend.**\n",
        "\n",
        "Choose `\"Rigetti\"`, `\"IQM\"`, or `\"IonQ\"` in the next cell. Leave `ENABLE_HARDWARE = False` while you work in simulation.\n",
        "\n",
        "[Check the device catalog](https://account.qbraid.com/devices) and preview each batch with `submit=False` before spending credits. Compare the total with your balance and budget for the whole assignment. The spending caps use estimates. Final charges can differ. More shots, extra runs, and switching machines use more credits. If you can't finish a hardware run, keep the simulation output and say what's missing and why. Use the data you have to answer the questions. You won't be penalized for missing hardware results.\n",
        "\n",
        "Each hardware part has two cells:\n",
        "\n",
        "1. **Submit:** run with `submit=False` to see the cost. When you are ready to spend the credits, set `submit=True` and run the cell once. When the job IDs appear, change it back to `False`.\n",
        "2. **Results:** rerun this cell until it says all results are ready. It does not spend credits.\n",
        "\n",
        "The helpers save job IDs and reuse runs on the same machine. Keep the `coms4281_pa1_results` folder. If you switch machines, rerun Settings and preview the cost on the new machine.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "hardware-settings",
      "metadata": {},
      "outputs": [],
      "source": [
        "# Hardware settings\n",
        "MACHINE = \"Rigetti\"  # Choose \"Rigetti\", \"IQM\", or \"IonQ\".\n",
        "if MACHINE not in DEVICE_IDS:\n",
        "    raise ValueError('Choose \"Rigetti\", \"IQM\", or \"IonQ\" for MACHINE.')\n",
        "DEVICE_ID = DEVICE_IDS[MACHINE]\n",
        "ENABLE_HARDWARE = False  # Change to True to check prices or run hardware jobs.\n",
        "\n",
        "# Spending caps, in credits. Check your balance and prices before changing these.\n",
        "MAX_CREDITS_PER_JOB = 50.0  # Most you allow for one job's estimate.\n",
        "MAX_CREDITS_TOTAL = 600.0   # Most you allow for this notebook across all machines.\n",
        "\n",
        "# If Assignment 0 needed an API key, uncomment these two lines after enabling hardware:\n",
        "# from getpass import getpass\n",
        "# connect_hardware(api_key=getpass(\"Course qBraid API key: \"))\n",
        "\n",
        "if ENABLE_HARDWARE:\n",
        "    show_hardware_info()\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "job-tips",
      "metadata": {},
      "source": [
        "### Checking and cancelling jobs\n",
        "\n",
        "- In the **Columbia CS** workspace, open [Quantum Jobs](https://account.qbraid.com/quantum-jobs). Choose **All Jobs**, refresh, and find your job by its printed ID or `COMS4281-PA1` name.\n",
        "- `QUEUED` means waiting; `RUNNING` means executing; `COMPLETED` means results are ready. The notebook's results cells also print the current status.\n",
        "- To cancel, open the job, choose **Cancel job**, and confirm. Then check for `CANCELLED`. Cancel early: a job already running may finish and still use credits.\n",
        "- Stopping a notebook cell or closing Lab does **not** cancel a submitted job. Before submitting again, check whether the first job is still queued or running.\n",
        "\n",
        "**If a job failed or was cancelled:** Run the results cell and look up the printed job ID in Quantum Jobs. Check the reason if one is shown. If you're ready to try again on the same machine, set `retry_failed=True` and `submit=False` in the submit cell and run it to see the price. Set `submit=True` and run once if the retry fits your budget. Then set both flags back to `False`.\n",
        "\n",
        "The retry only selects jobs that the results cell found failed or cancelled. It can cost credits, and the old job record stays in your results folder. If qBraid gives no job ID or you are unsure why a job failed, ask a TA. See [qBraid's job guide](https://docs.qbraid.com/v2/account/quantum-jobs) for help finding jobs.\n",
        "\n",
        "**Coming back after a kernel restart?** Open the same notebook in the same folder and use the same machine. Rerun setup and your completed circuit cells in order, leaving every `submit=False`. Enable hardware in Settings to refresh pending jobs. Rerun the results cells and the plots or fit that use those results.\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "warmup-note",
      "metadata": {},
      "source": "### Your first hardware job\n\n1. Run the simulator cell below. You should see `001`.\n2. Set `ENABLE_HARDWARE = True` in the **Settings** cell above and rerun Settings. Then run the warm-up submit cell below with `submit=False` to see the device status and price.\n3. If the device is `ONLINE` and the price fits your budget, set `submit=True` and run that cell once. When the job ID appears, set it back to `False`.\n4. Rerun only the results cell to check the job. Checking is free. Before running a larger batch, check that `001` is the most common result. If the machine is unavailable, continue in simulation and try the preview again later.\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "warmup-simulation",
      "metadata": {},
      "outputs": [],
      "source": [
        "warmup = QuantumCircuit(3, 3)\n",
        "warmup.x(0)\n",
        "warmup.measure([0, 1, 2], [0, 1, 2])\n",
        "warmup_circuits = {\"bit_order\": warmup}\n",
        "warmup_sim = simulate(warmup_circuits, shots=256)\n",
        "print(warmup_sim)\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p0-submit",
      "metadata": {},
      "outputs": [],
      "source": [
        "submit_hardware(\"Check\", warmup_circuits, submit=False, retry_failed=False)\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p0-results",
      "metadata": {},
      "outputs": [],
      "source": [
        "p0_hardware = collect_hardware(warmup_circuits)\n",
        "if \"bit_order\" in p0_hardware:\n",
        "    print(p0_hardware[\"bit_order\"])\n",
        "    if max(p0_hardware[\"bit_order\"], key=p0_hardware[\"bit_order\"].get) != \"001\":\n",
        "        print(\"Ask a TA to check the bit order before continuing on hardware.\")\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p1-intro",
      "metadata": {},
      "source": [
        "# Problem 1: Preparing and measuring qubits (15 points)\n",
        "\n",
        "Write your code between `### YOUR CODE BEGINS ###` and `### YOUR CODE ENDS ###`. Replace the `raise NotImplementedError(...)` line in each block.\n",
        "\n",
        "**a) (3 points)** Fill in the two functions below. `prepare_state` takes `\"0\"`, `\"1\"`, `\"+\"`, or `\"-\"`. It prepares the matching state without measuring. `measure_in_basis` takes the prepared circuit and either `\"Z\"` (the standard basis) or `\"X\"` (the Hadamard basis). In the $X$ basis, outcome 0 means $|+\\rangle$ and outcome 1 means $|-\\rangle$."
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p1-prepare",
      "metadata": {
        "tags": [
          "student-code"
        ]
      },
      "outputs": [],
      "source": [
        "# Build a circuit that prepares the requested qubit state.\n",
        "def prepare_state(label):\n",
        "    qc = QuantumCircuit(1, 1)\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Prepare the requested state.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "    return qc\n",
        "\n",
        "# Copy a prepared circuit and add the measurement for the chosen basis.\n",
        "def measure_in_basis(qc, basis):\n",
        "    qc = qc.copy()\n",
        "    if basis not in (\"Z\", \"X\"):\n",
        "        raise ValueError(\"basis must be Z or X\")\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Add a change of basis when needed.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "    qc.measure(0, 0)\n",
        "    return qc"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p1-state-plot-note",
      "metadata": {},
      "source": [
        "Run the next cell to plot the counts for 0 and 1 for each state in both bases. This uses the simulator and costs zero hardware credits.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p1-state-tests",
      "metadata": {},
      "outputs": [],
      "source": [
        "from qiskit.visualization import plot_histogram\n",
        "\n",
        "# Build one circuit for each state and measurement basis.\n",
        "state_circuits = {}\n",
        "for state in (\"0\", \"1\", \"+\", \"-\"):\n",
        "    for basis in (\"Z\", \"X\"):\n",
        "        circuit = prepare_state(state)\n",
        "        title = f\"|{state}⟩ measured in the {basis} basis\"\n",
        "        state_circuits[title] = measure_in_basis(circuit, basis)\n",
        "\n",
        "state_results = simulate(state_circuits)\n",
        "\n",
        "# Plot the measured counts for each circuit.\n",
        "for title, counts in state_results.items():\n",
        "    display(plot_histogram(counts, title=title, figsize=(4, 2.5)))\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p1b",
      "metadata": {},
      "source": [
        "**b) (4 points)** Recall that\n",
        "$$R_y(\\theta)=\\begin{pmatrix}\n",
        "\\cos(\\theta/2)&-\\sin(\\theta/2)\\\\\n",
        "\\sin(\\theta/2)&\\cos(\\theta/2)\n",
        "\\end{pmatrix}.$$\n",
        "\n",
        "Fill in `rotated_qubit` using `qc.ry(theta, 0)`. The circuit starts in $|0\\rangle$ and measures in the Z basis after the rotation.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p1-rotation",
      "metadata": {
        "tags": [
          "student-code"
        ]
      },
      "outputs": [],
      "source": [
        "# Build a circuit that rotates a qubit and measures it.\n",
        "def rotated_qubit(theta):\n",
        "    qc = QuantumCircuit(1, 1)\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Apply the rotation.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "    qc.measure(0, 0)\n",
        "    return qc\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p1-rotation-plot-note",
      "metadata": {},
      "source": [
        "Run the next cell to plot the simulated counts for 0 and 1 at ten evenly spaced angles from $0$ to $\\pi$. How do the counts change as the angle increases?\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p1-rotation-plot",
      "metadata": {},
      "outputs": [],
      "source": "# Draw one pair of measurement count bars at each angle.\ndef plot_angle_counts(ax, angles, results):\n    counts_0 = []\n    counts_1 = []\n    for angle in angles:\n        counts = results[angle]\n        counts_0.append(counts.get(\"0\", 0))\n        counts_1.append(counts.get(\"1\", 0))\n\n    width = (angles[1] - angles[0]) / 3\n    ax.bar(angles - width / 2, counts_0, width, label=\"0\")\n    ax.bar(angles + width / 2, counts_1, width, label=\"1\")\n    ax.set_xticks(angles, [f\"{angle:.2f}\" for angle in angles])\n    ax.set_ylabel(\"Count\")\n    ax.legend(title=\"Measured bit\", loc=\"upper center\", ncol=2)\n\n# Simulate the rotation at ten evenly spaced angles from 0 to π.\nsweep_angles = np.linspace(0, np.pi, ANGLE_POINTS)\nrotation_circuits = {}\nfor theta in sweep_angles:\n    rotation_circuits[theta] = rotated_qubit(theta)\nrotation_sim = simulate(rotation_circuits)\n\nfig, ax = plt.subplots(figsize=(8, 3.5))\nplot_angle_counts(ax, sweep_angles, rotation_sim)\nax.set_xlabel(\"Rotation angle θ (radians)\")\nax.set_title(\"Measuring after a rotation\")\nfig.tight_layout()\nplt.show()\n"
    },
    {
      "cell_type": "markdown",
      "id": "p1b-answer",
      "metadata": {},
      "source": [
        "### Your solution\n",
        "\n",
        "_Write your answer here._\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p1c",
      "metadata": {},
      "source": [
        "**c) (4 points)** Prepare\n",
        "$$|\\psi_\\phi\\rangle=\\frac{|0\\rangle+e^{i\\phi}|1\\rangle}{\\sqrt2}.$$\n",
        "Use $H$, then `qc.p(phi, 0)`, which applies $\\begin{pmatrix}1 & 0 \\\\ 0 & e^{i\\phi}\\end{pmatrix}$.\n",
        "\n",
        "Fill in `phase_qubit`. It uses your `measure_in_basis` function from part (a).\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p1-phase",
      "metadata": {
        "tags": [
          "student-code"
        ]
      },
      "outputs": [],
      "source": [
        "# Prepare the phase state and measure it in the chosen basis.\n",
        "def phase_qubit(phi, basis):\n",
        "    qc = QuantumCircuit(1, 1)\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Prepare the phase state, without measuring yet.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "    return measure_in_basis(qc, basis)\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p1-phase-plot-note",
      "metadata": {},
      "source": [
        "Run the next cell to plot the same ten angles for the phase $\\phi$, with one panel for each basis. Which basis shows a clear change as you vary $\\phi$?\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p1-phase-plot",
      "metadata": {},
      "outputs": [],
      "source": "# Simulate the phase sweep in each basis and use the same scale in both plots.\nphase_circuits_by_basis = {}\nfig, axes = plt.subplots(2, 1, figsize=(8, 6), sharex=True, sharey=True)\nfor basis, ax in zip((\"Z\", \"X\"), axes):\n    phase_circuits = {}\n    for phi in sweep_angles:\n        phase_circuits[phi] = phase_qubit(phi, basis)\n    phase_circuits_by_basis[basis] = phase_circuits\n    phase_sim = simulate(phase_circuits)\n    plot_angle_counts(ax, sweep_angles, phase_sim)\n    ax.set_title(f\"Measuring in the {basis} basis\")\n\naxes[1].set_xlabel(\"Phase angle φ (radians)\")\nfig.tight_layout()\nplt.show()\n"
    },
    {
      "cell_type": "markdown",
      "id": "p1c-answer",
      "metadata": {},
      "source": [
        "### Your solution\n",
        "\n",
        "_Write your answer here._\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p1d",
      "metadata": {},
      "source": "**d) (4 points)** Repeat the phase sweep from part (c) on hardware. Use the same ten angles in each basis, for 20 circuits. For this comparison, use 256 shots per circuit in both simulation and hardware.\n\nLook at the plots of the fraction of `1` outcomes. How does changing $\\phi$ affect the two bases? If you have hardware results, do they follow the same trends as the simulator? Save your plots and note any missing hardware runs.\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p1-batch",
      "metadata": {},
      "outputs": [],
      "source": "# Reuse the same phase circuits from part (c).\np1_circuits = {}\np1_labels = {\"Z\": [], \"X\": []}\nfor basis in (\"Z\", \"X\"):\n    for phi in sweep_angles:\n        angle = \"π\" if phi == np.pi else f\"{phi:.2f}\"\n        name = f\"Phase φ = {angle} in the {basis} basis\"\n        p1_circuits[name] = phase_circuits_by_basis[basis][phi]\n        p1_labels[basis].append(name)\n\n# Use the same number of shots as hardware for the comparison in part (d).\np1_sim = simulate(p1_circuits, shots=HW_SHOTS)\n"
    },
    {
      "cell_type": "markdown",
      "id": "p1-submit-note",
      "metadata": {},
      "source": "Run the next cell with `submit=False` to check the device and price. If it is online and you are ready to spend the credits, set `submit=True`, run it once, then set it back to `False`.\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p1-submit",
      "metadata": {},
      "outputs": [],
      "source": [
        "submit_hardware(\"P1\", p1_circuits, submit=False, retry_failed=False)\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p1-results-note",
      "metadata": {},
      "source": "Run the next cell to plot the fraction of `1` outcomes for each basis. It adds hardware points as they become available. You can rerun this cell as jobs finish without spending credits.\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p1-collect",
      "metadata": {},
      "outputs": [],
      "source": "p1_hardware = collect_hardware(p1_circuits)\n\n# Plot the simulator curve and any completed hardware points for each basis.\nfig, axes = plt.subplots(2, 1, figsize=(8, 6), sharex=True, sharey=True)\nfor basis, ax in zip((\"Z\", \"X\"), axes):\n    names = p1_labels[basis]\n    simulated = [p1_sim[name].get(\"1\", 0) / HW_SHOTS for name in names]\n    ax.plot(sweep_angles, simulated, \"o-\", label=\"Simulator\")\n\n    hardware_angles = []\n    hardware_fractions = []\n    for phi, name in zip(sweep_angles, names):\n        if name in p1_hardware:\n            counts = p1_hardware[name]\n            hardware_angles.append(phi)\n            hardware_fractions.append(counts.get(\"1\", 0) / sum(counts.values()))\n    if hardware_angles:\n        ax.scatter(hardware_angles, hardware_fractions, label=\"Hardware\", zorder=3)\n\n    ax.set_title(f\"Measuring in the {basis} basis\")\n    ax.set_ylabel(\"Fraction of 1 outcomes\")\n    ax.set_ylim(-0.05, 1.05)\n    ax.legend()\naxes[1].set_xlabel(\"Phase angle φ (radians)\")\nfig.tight_layout()\nplt.show()\n"
    },
    {
      "cell_type": "markdown",
      "id": "p1d-answer",
      "metadata": {},
      "source": [
        "### Your solution\n",
        "\n",
        "_Write your answer here._\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p2-intro",
      "metadata": {},
      "source": [
        "# Problem 2: Randomized benchmarking of a single qubit (15 points)\n",
        "\n",
        "Write your code between `### YOUR CODE BEGINS ###` and `### YOUR CODE ENDS ###`. Replace the `raise NotImplementedError(...)` line in each block.\n",
        "\n",
        "Real quantum gates are imperfect. This mirror experiment is a simple form of **randomized benchmarking**: it lets us see how errors build up as we apply more gates.\n",
        "\n",
        "Start a qubit in $|0\\rangle$ and apply $m$ random gates. Then apply the **mirror image**: undo each gate in reverse order. For example, $g_1,g_2,g_3$ is followed by $g_3^{-1},g_2^{-1},g_1^{-1}$. Ideally, the qubit returns to $|0\\rangle$, so the measurement is always 0. However, on a real system, there will be noise, so there may be some probability of measuring 1. \n",
        "\n",
        "We choose from $H,X,Y,Z,R_x(\\pi/4),R_y(\\pi/4),R_z(\\pi/4)$. The helper `benchmark_gate_set()` lists these gates. $H$ and the Pauli gates are their own inverses; a rotation is undone by negating its angle. Qiskit's `forward.inverse()` reverses the order and inverts each gate for us.\n",
        "\n",
        "Plot the fraction of 0 outcomes against $m$. Each circuit has **$2m$ gates**, including the mirror, before translation to the machine’s gates. First compare ideal and noisy simulations. Part (c) adds Rigetti results if available.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "rb-helpers",
      "metadata": {
        "jupyter": {
          "source_hidden": true
        },
        "tags": [
          "supplied-helper",
          "hide-input"
        ]
      },
      "outputs": [],
      "source": [
        "from qiskit.circuit.library import HGate, XGate, YGate, ZGate, RXGate, RYGate, RZGate\n",
        "from scipy.optimize import curve_fit\n",
        "\n",
        "# List the gates that the benchmark samples from.\n",
        "def benchmark_gate_set():\n",
        "    \"\"\"The seven gates used to build each random sequence.\"\"\"\n",
        "    return [HGate(), XGate(), YGate(), ZGate(),\n",
        "            RXGate(np.pi / 4), RYGate(np.pi / 4), RZGate(np.pi / 4)]\n",
        "\n",
        "# Return the available lengths and measured fractions of zeros.\n",
        "def rb_points(results, metadata):\n",
        "    lengths, probabilities = [], []\n",
        "    for name in sorted(metadata, key=lambda name: metadata[name][\"length\"]):\n",
        "        if name in results:\n",
        "            lengths.append(metadata[name][\"length\"])\n",
        "            probabilities.append(event_probability(results[name], lambda b: b[0] == 0, 1))\n",
        "    return lengths, probabilities\n",
        "\n",
        "# Predict the return rate for a circuit with m forward gates and m inverse gates.\n",
        "def rb_decay(m, amplitude, error_rate):\n",
        "    return 0.5 + amplitude * (1 - error_rate)**(2 * np.asarray(m))\n",
        "\n",
        "# Find the amplitude and error rate that best fit the measured fractions.\n",
        "def fit_rb(results, metadata):\n",
        "    lengths, probabilities = rb_points(results, metadata)\n",
        "    if len(lengths) < 3 or max(probabilities) <= 0.5:\n",
        "        return None\n",
        "    parameters, _ = curve_fit(rb_decay, lengths, probabilities,\n",
        "                              p0=(0.45, 0.005), bounds=([0, 0], [0.5, 1]))\n",
        "    return tuple(parameters)\n",
        "\n",
        "# Plot the measured points and any fitted curves.\n",
        "def plot_rb(datasets, metadata, fits=None):\n",
        "    fig, ax = plt.subplots(figsize=(8, 4))\n",
        "    for label, results in datasets.items():\n",
        "        lengths, probabilities = rb_points(results, metadata)\n",
        "        if lengths:\n",
        "            fit = (fits or {}).get(label)\n",
        "            line, = ax.plot(lengths, probabilities, \"o\" if fit else \"o-\", label=label)\n",
        "            if fit:\n",
        "                fit_lengths = np.linspace(min(lengths), max(lengths), 100)\n",
        "                ax.plot(fit_lengths, rb_decay(fit_lengths, *fit), \"--\",\n",
        "                        color=line.get_color(), label=f\"{label} fit\")\n",
        "    ax.set_xlabel(\"Forward gates, m (2m gates including the mirror)\")\n",
        "    ax.set_xticks(RB_LENGTHS)\n",
        "    ax.set_ylabel(\"Fraction of measurements returning 0\")\n",
        "    ax.set_ylim(0, 1.03)\n",
        "    ax.legend()\n",
        "    fig.tight_layout()\n",
        "    plt.show()\n",
        "\n",
        "# Prepare a hardware program that keeps the benchmark's mirror gates.\n",
        "def benchmark_hardware_program(circuit, device_id):\n",
        "    \"\"\"Supplied: preserve the gates of a one-qubit mirror experiment on hardware.\"\"\"\n",
        "    if device_id != DEVICE_IDS[\"Rigetti\"]:\n",
        "        raise ValueError(\"Use Rigetti for the hardware mirror experiment.\")\n",
        "    if circuit.num_qubits != 1 or circuit.num_clbits != 1:\n",
        "        raise ValueError(\"The benchmarking helper expects one qubit and one measured bit.\")\n",
        "\n",
        "    # Translate without optimization: a compiler could otherwise cancel the mirror.\n",
        "    from qiskit import qasm3\n",
        "    body = QuantumCircuit(1)\n",
        "    for instruction in circuit.data:\n",
        "        if instruction.operation.name not in (\"barrier\", \"measure\"):\n",
        "            body.append(instruction.operation, [0])\n",
        "    native = transpile(body, basis_gates=[\"rz\", \"sx\", \"x\"], optimization_level=0)\n",
        "    program = QuantumCircuit(1, 1)\n",
        "    # Express X as two native pi/2 pulses for the direct path.\n",
        "    program.global_phase = native.global_phase\n",
        "    for instruction in native.data:\n",
        "        if instruction.operation.name == \"x\":\n",
        "            program.sx(0)\n",
        "            program.sx(0)\n",
        "        else:\n",
        "            program.append(instruction.operation, [0])\n",
        "    # The same short delay in each circuit selects Rigetti's direct native-gate path.\n",
        "    program.delay(32, 0, unit=\"ns\")\n",
        "    program.measure(0, 0)\n",
        "    return qasm3.dumps(program), {}\n",
        "\n",
        "\n",
        "print(\"Benchmarking helpers ready.\")\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p2a",
      "metadata": {},
      "source": [
        "**a) (5 points)** Build your own random sequence in `forward`. Repeat $m$ times, choosing a random index with `rng.integers(len(gates))` and appending that gate to qubit 0 with `forward.append(gates[index], [0])`.\n",
        "\n",
        "The code copies your sequence into `qc`. Append its mirror with `qc.compose(forward.inverse(), inplace=True)`, then measure qubit 0 into bit 0. Explain why the ideal result is always 0.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p2-benchmark",
      "metadata": {},
      "outputs": [],
      "source": [
        "# Build m random gates, followed by their inverse sequence and a measurement.\n",
        "def benchmark_qubit(m, seed):\n",
        "    rng = np.random.default_rng(seed)  # The same seed gives the same sequence.\n",
        "    gates = benchmark_gate_set()\n",
        "    forward = QuantumCircuit(1)\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Choose and append m random gates to forward.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "\n",
        "    qc = QuantumCircuit(1, 1)\n",
        "    qc.compose(forward, inplace=True)\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Append forward.inverse(), then measure qubit 0.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "    return qc\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p2a-answer",
      "metadata": {},
      "source": [
        "### Your solution\n",
        "\n",
        "_Write your answer here._\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p2b",
      "metadata": {},
      "source": [
        "**b) (5 points)** Run the next cell to plot how often the qubit returns to 0 at $m=10,20,\\ldots,100$, using 256 shots per circuit. The noise model sometimes replaces the qubit by a fair random qubit or flips the measured bit.\n",
        "\n",
        "How does the noisy return probability change with circuit length? Why would more shots alone not fix this?\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p2-simulation",
      "metadata": {},
      "outputs": [],
      "source": [
        "# Build one mirror circuit per length and compare ideal and noisy simulations.\n",
        "rb_circuits = {}\n",
        "rb_metadata = {}\n",
        "for m in RB_LENGTHS:\n",
        "    name = f\"m{m}\"\n",
        "    rb_circuits[name] = benchmark_qubit(m, SEED + m)\n",
        "    rb_metadata[name] = {\"length\": m}\n",
        "\n",
        "rb_ideal = simulate(rb_circuits, shots=RB_SHOTS)\n",
        "rb_noisy = simulate(rb_circuits, shots=RB_SHOTS, noise=make_noise())\n",
        "plot_rb({\"Ideal simulation\": rb_ideal, \"Noisy simulation\": rb_noisy}, rb_metadata)\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p2b-answer",
      "metadata": {},
      "source": [
        "### Your solution\n",
        "\n",
        "_Write your answer here._\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p2c",
      "metadata": {},
      "source": [
        "**c) (5 points)** If you chose Rigetti, run the 10 circuits on hardware at 256 shots each. On the other machines, the compiler can cancel the mirror gates, so use your simulation from part (b).\n",
        "\n",
        "On Rigetti, preview the cost with `submit=False`. When you're ready, run the cell once with `submit=True`, then set it back to `False`.\n",
        "\n",
        "Say which machine you chose or that you stayed in simulation. Use the fit below to estimate how quickly the return rate falls.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p2-hardware-data",
      "metadata": {},
      "outputs": [],
      "source": [
        "submit_hardware(\"P2\", rb_circuits, shots=RB_SHOTS, submit=False, retry_failed=False, preserve_gates=True)\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p2-results-note",
      "metadata": {},
      "source": "Run the next cell to collect any completed Rigetti jobs. As jobs finish, rerun this cell and the fit cell below to update your plot. Neither cell spends credits.\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "aad72abc-0f9f-47d4-9677-f51c7cd875c7",
      "metadata": {},
      "outputs": [],
      "source": [
        "rb_hardware = collect_hardware(rb_circuits, shots=RB_SHOTS, preserve_gates=True)\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p2-fit-note",
      "metadata": {},
      "source": [
        "**Estimate an error rate.** Fit the measured fraction of zeros to\n",
        "$$p_0(m)=\\frac12+A(1-r)^{2m}.$$\n",
        "A random bit gives zero half the time. $A$ sets the starting height above $1/2$ and can reflect errors in preparation and measurement. $r$ is the fraction of the remaining signal lost per logical gate. There are $2m$ logical gates including the mirror.\n",
        "\n",
        "Use `fit_rb(counts, rb_metadata)` to find the pair `(A, r)` that minimizes the sum of squared differences between the curve and your points. In `rb_fits`, store the fit for `rb_noisy` under `\"Noisy simulation\"`. If at least three hardware lengths are ready, store the fit for `rb_hardware` under `\"Hardware\"`.\n",
        "\n",
        "Run the completed cell to see the fitted curves. Report $r$ as a percent for each fit. How well does each curve follow your points? If you have both fits, compare their rates. Treat $r$ as a summary of the decay in this experiment.\n"
      ]
    },
    {
      "cell_type": "code",
      "id": "p2-fit",
      "metadata": {
        "tags": [
          "student-code"
        ]
      },
      "source": [
        "# Fit the noisy simulation and, when available, the hardware data.\n",
        "rb_fits = {}\n",
        "### YOUR CODE BEGINS ###\n",
        "raise NotImplementedError(\"Store the noisy simulation fit and add a hardware fit if at least three lengths are ready.\")\n",
        "### YOUR CODE ENDS ###\n",
        "\n",
        "rb_datasets = {\"Ideal simulation\": rb_ideal, \"Noisy simulation\": rb_noisy}\n",
        "if rb_hardware:\n",
        "    rb_datasets[\"Hardware\"] = rb_hardware\n",
        "plot_rb(rb_datasets, rb_metadata, fits=rb_fits)\n",
        "for label, fit in rb_fits.items():\n",
        "    if fit is None:\n",
        "        print(f\"{label}: not enough data above 50% to estimate an error rate.\")\n",
        "    else:\n",
        "        amplitude, error_rate = fit\n",
        "        print(f\"{label}: A = {amplitude:.3f}, error rate = {error_rate:.2%} per logical gate.\")\n"
      ],
      "outputs": [],
      "execution_count": null
    },
    {
      "cell_type": "markdown",
      "id": "p2c-answer",
      "metadata": {},
      "source": [
        "### Your solution\n",
        "\n",
        "_Write your answer here._\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p3-intro",
      "metadata": {},
      "source": [
        "# Problem 3: Simulating Classical Circuits in Quantum Circuits (25 points)\n",
        "\n",
        "In this problem we will see that quantum computers can efficiently simulate classical computers, so anything a classical computer can do, so can a quantum computer. We will get hands on experience with how to translate classical circuits to quantum circuits.\n",
        "\n",
        "**a) (5 points)** The basic components of a classical (non-reversible) circuit include AND, OR, NOT gates. You may recall from some other CS/EE class that every classical circuit can be built from a combination of AND, OR, NOT gates (in fact, AND and NOT suffice). \n",
        "\n",
        "We can't use AND gates in a quantum circuit because they're not reversible, but we can use a _reversible_ version of AND. Let $R_\\wedge$ denote the 3-bit reversible version of AND, which is the map $(a,b,t) \\mapsto (a,b,t \\oplus (a \\wedge b))$. This is also known as the TOFFOLI gate.\n",
        "\n",
        "Fill in Python code between \"### YOUR CODE BEGINS ###\" and \"### YOUR CODE ENDS ###\" throughout this problem. Start with `reversible_and`. In Qiskit, TOFFOLI, CNOT, and X are `qc.ccx`, `qc.cx`, and `qc.x`.\n",
        "\n",
        "While you're at it, also fill in the code for `reversible_or`, which maps $(a,b,t)\\mapsto(a,b,t\\oplus(a\\lor b))$, and `reversible_not`, which maps $(a,t)\\mapsto(a,t\\oplus\\neg a)$.\n",
        "\n",
        "The input qubits should stay unchanged. Each function should use no more than three gates and work for either starting value of the target $t$. The Python arguments `a`, `b`, and `target` are qubit indices; add gates to the supplied `qc`.\n",
        "\n",
        "Here $\\oplus$ means XOR (addition modulo 2). We could also associate NOT with the one-qubit transformation $|a\\rangle\\mapsto|\\neg a\\rangle$, but we use an extra target here to keep the same format as AND and OR.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p3-gates",
      "metadata": {
        "tags": [
          "student-code"
        ]
      },
      "outputs": [],
      "source": [
        "# XOR the AND of the two inputs into the target.\n",
        "def reversible_and(qc, a, b, target):\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Add reversible AND.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "\n",
        "# XOR the OR of the two inputs into the target.\n",
        "def reversible_or(qc, a, b, target):\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Add reversible OR.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "\n",
        "# XOR the negated input into the target.\n",
        "def reversible_not(qc, a, target):\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Add reversible NOT.\")\n",
        "    ### YOUR CODE ENDS ###"
      ]
    },
    {
      "attachments": {
        "mux.png": {
          "image/png": "iVBORw0KGgoAAAANSUhEUgAAA/gAAAHwCAYAAAASF8TTAAAMPWlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnluSkEBoAQSkhN4EkRpASggt9I4gKi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Mb880TBN10fgz0BEAAQgAIHgCPim6X/jG98Izk4MggAEIACBYRJA4A+z3al1zQSS372/6cYbZ5R4YyRsk002ccl38mckIAACEIAABFonwDT91psAAyAAAQhAIIMAAj8DDocgMCmBnXfe2a233nrj5Jf/6U9u5cqVY/+fHvbff//9Y/9jH/vY8T47EIAABCDQPQJM0+9em2ExBCAAgT4SiH+nq481pE4QaIGAPoH3hCc8wZ1//vmj0u+++273zW9+0x122GHuwQcfdIsWLYpZdcghh8T8eCAAgTUEtF7Fu971LvfQQw+NA/fff//R72kcUGLnoosucqeffvo4xfrrr+9OPPFEt8EGG4zDyux8/etfH//Wle5tb3ub22GHHWZksWTJEveZz3xmRrgvQDN61llnndGfZvhst912Tg8On/SkJ7nkGh++9ITVR0Dv4WuafvLzePKnvaNfnzXkDAEIQAACEIgTQODHeeCDQGUEJOYXL17sVq1aNcrzW9/6lvvRj340EvhRoaKO4qMe9ajKyiUjCPSNwAUXXOCuvfbaWLXOPPNMd+ihh7q11147Fl7Eo89YXn/99bGon//85928efNiYUU9d955Zyy/6O87moce7iXLjR4vsi9xv++++7ojjjjCJdf6KJKeOPURYAS/PrbkDAEIQAACxQkwRb84K2JCoBSBHXfc0R133HExAXLvvffGRiE333xz98pXvrJUvkSGwNAI/PznP59RZc2KsRkyMw5OEPCLX/zCXXjhhROkbDaJHhL86le/cieccILzcWnWmuGW5nsPf7g0qDkEIAABCIREgBH8kFoDW3pHQNOIteDeKaec4pYuXToezZ89e/ZoKucb3/hGVs/vXatToSoJ3HTTTU5T28094hGPcDfccMPI+5Of/MQdcMABdmjqrabPf/CDH3Qbbrjh1HkVyWCLLbZwu+++uzfqihUrnGYa6E8M7rvvvlg8reGh64pmCD3nOc+JHcPTDoHklP12rKBUCEAAAhAYOgEE/tDPAOpfO4FddtnFvf/97x911P/yl7+M3qnVu7STTC2u3VgKgEBgBM4++2y3evXqkVV6WPb85z9//P78FVdc4a655prRu+lVmH377bc7TdXXzJsm3J577une/OY35xal+mtq/09/+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teukAJ94j4k+7AFAhCAAAQgAAEIQAACTRKQOAx5tFei/rzzznO/+93v3EUXXZQq5tdff333+Mc/3h100EHu0Y9+dGmEn/70p93ll19eKt2sWbPceuut51T2Bhts4Lbbbju31157jf7kb9LpQU2yHaV95s+f36QZnSyrVQW9dOlS9853vtML7sMf/rDbfvvtvccI/BsBn8DXlBbftBaYQQACEIAABCAAAQhAoO8EJAx9feQQ6n3++ee7r371q+7GG2/MNef+++93iq+/HXfc0b3kJS9x+++/f246i3Drrbe666+/3rxTbddZZ51R+S9+8Yvd2muvPVVeRROH/qCmaD3aiMcU/TaoV1BmqBeuCqpGFhCAAAQgAAEIQAACEKiMQHIkuLKMC2a0YsUK97GPfWz0V0TcJ7PVoOgnP/lJd+qppzrNgG7aLV++3H396193CxcubKX8puvb9fJaHcHvOrw27fcJfEbv22wRyoYABCAAAQhAAAIQgECcwN133+00M/mKK66IHVhrrbXcE5/4RPeoRz3K7bzzzqM/TY+/+eab3U033TR6J/83v/mNW7Vq1TjdT3/6U/fXv/7VvfWtb3WbbrrpOLzIjqb66xXoLLd69Wp35513Oo3+X3fddU4PFqJOdTjllFPcG9/4xmhwLfu+mRhtP6ippaI1ZIrArwFq3Vnq6RkOAhCAAAQgAAEIQAACEAiXgASzRu6T4n6nnXZyxx57rNtll11mGL/xxhu73XbbzT396U8frVX2ta99zf3qV78ax9N79R/5yEfce97zHqeHBEWd8ttzzz2LRh/F+8Mf/uD+93//11177bXjdLLl4IMP9to+jsROqwSKnxWtmknhRkAj976nV4zeGyG2EIAABCAAAQhAAAJDJRDSCuzfeHha+yWXXDJuitmzZ7uXvexl7n3ve18hgawRd42WH3nkkU4L4Jn785//7L7zne+Yt7atFvnTonZbbLFFrIwzzzwz5scTFgEEfljtkWmNxL1var4S+T4JkpkZByEAAQhAAAIQgAAEIACBWghoivu3/+//Ynm/7nWvc4cddpiT0C/jtMDeUUcdFUsiTRAdWY8drNCz0UYbzSj74osvrrAEf1YhPajxWxhuKAI/3LaJWZYl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AggggAACfhEgwPdLT9IOBBBAAAEEEEAAAQQQQACBQAsQ4Ae6+2k8AggggAACCCCAAAIIIICAXwQI8P3Sk7QDAQQQQAABBBBAAAEEEEAg0AIE+IHufhqPAAIIIIAAAggggAACCCDgFwECfL/0JO1AAAEEEEAAAQQQQAABBBAItMD/ARsxMY0sxuEHAAAAAElFTkSuQmCC"
        }
      },
      "cell_type": "markdown",
      "id": "p3-diagram",
      "metadata": {},
      "source": "**b) (8 points)** Consider the 3-bit function known as the \"2-to-1 multiplexer\", or 2TO1MUX, which maps $(x_0,x_1,b)$ to $x_b$. In other words, the last bit is a \"selector bit\" that chooses to output the first or second bit.\n\nThe following circuit diagram shows a classic way to implement this using AND, OR, and NOT gates. When a wire branches in the diagram, reuse the same qubit wherever that input is needed.\n\n![The 2-to-1 multiplexer circuit](attachment:mux.png)\n\nNow, implement 2TO1MUX as a **reversible circuit**. Convert each AND, OR, and NOT in the diagram into its reversible equivalent using your functions from part (a).\n\nUse qubits 0, 1, and 2 for $x_0,x_1,b$. Reserve qubit 3 for the final target. Your scratch qubits start at qubit 4 and are initially zero. Choose how many you need (`NUM_ANCILLAS`) and which one will hold $x_b$ (`ANSWER_QUBIT`). You do not need to minimize the number of scratch qubits.\n\n`compute_mux()` puts $x_b$ in `ANSWER_QUBIT` and leaves the inputs and qubit 3 unchanged. The supplied `mux_dirty()` then uses that scratch qubit to XOR $x_b$ into qubit 3, leaving the scratch work in place:\n\n$$ (x_0,x_1,b,t,0,\\ldots,0) \\mapsto (x_0,x_1,b,t \\oplus x_b,\\mathrm{junk}).$$\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p3-compute",
      "metadata": {
        "tags": [
          "student-code"
        ]
      },
      "outputs": [],
      "source": [
        "# Choose your scratch-space size and which scratch qubit will hold the answer.\n",
        "### YOUR CODE BEGINS ###\n",
        "raise NotImplementedError(\"Set NUM_ANCILLAS and ANSWER_QUBIT for your circuit.\")\n",
        "### YOUR CODE ENDS ###\n",
        "\n",
        "if not isinstance(NUM_ANCILLAS, int) or NUM_ANCILLAS < 1:\n",
        "    raise ValueError(\"Choose a positive number of ancilla qubits.\")\n",
        "if not isinstance(ANSWER_QUBIT, int) or not 4 <= ANSWER_QUBIT < 4 + NUM_ANCILLAS:\n",
        "    raise ValueError(\"ANSWER_QUBIT must be one of your ancillas.\")\n",
        "\n",
        "# Compute x_b in ANSWER_QUBIT and preserve the inputs and final target.\n",
        "def compute_mux():\n",
        "    qc = QuantumCircuit(4 + NUM_ANCILLAS)\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Compute the multiplexer answer in ANSWER_QUBIT.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "    return qc\n",
        "\n",
        "# Add the answer to target qubit 3 and leave the scratch work in place.\n",
        "def mux_dirty():\n",
        "    qc = compute_mux()\n",
        "    qc.cx(ANSWER_QUBIT, 3)  # Target t becomes t XOR x_b.\n",
        "    return qc\n",
        "\n",
        "# Return the multiplexer output for three classical bits.\n",
        "def f_mux(x0, x1, b):\n",
        "    # x0, x1, and b are bit values (0 or 1).\n",
        "    return x1 if b else x0  # Select x0 when b = 0, or x1 when b = 1.\n",
        "\n",
        "# Build and draw your multiplexer circuit.\n",
        "work = compute_mux()\n",
        "display(work.draw(output=\"text\", fold=100))\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p3c",
      "metadata": {},
      "source": "**c) (8 points)** In your implementation, your ancilla bits likely contain some junk data that depends on the inputs. It would be nice to clean up the scratch work so that the ancillas return to zero (we assume they started in the zero state), so that \n\n$$ (x_0,x_1,b,t,0,\\ldots,0) \\mapsto (x_0,x_1,b,t \\oplus x_b,0,\\ldots,0).$$\n\nThis is called \"clean computation\". The idea is to undo the scratch calculation after using its answer to update the target.\n\nFirst, we need the _inverse_ transformation of `compute_mux()`. That is, first performing `compute_mux()` and then its inverse should yield the identity transformation on _all_ bits (including the target and ancilla bits). \n\nQiskit gives us this inverse as `work.inverse()`, where `work = compute_mux()` is already defined below.\n\nNow implement `mux_clean()`. Append `work`, apply a CNOT from `ANSWER_QUBIT` to qubit 3 while the answer is still in the scratch qubit, then append `work.inverse()`. Use `qc.compose(..., inplace=True)` to append a circuit.\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p3-clean",
      "metadata": {
        "tags": [
          "student-code"
        ]
      },
      "outputs": [],
      "source": [
        "# Add the answer to the target and return all scratch qubits to zero.\n",
        "def mux_clean():\n",
        "    work = compute_mux()  # Your circuit for calculating x_b.\n",
        "    qc = QuantumCircuit(work.num_qubits)  # Use the same qubit layout.\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Compute, copy to the target, and uncompute.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "    return qc\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p3-example-note",
      "metadata": {},
      "source": "Run this example on your clean multiplexer. It starts with $(x_0,x_1,b)=(0,1,1)$ and $t=1$. The selector picks $x_1=1$, so the target should flip to 0. The three inputs should stay the same, and all scratch qubits should end at 0.\n"
    },
    {
      "cell_type": "code",
      "id": "p3-example",
      "metadata": {},
      "source": "# Prepare the three inputs and the target, then run the clean multiplexer.\nexample_width = 4 + NUM_ANCILLAS\nmux_example = QuantumCircuit(example_width, example_width)\nmux_example.x([1, 2, 3])  # x1 = 1, b = 1, and t = 1.\nmux_example.compose(mux_clean(), inplace=True)\nmux_example.measure(range(example_width), range(example_width))\n\n# Show the result in qubit order so we can see the target and scratch bits.\nexample_counts = simulate({\"mux\": mux_example}, shots=1)[\"mux\"]\nexample_bits = bits(next(iter(example_counts)), example_width)\nprint(\"Inputs (x0, x1, b):\", example_bits[:3])\nprint(\"Target:\", example_bits[3])\nprint(\"Scratch qubits:\", example_bits[4:])\n",
      "outputs": [],
      "execution_count": null
    },
    {
      "cell_type": "markdown",
      "id": "p3d",
      "metadata": {},
      "source": [
        "**d) (4 points)** Let's generalize this. Suppose you're given a classical circuit $C$, consisting of AND, OR, and NOT gates, that acts on $n$ input bits $(x_1,\\ldots,x_n)$, and computes a boolean function $f:\\{0,1\\}^n \\to \\{0,1\\}$. Suppose there are $G$ gates in total.\n",
        "\n",
        "Suppose you convert this to a reversible circuit that computes $f$ cleanly, and this circuit uses TOFFOLI, CNOT, and X gates. \n",
        "\n",
        "Explain why the resulting circuit needs only $O(G)$ quantum gates. Account for both the forward computation and the steps that clear the scratch work.\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p3d-answer",
      "metadata": {},
      "source": [
        "### Your solution\n",
        "\n",
        "_Write your answer here._\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p4-intro",
      "metadata": {},
      "source": [
        "# Problem 4: Phase kickback and Deutsch–Jozsa (20 points)\n",
        "\n",
        "Write your code between `### YOUR CODE BEGINS ###` and `### YOUR CODE ENDS ###`. Replace the `raise NotImplementedError(...)` line in each block.\n",
        "\n",
        "Deutsch–Jozsa extends Deutsch's problem to several input bits. We are given an oracle for a Boolean function and promised that the function is either **constant** or **balanced**.\n",
        "\n",
        "A **constant** function returns the same bit on every input. For example, $f(x)=0$ for all $x$ is constant.\n",
        "\n",
        "A **balanced** function returns 0 on exactly half its inputs and 1 on the other half. For example, $g(x_0,x_1)=x_0\\oplus x_1$ is balanced.\n",
        "\n",
        "| Input $(x_0,x_1)$ | Output $g(x_0,x_1)$ |\n",
        "|---|---|\n",
        "| (0, 0) | 0 |\n",
        "| (0, 1) | 1 |\n",
        "| (1, 0) | 1 |\n",
        "| (1, 1) | 0 |\n",
        "\n",
        "The functions in this problem have three input bits. A balanced function therefore gives four zeros and four ones across its eight inputs.\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p4b",
      "metadata": {},
      "source": [
        "**a) (6 points)** Complete `constant_oracle(value)` and `parity_oracle()` below. Each returns a `QuantumCircuit` on four qubits with no measurements. Qubits 0, 1, and 2 hold the inputs $x_0,x_1,b$. Qubit 3 holds the target $t$.\n",
        "\n",
        "For every choice of input and target bits, your circuit must leave the inputs alone and XOR the function's output into the target.\n",
        "$$|x_0,x_1,b,t\\rangle\\mapsto|x_0,x_1,b,t\\oplus f(x_0,x_1,b)\\rangle.$$\n",
        "\n",
        "Your Python functions build the gates. The input bits live on the qubits when the circuit runs, so the same gates work on every input and on superpositions of inputs.\n",
        "\n",
        "- In `constant_oracle(value)`, the parameter `value` is 0 or 1 and sets the output for every input.\n",
        "- In `parity_oracle()`, use $f(x_0,x_1,b)=x_0\\oplus x_1\\oplus b$. A CNOT XORs one input into the target.\n",
        "- For the multiplexer, set `mux_oracle` to the circuit returned by your `mux_clean()` from Problem 3(c). It uses the same input and target positions. Its scratch qubits start and end at zero.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p4-oracles",
      "metadata": {
        "tags": [
          "student-code"
        ]
      },
      "outputs": [],
      "source": [
        "# Build an oracle with the same answer for every input.\n",
        "def constant_oracle(value):\n",
        "    qc = QuantumCircuit(4)\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"XOR the constant bit into the target.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "    return qc\n",
        "\n",
        "# Build an oracle that XORs the parity of the inputs into the target.\n",
        "def parity_oracle():\n",
        "    qc = QuantumCircuit(4)\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"XOR the three inputs into the target.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "    return qc\n",
        "\n",
        "# Reuse the clean multiplexer you wrote in Problem 3(c).\n",
        "### YOUR CODE BEGINS ###\n",
        "raise NotImplementedError(\"Set mux_oracle to your clean multiplexer circuit.\")\n",
        "### YOUR CODE ENDS ###\n",
        "\n",
        "# Gather the oracles for the Deutsch–Jozsa circuits below.\n",
        "dj_oracles = {\"constant_0\": constant_oracle(0), \"constant_1\": constant_oracle(1),\n",
        "              \"parity\": parity_oracle(), \"mux\": mux_oracle}\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "b4a2923c-3dd3-416b-bac6-0988071b0634",
      "metadata": {},
      "source": [
        "**b) (2 points)** Explain why the parity function $x_0\\oplus x_1\\oplus b$ and the multiplexer function $x_b$ are both balanced. Give a short argument for each.\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p4b-answer",
      "metadata": {},
      "source": [
        "### Your solution\n",
        "\n",
        "_Write your answer here._\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p4c",
      "metadata": {},
      "source": [
        "**c) (6 points)** Complete `deutsch_jozsa`. Put the three input qubits in a uniform superposition and prepare qubit 3 in $|-\\rangle$. Leave any scratch qubits at zero. The supplied code applies the oracle. Then apply $H$ to the three input qubits, which the code measures for you.\n",
        "\n",
        "The $|-\\rangle$ target turns the oracle's answer into a sign: $+1$ for 0 and $-1$ for 1. The last Hadamards make these signs add or cancel at `000`.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p4-algorithm",
      "metadata": {
        "tags": [
          "student-code"
        ]
      },
      "outputs": [],
      "source": [
        "# Build the Deutsch–Jozsa circuit with qubit 3 in |->.\n",
        "def deutsch_jozsa(oracle):\n",
        "    qc = QuantumCircuit(oracle.num_qubits, 3)\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Prepare the three inputs and put qubit 3 in |->.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "\n",
        "    qc.compose(oracle, inplace=True)\n",
        "\n",
        "    ### YOUR CODE BEGINS ###\n",
        "    raise NotImplementedError(\"Add the final gates on the input qubits.\")\n",
        "    ### YOUR CODE ENDS ###\n",
        "    qc.measure([0, 1, 2], [0, 1, 2])\n",
        "    return qc\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p4d",
      "metadata": {},
      "source": "**d) (6 points)** Run the next cell to simulate all four oracles. On your chosen hardware, run the constant-zero, parity, and multiplexer circuits. Plot how often each measures `000` and save the plot with your notebook.\n\nIn the answer box below the plot, say which oracles give `000` in simulation and explain why. Compare with any hardware results you have, and note any runs that are missing.\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p4-batch",
      "metadata": {},
      "outputs": [],
      "source": "# Simulate all four oracles. Use just one constant oracle on hardware.\np4_sim_circuits = {name: deutsch_jozsa(oracle) for name, oracle in dj_oracles.items()}\np4_sim = simulate(p4_sim_circuits)\np4_circuits = {\n    name: p4_sim_circuits[name] for name in (\"constant_0\", \"parity\", \"mux\")\n}\n"
    },
    {
      "cell_type": "markdown",
      "id": "p4-submit-note",
      "metadata": {},
      "source": "Run the next cell with `submit=False` to check the device and price. If it is online and you are ready to spend the credits, set `submit=True`, run it once, then set it back to `False`.\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p4-submit",
      "metadata": {},
      "outputs": [],
      "source": [
        "submit_hardware(\"P4\", p4_circuits, submit=False, retry_failed=False)\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p4-collect",
      "metadata": {},
      "outputs": [],
      "source": [
        "p4_hardware = collect_hardware(p4_circuits)\n"
      ]
    },
    {
      "cell_type": "markdown",
      "id": "p4-results-note",
      "metadata": {},
      "source": [
        "Run the next cell to compare how often each circuit gives `000` in simulation and on hardware. As jobs finish, rerun the collection cell above and this plotting cell.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "p4-results",
      "metadata": {},
      "outputs": [],
      "source": "compare_probabilities(list(p4_sim_circuits),\n        {\"Ideal simulation\": p4_sim, \"Hardware\": p4_hardware},\n        lambda b: b == [0, 0, 0], 3, \"Deutsch–Jozsa\", \"Probability of 000\")\n"
    },
    {
      "cell_type": "markdown",
      "id": "p4d-answer",
      "metadata": {},
      "source": "### Your solution\n\n_Write your answer here._\n"
    },
    {
      "cell_type": "markdown",
      "id": "submission",
      "metadata": {},
      "source": "# Before you submit\n\nCheck that your answers and figures are saved. Note any missing hardware results and why they are missing. Set `ENABLE_HARDWARE` and every `submit` argument back to `False` before saving. Your plots and job IDs will stay in the notebook.\n\nRun the code cell below and save the notebook with its outputs. Download the saved `.ipynb` from qBraid and upload that file to Gradescope. Keep the results folder so you can reopen your jobs later.\n"
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "id": "final-record",
      "metadata": {},
      "outputs": [],
      "source": "# Include the saved job IDs and results in the submitted notebook.\nmanifest = load_manifest()\nif manifest:\n    for record in manifest.values():\n        job_id = record.get(\"job_id\") or \"No job ID yet\"\n        print(f\"{record['part']} / {record['name']}: {record['status']} ({job_id})\")\n    display(JSON({\"hardware_results\": manifest}, expanded=False))\nelse:\n    print(\"No saved hardware jobs.\")\nprint(\"Save this notebook with its outputs.\")\n"
    }
  ],
  "metadata": {
    "assignment": "Programming Assignment 1",
    "coms4281": {
      "assignment": 1,
      "benchmark_hardware_circuits": 10,
      "default_hardware_device": "rigetti:rigetti:qpu:cepheus-1-108q",
      "supported_hardware_devices": [
        "rigetti:rigetti:qpu:cepheus-1-108q",
        "aws:iqm:qpu:garnet",
        "aws:ionq:qpu:forte-enterprise-1"
      ],
      "term": "Fall 2026",
      "version": "2.3-student-hardware-benchmark"
    },
    "course": "COMS 4281, Fall 2026",
    "created": "2026-11-06",
    "hardware_execution": "Disabled by default. No real-hardware results are bundled.",
    "kernelspec": {
      "display_name": "Python 3 (ipykernel)",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.12.3"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 5
}
