php中文网 | cnphp.com

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 797|回复: 0

此源代码用于实现<https://arxiv.org abs 1807.01852>中提出的算法

[复制链接]

3138

主题

3148

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

UID
1
威望
0
积分
7946
贡献
0
注册时间
2021-4-14
最后登录
2024-11-21
在线时间
762 小时
QQ
发表于 2024-2-23 20:42:14 | 显示全部楼层 |阅读模式
【代码名称】: 此源代码用于实现<https://arxiv.org abs 1807.01852>中提出的算法

【代码介绍】: 此源代码用于实现<https://arxiv.org abs 1807.01852>中提出的算法

【代码截图】:文件列表:

Dataset_Generator.m (5613, 2018-07-05)
Dataset_Postprocessor.m (5927, 2018-07-05)
Dataset_Processor.m (5002, 2018-07-05)
Example.m (1484, 2018-07-05)
Generate_Projectors.m (5751, 2018-07-05)
LS_Estimator.m (5614, 2018-07-05)
MEG_Estimator.m (2683, 2018-07-05)
ML_Estimator.m (3956, 2018-07-05)
onlineEstimator.m (2626, 2018-07-05)



This is list of the files in the folder and their description: -- DataSet_Generator.m: This file defines the function to generate the dataset for using with the quantum state estimation algorithm. The output for a single instance of the dataset is a .MAT file that includes the following records:*The Density matrix representing the true quantum state*The index of the measurement operator randomly selected each iteration (datapoint). The operators themselves can be generated fromthe function defined in "Generate_Projectors.m". The indices are formatted as a row vector of length equal to the number of iterations*The "up" outcome due to measurement at each iteration formatted as a matrix with rows corresponding to the different number of shots, andcolumns representing different time instants*The number of shots used in each setting formatted as a row vector The files are arranged in the following folder structurecurrent_path$-->1_qubits-->Data-->"Experiment_1.mat"-->"Experiment_2.mat"-->...etc.-->Results-->1_nShots-->2_nShots...etc.-->2_qubits-->Data-->"Experiment_1.mat"-->"Experiment_2.mat"-->...etc.-->Results-->1_nShots-->2_nShots...etc.....etc. The "Results" folder will be empty, but wll be filled later by the script "Dataset_Processor.m" -- Datset_Processor.m: This file defines the function that processes the dataset by performing quantum state estimation for each true state given a particular scenario (qubit number / number of measurement shots). Three estimators are used: Matrix Exponentiated Gradient, Diluted Maximum Likelihood, and Least-squares. The infidelity between the estimate at each iteration and the true state is calculated. The results are stored in a .MAT file that includes the following records:* The MEG estimator object after finishing all iterations* The ML estimator object after finishing all iterations* The LS estimator object after finishing all iterations* The infidelity record for the MEG estimator* The infidelity record for the ML estimator* The infidelity record for the LS estimator -- Datset_Postrocessor.m: This script generates the plots corresponding to the results obtained by running the script "Dataset_Processor.m". For each possible scenario (number of qubits/number of shots), the generated plots are the average infidelity versus number of iterations for each estimatoras well as the interquartile range plot for the average infdelity versus number of iterations for each estimator. The plots are then exported as .PNG and .EPS formats. -- Example.m: This script is an example of generating the dataset and processing it to produce the results -- OnlineEstimator.m: This file contains the definition of the base class of from which the other estimator classes are derived from. -- ML_Estimator.m: This file contains the class definition of the diluted maximum likelihood estimator. -- MEG_Estimator.m: This file contains the class definition of the Matrix exponentiated gradient estimator. -- LS_Estimator.m: This file contains the class definition of the least-squares estimator. --Generate_Projectors.m: This file contains the definition of the function that generates global Pauli operators acting on qubit systems of anynumber of qubits, by tensoring local Pauli operators on individual qubits. Since all local Pauli's have two outcome "up/down" correpsonding to the+1/-1 eigenvalues, the global operators will have the same property. So, this function returns the two global projectors for "up/down" outcomes.

【代码下载】: pudn4788376.zip (14.48 KB, 下载次数: 0)





上一篇:httpsarxiv.org abs 1802.09022中算法的实现
下一篇:模拟退火算法源码及相关论文,代码有详细注释,配以论...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|php中文网 | cnphp.com ( 赣ICP备2021002321号-2 )

GMT+8, 2024-11-21 18:24 , Processed in 0.991556 second(s), 44 queries , Gzip On.

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2020, Tencent Cloud.

申明:本站所有资源皆搜集自网络,相关版权归版权持有人所有,如有侵权,请电邮(fiorkn@foxmail.com)告之,本站会尽快删除。

快速回复 返回顶部 返回列表