未验证 提交 01665cb0 编写于 作者: Y yangguohao 提交者: GitHub

Update circuit.py

上级 71a17d57
......@@ -59,15 +59,6 @@ class UAnsatz:
paddle.to_tensor(np.array([math.pi / 4])), paddle.to_tensor(np.array([-math.pi / 4]))]
# Record history of adding gates to the circuit
self.__history = []
def expand(self,new_n):
"""
为原来的量子电路进行比特数扩展
Args:
new_n(int):扩展后的量子比特数
"""
self.n = new_n
def __add__(self, cir):
r"""重载加法 ‘+’ 运算符,用于拼接两个维度相同的电路
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册