{
  "schemaVersion": 2,
  "description": "Published reversible SHA-256 quantum-circuit estimates used to track the sha2.fail frontier. Only papers that publish a concrete, expected improvement in logical qubits, Toffoli-depth, or qubit×Toffoli-depth are kept in the main frontier. Related work from the last two years is listed separately.",
  "unit": {
    "qubits": "logical qubits for one SHA-256 compression oracle (peak live)",
    "toffoliDepth": "Toffoli-depth of one SHA-256 compression oracle",
    "tDepth": "T-depth of one SHA-256 compression oracle",
    "tCount": "T-gate count of one SHA-256 compression oracle",
    "surfaceCodeCycles": "estimated surface-code cycles for a full Grover preimage search",
    "physicalQubits": "estimated physical qubits including error correction",
    "scoreProxy": "qubits × Toffoli-depth, a time-area proxy (NOT the official sha2.fail score, which uses Toffoli count)"
  },
  "papers": [
    {
      "id": "amy2016",
      "year": 2016,
      "authors": "Matthew Amy, Olivia Di Matteo, Vlad Gheorghiu, Michele Mosca, Alex Parent, John Schanck",
      "title": "Estimating the cost of generic quantum pre-image attacks on SHA-2 and SHA-3",
      "venue": "arXiv:1603.09383 [quant-ph] (presented at SAC 2016)",
      "url": "https://arxiv.org/abs/1603.09383",
      "pdf": "https://arxiv.org/pdf/1603.09383.pdf",
      "circuits": [
        {
          "name": "Amy et al. SHA-256",
          "qubits": 2402,
          "tDepth": 70400,
          "tCount": 228992,
          "surfaceCodeCyclesExp": 153.8,
          "physicalQubits": 13900000,
          "totalCostExp": 166.4,
          "notes": "First concrete fault-tolerant cost estimate. Uses CDKM adders and T-par optimization. T-count is T-gates; Toffoli count is not reported directly, so the 3-D chart uses T-depth as the depth axis."
        }
      ],
      "improvement": "First published concrete reversible SHA-256 circuit cost. Established the baseline: 2402 logical qubits and ~2^166.4 logical-qubit-cycles for a full Grover preimage search.",
      "selected": true
    },
    {
      "id": "kim2018",
      "year": 2018,
      "authors": "Panjin Kim, Kyung Chul Jeong, Daewan Han",
      "title": "Time-Space Complexity of Quantum Search Algorithms in Symmetric Cryptanalysis",
      "venue": "Quantum Information Processing, DOI 10.1007/s11128-018-2107-3",
      "url": "https://arxiv.org/abs/1805.05534",
      "pdf": "https://arxiv.org/pdf/1805.05534.pdf",
      "circuits": [
        {
          "name": "SHA-C1",
          "qubits": 801,
          "toffoliDepth": 36368,
          "notes": "Serial schedule, poly-depth CDKM adder, low-qubit C^256NOT."
        },
        {
          "name": "SHA-C2",
          "qubits": 853,
          "toffoliDepth": 13280,
          "notes": "Serial schedule, log-depth QCLA, low-qubit C^256NOT."
        },
        {
          "name": "SHA-C3",
          "qubits": 853,
          "toffoliDepth": 13280,
          "notes": "Serial schedule, log-depth QCLA, lower-depth C^256NOT."
        },
        {
          "name": "SHA-C4",
          "qubits": 834,
          "toffoliDepth": 27584,
          "notes": "Parallel schedule, poly-depth CDKM, low-qubit C^256NOT."
        },
        {
          "name": "SHA-C5",
          "qubits": 938,
          "toffoliDepth": 10112,
          "notes": "Parallel schedule, log-depth QCLA, low-qubit C^256NOT."
        },
        {
          "name": "SHA-C6",
          "qubits": 938,
          "toffoliDepth": 10112,
          "selected": true,
          "notes": "Parallel schedule, log-depth QCLA, lower-depth C^256NOT. Best time-space trade-off in this work."
        }
      ],
      "improvement": "Introduced time-space trade-offs. Pushed the SHA-256 oracle down to 801 logical qubits and 10,112 Toffoli-depth (SHA-C6), a large improvement over Amy et al.'s 2402 qubits / 70,400 T-depth baseline.",
      "selected": true
    },
    {
      "id": "lee2023",
      "year": 2023,
      "authors": "Jongheon Lee, Sokjoon Lee, You-Seok Lee, Dooho Choi",
      "title": "T-depth reduction method for efficient SHA-256 quantum circuit construction",
      "venue": "IET Information Security, Vol. 17, No. 1, pp. 46-65, DOI 10.1049/ise2.12074",
      "url": "https://doi.org/10.1049/ise2.12074",
      "pdf": "https://ietresearch.onlinelibrary.wiley.com/doi/pdf/10.1049/ise2.12074",
      "circuits": [
        {
          "name": "SHA-Z1",
          "qubits": 768,
          "tDepth": 43510,
          "toffoliDepth": 32895,
          "selected": true,
          "notes": "Lowest logical-qubit count published to date (768). Uses HRS and TK-v1 adders."
        },
        {
          "name": "SHA-Z2",
          "qubits": 797,
          "tDepth": 16055,
          "toffoliDepth": 12023,
          "notes": "Uses VBE, TK-v1 and TK-v3 adders."
        },
        {
          "name": "SHA-Z3",
          "qubits": 927,
          "tDepth": 7304,
          "toffoliDepth": 6914,
          "notes": "Uses VBE, TK-v3 and QCLA. Better time-space trade-off than SHA-C5/C6."
        },
        {
          "name": "SHA-Z4",
          "qubits": 962,
          "tDepth": 4936,
          "toffoliDepth": 4418,
          "selected": true,
          "notes": "Lowest Toffoli-depth published to date (4418). Uses QCLA and TK-v2 adders."
        }
      ],
      "improvement": "Reduced the critical path to three adders and applied a T-depth reduction trick. Produced the lowest published qubit count (768, SHA-Z1) and the lowest published Toffoli-depth (4418, SHA-Z4).",
      "selected": true
    },
    {
      "id": "dallairedemers2026",
      "year": 2026,
      "authors": "Pierre-Luc Dallaire-Demers",
      "title": "Kardashev scale Quantum Computing for Bitcoin Mining",
      "venue": "arXiv:2603.25519 [quant-ph]",
      "url": "https://arxiv.org/abs/2603.25519",
      "pdf": "https://arxiv.org/pdf/2603.25519.pdf",
      "circuits": [
        {
          "name": "Double-SHA-256 header oracle (per-compression normalized)",
          "qubits": 833,
          "toffoliCount": 43944,
          "toffoliDepth": 38120,
          "tCount": 101376,
          "selected": true,
          "notes": "Full Bitcoin double-SHA-256 oracle uses 833 logical qubits, 131,832 total Toffoli gates and 114,360 Toffoli-depth across three SHA-256 compressions. The values here divide the totals by three for rough comparability with single-compression circuits."
        },
        {
          "name": "RIPEMD-160(SHA-256) P2PKH oracle",
          "qubits": 1153,
          "toffoliCount": 88990,
          "toffoliDepth": 200960,
          "tCount": 200960,
          "notes": "Forward evaluation of the Bitcoin P2PKH hash pipeline. Peak width includes a 256-qubit buffer for the intermediate SHA-256 digest."
        }
      ],
      "improvement": "First end-to-end physical-qubit and energy estimate for Grover Bitcoin mining. Shows that practical quantum mining collapses under oracle, distillation and fleet overhead at mainnet difficulty.",
      "selected": true
    }
  ],
  "frontier": [
    {
      "year": 2016,
      "metric": "logical-qubits",
      "value": 2402,
      "paperId": "amy2016",
      "circuitName": "Amy et al. SHA-256"
    },
    {
      "year": 2018,
      "metric": "logical-qubits",
      "value": 801,
      "paperId": "kim2018",
      "circuitName": "SHA-C1"
    },
    {
      "year": 2023,
      "metric": "logical-qubits",
      "value": 768,
      "paperId": "lee2023",
      "circuitName": "SHA-Z1"
    },
    {
      "year": 2016,
      "metric": "toffoli-depth",
      "value": 70400,
      "paperId": "amy2016",
      "circuitName": "Amy et al. SHA-256"
    },
    {
      "year": 2018,
      "metric": "toffoli-depth",
      "value": 10112,
      "paperId": "kim2018",
      "circuitName": "SHA-C6"
    },
    {
      "year": 2023,
      "metric": "toffoli-depth",
      "value": 4418,
      "paperId": "lee2023",
      "circuitName": "SHA-Z4"
    }
  ],
  "aiEstimates": [
    {
      "model": "Claude (Anthropic)",
      "estimateLogicalQubits": 2402,
      "source": "Claude Code CLI",
      "citation": "Amy, Di Matteo, Gheorghiu, Mosca, Parent & Schanck (2016), \"Estimating the cost of generic quantum pre-image attacks on SHA-2 and SHA-3\", SAC 2016.",
      "notes": "Also noted newer optimizations (2021-2024) may reach 1,500-2,200 qubits depending on depth/width trade-offs, but cited no specific paper."
    },
    {
      "model": "Kimi (Moonshot)",
      "estimateLogicalQubits": 2402,
      "fullFaultTolerantEstimate": "2^12.6 ≈ 6,300 logical qubits",
      "source": "Kimi Code CLI",
      "citation": "Amy et al., arXiv:1603.09383 [quant-ph] / DOI 10.1007/978-3-319-69453-5_18",
      "notes": "Distinguished oracle circuit (2,402) from full fault-tolerant Grover engine (~6,300)."
    },
    {
      "model": "Codex (OpenAI)",
      "estimateLogicalQubits": 2402,
      "fullFaultTolerantEstimate": "2^12.6 ≈ 6,200 logical qubits",
      "source": "OpenAI Codex CLI",
      "citation": "Matthew Amy et al., \"Estimating the cost of generic quantum pre-image attacks on SHA-2 and SHA-3\", arXiv:1603.09383",
      "notes": "Confirmed the oracle figure against the local dataset."
    },
    {
      "model": "Pi (Inflection/Google)",
      "status": "unavailable",
      "reason": "CLI returned HTTP 429 (usage limit reached; resets 2026-06-22 19:02:46)."
    },
    {
      "model": "Grok (xAI)",
      "status": "unavailable",
      "reason": "No Grok CLI available and grok.com/x.ai requires web authentication; no API key present in environment."
    }
  ],
  "relatedWork": [
    {
      "id": "lim2024",
      "year": 2024,
      "authors": "Sejin Lim, Yujin Oh, Hyunjun Kim, Anubhab Baksi, Sumanta Chakraborty, Hwajeong Seo",
      "title": "Quantum Implementation and Analysis of SHA-2 and SHA-3",
      "venue": "IACR ePrint 2024/513",
      "url": "https://eprint.iacr.org/2024/513",
      "notes": "Targets NIST level-2/4 collision search (BHT) rather than Grover preimage. Reports a SHA-2-256 circuit with 5,715 qubits and Toffoli-depth 3,382. Higher width makes it worse on the sha2.fail qubit×Toffoli metric than Lee et al. SHA-Z4, so it is listed as related work, not a frontier improvement for preimage oracles."
    },
    {
      "id": "jang2025",
      "year": 2025,
      "authors": "Kyungbae Jang, Gwonhwan Song, Hyunjun Kim, Hwajeong Seo",
      "title": "Quantum Implementation and Analysis of SHA-2 and SHA-3",
      "venue": "IEEE Transactions on Computers, DOI 10.1109/TC.2025.3524625",
      "url": "https://www.computer.org/csdl/journal/ec/2025/03/10918610/24TAwzYS2Ck",
      "notes": "2025 journal paper presenting improved SHA-2/SHA-3 quantum circuits. Exact single-compression numbers are paywalled in the IEEE version; the work is included as the most recent peer-reviewed SHA-2 circuit study."
    },
    {
      "id": "song2024",
      "year": 2024,
      "authors": "Gwonhwan Song, Kyungbae Jang, Hyunjun Kim, Hwajeong Seo",
      "title": "Grover on Scrypt",
      "venue": "Hansung University repository / to appear",
      "url": "https://dspace.hansung.ac.kr/handle/2024.oak/10345",
      "pdf": "https://dspace.hansung.ac.kr/bitstream/2024.oak/10345/2/AR_R1A1A1_Grover%20on%20Scrypt.pdf",
      "notes": "Constructs a SHA-256 circuit for the PBKDF2 inner loop inside scrypt. Reports 17,100 qubits, 58,448 Toffoli gates and 137,888 CNOTs for the SHA-256 stage. Not a standalone SHA-256 compression improvement, but a concrete 2024 SHA-256 implementation."
    },
    {
      "id": "lee2024sha3",
      "year": 2024,
      "authors": "Jongheon Lee, Yousung Kang, You-Seok Lee, Boheung Chung, Dooho Choi",
      "title": "Toffoli-depth reduction method preserving in-place quantum circuits and its application to SHA3-256",
      "venue": "Quantum Information Processing 23(4):153",
      "url": "https://link.springer.com/article/10.1007/s11128-024-04365-2",
      "pdf": "https://link.springer.com/content/pdf/10.1007/s11128-024-04365-2.pdf",
      "notes": "Improves SHA3-256 rather than SHA-256, reducing width to 1600 qubits and T-depth to 264. Included because the same Toffoli-depth methodology is applicable to SHA-2 designs."
    },
    {
      "id": "dallairedemers2026related",
      "year": 2026,
      "authors": "Pierre-Luc Dallaire-Demers",
      "title": "Kardashev scale Quantum Computing for Bitcoin Mining",
      "venue": "arXiv:2603.25519 [quant-ph]",
      "url": "https://arxiv.org/abs/2603.25519",
      "pdf": "https://arxiv.org/pdf/2603.25519.pdf",
      "notes": "End-to-end physical-qubit, surface-code and energy estimate for Grover-based Bitcoin mining. The double-SHA-256 oracle uses 833 logical qubits, 131,832 Toffoli gates and 114,360 Toffoli-depth. Also models RIPEMD-160(SHA-256) P2PKH preimages."
    }
  ],
  "qubitEstimates": {
    "logical_qubits_for_single_sha256_oracle": {
      "best_known_min": 768,
      "best_known_tradeoff": 962,
      "baseline": 2402,
      "source": "Lee et al. 2023 (SHA-Z1) / Kim et al. 2018 / Amy et al. 2016"
    },
    "physical_qubits_for_full_grover_preimage_attack": {
      "estimate": "~1.39 × 10^7",
      "source": "Amy et al. 2016 surface-code estimate",
      "note": "This assumes a surface code with optimistic per-gate error rates and includes magic-state distillation. Later circuit optimizations reduce logical qubits and depth, but physical-qubit estimates depend on the chosen error-correction scheme and have not been recomputed for SHA-Z1/Z4."
    },
    "sha2fail_baseline_estimate": {
      "note": "The sha2.fail harness scores Toffoli count × peak qubits. Published papers do not always report Toffoli count, so the graph below uses qubits and Toffoli-depth. A first-order proxy score (qubits × Toffoli-depth) is shown for comparison only.",
      "proxy_scores": {
        "Amy et al. 2016": 2402,
        "Kim et al. SHA-C6": 9486256,
        "Lee et al. SHA-Z1": 25263360,
        "Lee et al. SHA-Z4": 4250116,
        "Dallaire-Demers 2026 (per compression)": 31753960
      }
    }
  },
  "ecdsaFrontier": {
    "description": "ECDSA/secp256k1 point-addition frontier, mirrored from ecdsa.fail. The score is qubits × Toffoli gates; lower is better.",
    "points": [
      {
        "year": 2023,
        "name": "Litinski '23",
        "qubits": 3000,
        "toffoli": 8190000,
        "score": 24570000000,
        "source": "ecdsa.fail frontier tooltip; previous best published circuit construction on the qubit-Toffoli product metric."
      },
      {
        "year": 2026,
        "name": "Current best submission",
        "qubits": 1156,
        "toffoli": 1366238,
        "score": 1579371128,
        "source": "ecdsa.fail /api/benchmarks (benchmark 1ffb695a-309b-46b6-a728-2f97d8c7be74), retrieved 2026-06-22."
      }
    ],
    "references": [
      {
        "year": 2026,
        "name": "Google 2026 low-gate (full ECDLP)",
        "qubits": 1450,
        "toffoli": 70000000,
        "score": 101500000000,
        "source": "Babbush et al., Securing Elliptic Curve Cryptocurrencies against Quantum Vulnerabilities, arXiv:2603.28846."
      }
    ]
  }
}
