{"id":18522834,"url":"https://github.com/xanaduai/constrained-quantum-learning","last_synced_at":"2025-06-13T10:09:37.681Z","repository":{"id":95920887,"uuid":"148740735","full_name":"XanaduAI/constrained-quantum-learning","owner":"XanaduAI","description":" This repository contains the source code used to produce the results presented in the paper \"Near-deterministic production of universal quantum photonic gates enhanced by machine learning\".","archived":false,"fork":false,"pushed_at":"2019-07-10T14:25:36.000Z","size":16,"stargazers_count":22,"open_issues_count":0,"forks_count":9,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-13T10:08:22.948Z","etag":null,"topics":["machine-learning","optimization","photonics","quantum","quantum-computing","quantum-machine-learning","quantum-optics"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/1809.04680","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/XanaduAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-09-14T05:39:30.000Z","updated_at":"2025-02-15T09:14:04.000Z","dependencies_parsed_at":"2023-03-13T16:41:41.058Z","dependency_job_id":null,"html_url":"https://github.com/XanaduAI/constrained-quantum-learning","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/XanaduAI/constrained-quantum-learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XanaduAI%2Fconstrained-quantum-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XanaduAI%2Fconstrained-quantum-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XanaduAI%2Fconstrained-quantum-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XanaduAI%2Fconstrained-quantum-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/XanaduAI","download_url":"https://codeload.github.com/XanaduAI/constrained-quantum-learning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/XanaduAI%2Fconstrained-quantum-learning/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259624737,"owners_count":22886330,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["machine-learning","optimization","photonics","quantum","quantum-computing","quantum-machine-learning","quantum-optics"],"created_at":"2024-11-06T17:33:12.871Z","updated_at":"2025-06-13T10:09:37.672Z","avatar_url":"https://github.com/XanaduAI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Constrained quantum learning\n\n### Using machine learning to train a Gaussian quantum circuit with PNRs to produce cubic phase resource states with high fidelity and probability.\n\n\nThis repository contains the source code used to produce the results presented in *\"Near-deterministic production of universal quantum photonic gates enhanced by machine learning\"* [arXiv:1809.04680](https://arxiv.org/abs/1809.04680).\n\n## Contents\n\nThe following two scripts perform a constrained variational quantum circuit optimization, using both a global search (basin hopping) and a local search (BFGS optimization) to maximize the fidelity (and probability of generating) the cubic phase resource state in the last mode.\n\n* `two_mode.py`: a Python script to generate the results of the two-mode gadget architecture presented in the paper. Here, a two mode squeezed displaced state is incident on a beamsplitter, with the first mode measured by a photon-number resolving detector.\n\n* `three_mode.py`: a Python script to generate the results of the three-mode gadget architecture presented in the paper. Here, a three mode squeezed displaced state is incident on an interferometer consisting of three beamsplitters, with the first and second modes measured by photon-number resolving detectors.\n\n\n## Requirements\n\nTo construct and optimize the constrained variational quantum circuits, these scripts use the Fock backend of [Strawberry Fields](https://github.com/XanaduAI/strawberryfields). In addition, SciPy is required for use of the global Basin Hopping optimization method, as well as the local BFGS optimization method.\n\n## Authors\n\nKrishna Kumar Sabapathy, Haoyu Qi, Josh Izaac, and Christian Weedbrook.\n\nIf you are doing any research using this source code and Strawberry Fields, please cite the following two papers:\n\n\u003e Krishna Kumar Sabapathy, Haoyu Qi, Josh Izaac, and Christian Weedbrook.  Near-deterministic production of universal quantum photonic gates enhanced by machine learning. arXiv, 2018. [arXiv:1809.04680](https://arxiv.org/abs/1809.04680)\n\n\u003e Nathan Killoran, Josh Izaac, Nicolás Quesada, Ville Bergholm, Matthew Amy, and Christian Weedbrook. Strawberry Fields: A Software Platform for Photonic Quantum Computing. arXiv, 2018. [Quantum, 3, 129](https://quantum-journal.org/papers/q-2019-03-11-129/) (2019).\n\n## License\n\nThis source code is free and open source, released under the Apache License, Version 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxanaduai%2Fconstrained-quantum-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxanaduai%2Fconstrained-quantum-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxanaduai%2Fconstrained-quantum-learning/lists"}