量子计算 QLib -matlib的量子模拟软件包

01 QLib库简介

QLib是matlib的量子模拟软件包。开源免费。

QLib是特拉维夫大学物理与天文学院量子基金会和信息组的开源matlib组件包。

在《量子图像处理及应用》一书中提到了对QLib 量子模拟软件包的使用。

《量子图像处理及应用》闫飞, 杨华民, 蒋振刚/著,科学出版社 2016年5月第一版。中第70页中提到MCQI图像操作实例使用了matlib的QLib包.论文连接:([115]Machnes S. QLib-a matlib package for quantum information theory calculations with applications. arXiv:0708.0478 [quant-ph], 2007.)https://arxiv.org/abs/0708.0478
这是一片2007年的论文,图文并茂。论文中的www.qlib.info我没访问成功。

在下面的网站找到了QLib的QLib_v_1_0版本。
http://www.tau.ac.il/~quantum/qlib/qlib.html
QLib_v_1_0.zip下载:http://www.tau.ac.il/~quantum/qlib/QLib_v_1_0.zip

简单的使用教程:http://www.tau.ac.il/~quantum/qlib/intro.html

02 QLib包的使用

下载后解压到某个目录,然后再matlib代码里包含进Qlib包路径,即可使用。
在R2016b中测试使用正常。
按照http://www.tau.ac.il/~quantum/qlib/intro.html的介绍,运行如下代码:

addpath ('D:\git\Quantum\QLib_v_1_0'); qlib;

pure = param_pure_1_rand([2 2])     % Generate a random pure state of two qubits.
is_entangled_pt(pure)     % Is this state entangled? (Peres-Horodecki criteria)

neg = []; con = [];
for k=1:1000
    dm = param_dm_2x_rand([2 2]);
    neg(k) = negativity(dm);
    con(k) = concurrence(dm);
end
scatter(neg,con,2);

运行结果如下:

QLIB - Quantum Information computation library, v1.0
(c) Shai Machnes 2006-2007, Quantum Information and Foundations Group, Tel-Aviv University
email: machness at post.tau.ac.il

All computer programs/code/scripts are released under the terms of the GNU Lesser General Public License 3.x, except where explicitly stated otherwise. Everything else (documentation, algorithms, etc) is licensed under the Creative Commons Attribution-Share Alike 2.5 License (see "LICENSE.txt" for details)

If you use QLib in your research, please add an attribution in the form of the following reference: S. Machnes, quant-ph/0708.0478
For the latest version, guides and information, visit http://www.qlib.info
Type "help qlib" for intro and a list of functions.

QLIB initialized successfully.


pure =

   0.4361 + 0.0000i
  -0.0710 - 0.4256i
   0.1950 - 0.7229i
   0.2503 - 0.0208i


ans =

     1

qlib运行demo

03 QLib库目录结构:

demos
dm
entropy_and_entanglement
geometry
measurements
parametrizations
utils
LICENSE.txt
qlib.m
qlib_init.m
README.txt
release_notes.txt
startup.m

qlib运目录结构

04 QLib库提供的demo.

demo_check_entropy_measure_additivity.m
demo_check_SU_over_U_does_span.m
demo_dense_coding.m
demo_dist_measures.m
demo_factoring_of_dm.m
demo_fidelity_vs_dist_trace.m
demo_log_mat_and_prod_gens_for_exponent_decomp.m
demo_negativity_scale.m
demo_reconstructing_param_sep.m
demo_show_SU_decomposition.m
demo_SU_comm.m
demo_SU_param_equiv.m
demo_teleport.m
demo_test_distance_measure.m
demo_werner_measures.m

qlib demo

QLib简介

#What is QLib?

QLib is a Matlab package intended to provide a wide audience within the QIT community with the tools needed to accelerate research by 

•Quickly and efficiently framing and exploring questions
•Forming intuition through the use of visualizations
•Ruling-out or validating hypothesis through the use of optimization
QLib currently covers most, if not all, of the "textbook" primitives and provides us with a rich toolset with which to advance knowledge in out field and engage in "experimental theory". 

# What's in it? What is QLib capable of?
Current capabilities include: 

•Objects of interest ◦Classical probability distributions
◦Pure states
◦Density matrices (including special handling of the separable subspace)
◦Unitary (U(n) and SU(n) & Hermitian matrices
All of which with arbitrary dimensionality - any number of particles of any dimension 

•Entanglement: PT (Peres Horodecki) test, entanglement, concurrence, negativity, tangle, logarithmic negativity, ent. of formation, relative entanglement, robustness, singlet fraction 

•Entropy: Shannon, Von Neumann, linear entropy, relative entropy, participation ratio, purity 

•Measurement: Orthogonal (collapse or mixture), POVM, weak 

•Basic object handling ◦Reorder particles, partial trace, partial transpose
◦See objects in the regular representation or as tensor with index per particle
◦Convert to/from computational base to SU(n)
◦Miscellaneous: Schmidt decomposition, famous states, famous gates

•Distance measures: Hilbert-Schmidt, trace distance, fidelity, Kullback-Leibler, Bures, Bures Angle, Fubini-Study 

•Miscellaneous: Majorization, mutual information, spins in 3D 

•Strong optimization infrastructure
 All of the objects above are points in the appropriate parameter space, enabling search, generation of random elements, etc. 

•General purpose utilities: ◦Linear algebra (e.g. Gram Schmidt, spanning using base matrices)
◦Numerics: approximately compare, epsilon tensor, etc, etc
◦Graphics: quickly plot out functions

•Demos: Covering many of QLib's capabilities 

•Help: Just type "help qlib" for an overview or get help on every individual function 

For a full list of features and capabilities, see here. 

还有个 http://www.tau.ac.il/~quantum/qlib/DYNAMO_v_1_2.zip,是升级版本。

如有错误之处,欢迎批评指正。QQ群:579809480。

  • 4
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值