{"id":23813979,"url":"https://github.com/markf94/ibmq_code_epl_119_60002","last_synced_at":"2025-09-06T23:31:46.529Z","repository":{"id":60204844,"uuid":"114695823","full_name":"markf94/ibmq_code_epl_119_60002","owner":"markf94","description":"Code that was used to generate the results for the publication 'Implementing a distance-based classifier with a quantum interference circuit' by Schuld, Fingerhuth and Petruccione (2017). ","archived":false,"fork":false,"pushed_at":"2018-12-31T11:50:01.000Z","size":29,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2023-06-03T11:50:15.773Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/markf94.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}},"created_at":"2017-12-18T22:55:48.000Z","updated_at":"2022-09-26T16:19:01.000Z","dependencies_parsed_at":"2022-09-26T17:50:16.606Z","dependency_job_id":null,"html_url":"https://github.com/markf94/ibmq_code_epl_119_60002","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markf94%2Fibmq_code_epl_119_60002","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markf94%2Fibmq_code_epl_119_60002/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markf94%2Fibmq_code_epl_119_60002/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markf94%2Fibmq_code_epl_119_60002/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markf94","download_url":"https://codeload.github.com/markf94/ibmq_code_epl_119_60002/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232149970,"owners_count":18479563,"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":[],"created_at":"2025-01-02T03:46:06.389Z","updated_at":"2025-01-02T03:46:06.943Z","avatar_url":"https://github.com/markf94.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What is this?\n\nThis repo contains the code that was used to generate the results for the publication\n'Implementing a distance-based classifier with a quantum interference circuit' by Schuld, Fingerhuth and Petruccione (2017).\nThe article was published in Europhysics Letters on December 1st 2017 and is an Editor's Choice article.\n\nArticle DOI:\nhttps://doi.org/10.1209/0295-5075/119/60002\n\narXiv link:\nhttps://arxiv.org/pdf/1703.10793.pdf\n\n# How to make use of this repository?\n\nUpdate Nov. 2018: I've rewritten the old QASM code in Python 3.7 and the newest Qiskit.\n\nThe file `qiskit_distance_based_classifier.py` contains the `DistanceBasedClassifier` class which performs the classification\nof the two Iris flower datapoints `x'` and `x''` that were used in the original publication.\n\nYou can run the code with the following command:\n\n```\n$ python3 qiskit_distance_based_classifier.py\n```\n\nThe printed information should be self-explanatory. Note, that the simulation is performed with the new IBM Aer QASM simulator.\n\nFor everyone who wants to dive deeper, the subdirectory `old_qasm_files` contains the old files written in quantum assembly language (QASM), which is the OG programming language used by the online interface\nof the IBM Quantum Experience. In order to execute these files you have several options:\n\na) make an account with the IBM Quantum Experience, start a new Experiment and then simply copy \u0026 paste the code from one of the two QASM files into the QASM Editor in the IBM online interface. Then you can either simulate or run the defined quantum circuit on the actual chip.\n\nb) import the QASM file into Qiskit by using the `qiskit.wrapper._wrapper.load_qasm_file` method from Qiskit. For documentation [see here](https://qiskit.org/documentation/_autodoc/qiskit.wrapper._wrapper.html?highlight=load%20qasm#qiskit.wrapper._wrapper.load_qasm_file).\n\nNOTE: These QASM files were specifically written for the ibmqx2 bowtie chip with 5 qubits.\n\nThe `old_qasm_files` directory contains the following two files:\n\n- `x0_class0_classification.qasm` Classification of the input vector x' as discussed in the EPL publication.\n\n- `x1_class0_classification.qasm` Classification of the input vector x'' as discussed in the EPL publication.\n\n--------------------------------------------------------------------------------------------------\n\nIf you happen to use this code please cite our paper:\n\nSchuld, M., Fingerhuth, M., \u0026 Petruccione, F. (2017). Implementing a distance-based classifier with a quantum interference circuit. EPL (Europhysics Letters), 119(6), 60002.\n\nbibTex:\n```\n@article{schuld2017implementing,\n  title={Implementing a distance-based classifier with a quantum interference circuit},\n  author={Schuld, Maria and Fingerhuth, Mark and Petruccione, Francesco},\n  journal={EPL (Europhysics Letters)},\n  volume={119},\n  number={6},\n  pages={60002},\n  year={2017},\n  publisher={IOP Publishing}\n}\n```\n\n\n*The code is published open-source under a standard MIT License. Feel free to download, modify, use and multiply!*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkf94%2Fibmq_code_epl_119_60002","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkf94%2Fibmq_code_epl_119_60002","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkf94%2Fibmq_code_epl_119_60002/lists"}