{"id":20521377,"url":"https://github.com/salfaris/zxfibonacci","last_synced_at":"2026-04-20T07:33:21.958Z","repository":{"id":251916856,"uuid":"838829344","full_name":"salfaris/zxfibonacci","owner":"salfaris","description":"Fibonacci numbers on quantum computers with only Clifford+T hardware","archived":false,"fork":false,"pushed_at":"2025-10-27T21:24:23.000Z","size":182,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T23:16:35.068Z","etag":null,"topics":["python","pyzx","qiskit","quantum-computing","zx-calculus"],"latest_commit_sha":null,"homepage":"https://salfaris.github.io/posts/2024-08-04-quantum-fibonacci/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/salfaris.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-06T12:28:56.000Z","updated_at":"2025-10-27T21:24:28.000Z","dependencies_parsed_at":"2024-08-06T14:49:51.650Z","dependency_job_id":"753e2be2-6f10-46db-9129-5c0c38453e03","html_url":"https://github.com/salfaris/zxfibonacci","commit_stats":null,"previous_names":["salfaris/zxfibonacci"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/salfaris/zxfibonacci","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salfaris%2Fzxfibonacci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salfaris%2Fzxfibonacci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salfaris%2Fzxfibonacci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salfaris%2Fzxfibonacci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salfaris","download_url":"https://codeload.github.com/salfaris/zxfibonacci/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salfaris%2Fzxfibonacci/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32037860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","pyzx","qiskit","quantum-computing","zx-calculus"],"created_at":"2024-11-15T22:28:36.302Z","updated_at":"2026-04-20T07:33:21.934Z","avatar_url":"https://github.com/salfaris.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fibonacci in the ZX calculus\n\n**ZXFibo:** A simple quantum algorithm to compute Fibonacci numbers based on Clifford+T hardware.\n\n\n\u003cimg src=\"./docs/zxfibo.png\" width=\"60%\"\u003e\n\nFor correctness proof of **ZXFibo** using ZX-calculus, read my August 2024 blog post here: [A benchmark for testing quantum computers with Clifford+T hardware](https://salfaris.github.io/posts/2024-08-04-quantum-fibonacci/).\n\n## Usage\n\n1. Clone this repo.\n```bash\ngit clone https://github.com/salfaris/zxfibonacci\n```\n2. Install dependencies from requirements: PyZX, Qiskit and matplotlib.\n3. Run the hello world script below which compares the result of classical and quantum Fibonacci algorithms:\n\n```python\nfrom zxfibo import zxfibo\n\ndef fibo(n):\n    \"\"\"Classical Fibonacci algorithm.\"\"\"\n    if n == 1: return 1\n    if n == 2: return 2\n    return fibo(n-1) + fibo(n-2)\n\nN = 9\nprint(\"Quantum:\", end=\" \")\nfor i in range(2, N):\n    print(zxfibo(i), end=\" \")\nprint()\nprint(\"Classical:\", end=\" \")\nfor i in range(2, N):\n    print(fibo(i), end=\" \")\n\n\u003e\u003e\u003e Quantum: 3 5 8 13 21 34 55 \n\u003e\u003e\u003e Classical: 3 5 8 13 21 34 55 \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalfaris%2Fzxfibonacci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalfaris%2Fzxfibonacci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalfaris%2Fzxfibonacci/lists"}