{"id":20669490,"url":"https://github.com/iitis/variational_channel_fidelity","last_synced_at":"2025-07-20T10:34:44.088Z","repository":{"id":141460765,"uuid":"440195163","full_name":"iitis/variational_channel_fidelity","owner":"iitis","description":"Qiskit source code for variational fidelity estimation for quantum channels. Sub-project in the scope of QProgMods grant.","archived":false,"fork":false,"pushed_at":"2023-04-24T11:50:01.000Z","size":712,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-06T00:41:55.563Z","etag":null,"topics":["quantum-channel","quantum-computing","quantum-mechanics"],"latest_commit_sha":null,"homepage":"https://miszczak.eu/grants/qprogmods/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iitis.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":"2021-12-20T14:16:31.000Z","updated_at":"2024-08-01T07:23:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a86fa77-96e7-4ad8-af82-7b6ebf36fbf3","html_url":"https://github.com/iitis/variational_channel_fidelity","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/iitis/variational_channel_fidelity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2Fvariational_channel_fidelity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2Fvariational_channel_fidelity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2Fvariational_channel_fidelity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2Fvariational_channel_fidelity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iitis","download_url":"https://codeload.github.com/iitis/variational_channel_fidelity/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2Fvariational_channel_fidelity/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266111439,"owners_count":23877980,"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":["quantum-channel","quantum-computing","quantum-mechanics"],"created_at":"2024-11-16T20:14:32.875Z","updated_at":"2025-07-20T10:34:44.064Z","avatar_url":"https://github.com/iitis.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n[![DOI](https://zenodo.org/badge/440195163.svg)](https://zenodo.org/badge/latestdoi/440195163)\n\n\n\n# variational channel fidelity estimation\nSource code used for variational quantum fidelity estimation for quantum channels.\n\n## Quick start\n\n### \n\n1. Run `generator.py` to produce a sample of random channels. By default 1000 channels are generated.\n2. Run `vqcd_optimization.py n`, where `n` is the index of the channel generated in the previous steps.\n3. Run `vqcd_all_chan.py`, to generate and save the average error in fidelity estimation with respect to rank of the state.\n4. Run `vqcd_single_chan.py` to generate and save the error in fidelity estimation for the lowest error channel. Note to generate the lowest error quantum channel run `lowest_error_channel.py`, which saves the channel number with lowest error.\n3. Run `vqcd_plot.py` to generate and save the plots. \n\n## Description\n\nThis repository contains source code for running diagonalization procedure as well as to estimate fidelity (error in fidelity estimation) for `1` and `2` qubit channels.\n\n## Code for quantum channels \n\nThe main folder contains the following files:\n\n* `generate.py` for generating random channels. The generated channels are saved in the `data` subdirectory,\n\n* `vqcd_main_funcs.py` contains the main subroutines of the diagonalization and fidelity estimation algorithm as follows \n  * `cost_func` cost function evaluation, \n  * `eig_info` inferred eigenvalues generation and \n  * `trun_output` (truncated fidelity bounds estimation) functions.\n\n* `vqcd_secondary_funcs.py` contains secondary subroutines as follows\n  * `jamilchoi` generates Choi–Jamiołkowski (JC) state of any dimension quantum channel,\n  * `purity_before_diag` gives the purity of the state before diagonalization,\n  * `maximum_likelihood` performs maximum-likelihood to avoid negative eigenvalues.\n\n* `vqcd_optimization.py n`, where `n` is the index of the channel generated (if no `n` provided then the index by default is `0`) to run optimization procedure for random quantum channels, by default the optimized angles are saved in `data/opt_ang_test` subfolder,\n\n* `vqcd_all_chan.py` for finding the average error in fidelity estimation (by default the channel number set to `1000`), by default the average error for each channel are saved in `data/fid_plot_data_test` subfolder,\n\n* `vqcd_single_chan.py` for finding the convergence of fidelity with rank of the state for a particular quantum channel, by default the average error for each channel are saved in `data/fid_plot_data_test` subfolder,\n\n* `vqcd_plot.py` for plotting the results and contains two subroutines as follows\n  * `average_fidelity` returns plot for average fidelity estimation error for a defined total number of channels,\n  * `single_chan_fidelity` returns plot for a single channel depicting truncated fidelity bound in respect with rank of the JC state.\nPlots are saved in `plot` subdirectory\n\n\n## Folder `text` \nThis folder is a placeholder for the preprint files.\n\n## License\n\nThis code can be distributed under the Apache License.\n\n## Installation and requirements\n\nPython scripts in this repository have been tested with\n* qiskit (0.18.2)\n* numpy (1.21.2)\n* scipy (1.7.1)\n\nTo install the recent version of Qiskit run \n    \n    !pip install qiskit==0.18.2\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitis%2Fvariational_channel_fidelity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiitis%2Fvariational_channel_fidelity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitis%2Fvariational_channel_fidelity/lists"}