Closed yangguohao closed 2 years ago
task:https://github.com/PaddlePaddle/Quantum/issues/12 项目单测文件:https://github.com/yangguohao/Quantum-1/blob/documents/test_and_documents/test.py
All committers have signed the CLA.
考虑到这样一种情况,假设当前的量子电路已经运行过,然后再扩展其量子比特数,并直接执行其它函数,可能会出现报错(由于当前的量子比特数与当前所存储的量子态的维度并不一致)。因此,在函数中,需要检查一下是否有存储量子态,如果有的话,可以将其与一个全0的量子态进行张量积,以避免程序bug。
task:https://github.com/PaddlePaddle/Quantum/issues/12 项目单测文件:https://github.com/yangguohao/Quantum-1/blob/documents/test_and_documents/test.py