Skip to main content

量子最优控制GOAT算法的Python实现

项目描述

山羊量子控制

goat_quantumcontrol 是一个 python 库,用于使用 GOAT 算法优化量子门。

该算法由 Machnes 等人于 2018 年开发。人。并发表在以下论文中: https ://journals.aps.org/prl/abstract/10.1103/PhysRevLett.120.150401

安装

使用包管理器pip安装 goat_quantumcontrol。

pip install goat_quantumcontrol

用法

import goat_quantumcontrol as Qgoat

#-----System parameters------
# define the drift Hamiltonian
H0 = sigmax
# define the control Hamiltonian
Hdrive = sigmaz
# define the target gate
Utarget = X_gate

#-----Pulse parameters------
# define the number of time intervals
n_ts = 1000
# define the evolution time
evo_time = 3
# define the number of amps
num_of_amps = 2

#-----Optimization parameters--
# define the number of maximal iterations
max_iter = 200

# create an instance of the Pulse class to be used
fourier_pulse = Qgoat.FourierPulseWithEnvelope(n_ts=n_ts,
                                               evo_time=evo_time,
                                               num_of_amps=num_of_amps,
                                               window=None)

# create an instance of the Optimizer class
optimizer = Qgoat.Optimizer(H0=H0, Hdrive=Hdrive,
                            target=Utarget,
                            pulse=fourier_pulse,
                            max_iter=max_iter,
                            printProgress=True)

# run the optimization
optimizer.run_optimization()

贡献

欢迎请求请求。对于重大更改,请先打开一个问题讨论您想要更改的内容。

执照

麻省理工学院

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。

源分布

goat_quantumcontrol-0.0.6.tar.gz (7.9 kB 查看哈希

已上传 source

内置分布

goat_quantumcontrol-0.0.6-py3-none-any.whl (7.8 kB 查看哈希

已上传 py3