Reduced density matrix and partial trace

The reduced matrix is defined as the partial trace of the density matrix. In linear algebra and functional analysis, the partial trace is a generalization of the trace. Whereas the trace is a scalar valued function on operators, the partial trace is an operator-valued function. The partial trace has applications in quantum information and decoherence which is relevant for quantum measurement and thereby to the decoherent approaches to interpretations of quantum mechanics, including consistent histories and the relative state interpretation.

more ...

ipynb2pelican Plugin released!

Yet another Pelican Plugin for blogging with Jupyter Notebooks using MetaCell to store metadata.

Thanks to super cow power of python, we can finally publish ipynb easily! Below is the …

more ...

24 Game Solver

24 game is an arithmetic game with a simple rule: Given 4 numbers and use + - * / to get 24.

  • A simple example is 1, 2, 3, 4, and you find 1 …
more ...

Jupyter Notebook的配置

默认目录

jupyter notebook --generate-config
vim /home/zpj/.jupyter/jupyter_notebook_config.py#查找dir设定notebook根目录

找到c.NotebookApp.notebook_dir条目,修改为启动jupyter后打开的目录,如/home/zpj/code

配置pylab, matplotlib默认载入

导入库,内联svg输出,需要运行:

%pylab
%matplotlib inline
%config …
more ...


NaCl离子晶体晶格能的研究

这是我的大一化学原理小论文

离子晶体晶格能,主要成分为静电势能,计算出每个离子的电势能后就可以估算出其晶格能。由于晶体结构是无限延伸的,所以必然要求一些无穷级数的和。这个级数难以求出精确值。由实际意义知其必然收敛,因此可以用计算机进行相应计算。对于NaCl晶体,设相邻异性离子产生的电势能为$E_0$,$E_1$是某个离子和其他离子作用的电势能。定义Madelung常数$k=E_1/E_0$。编写C语言程序计算出$$k=1.74756459463, \quad E_1=kE_0=-8.95\rm{eV}$$

设晶体有 …

more ...