CN114429095B - Fault simulation method and system of quantum circuit, storage medium and electronic device - Google Patents

Fault simulation method and system of quantum circuit, storage medium and electronic device Download PDF

Info

Publication number
CN114429095B
CN114429095B CN202210352795.7A CN202210352795A CN114429095B CN 114429095 B CN114429095 B CN 114429095B CN 202210352795 A CN202210352795 A CN 202210352795A CN 114429095 B CN114429095 B CN 114429095B
Authority
CN
China
Prior art keywords
kraus
logical
fault
matrix
quantum circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210352795.7A
Other languages
Chinese (zh)
Other versions
CN114429095A (en
Inventor
官极
黄鸣宇
应明生
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhongke Arc Quantum Software Technology Co ltd
Institute of Software of CAS
Original Assignee
Beijing Zhongke Arc Quantum Software Technology Co ltd
Institute of Software of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zhongke Arc Quantum Software Technology Co ltd, Institute of Software of CAS filed Critical Beijing Zhongke Arc Quantum Software Technology Co ltd
Priority to CN202210352795.7A priority Critical patent/CN114429095B/en
Publication of CN114429095A publication Critical patent/CN114429095A/en
Application granted granted Critical
Publication of CN114429095B publication Critical patent/CN114429095B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/30Circuit design
    • G06F30/32Circuit design at the digital level
    • G06F30/33Design verification, e.g. functional simulation or model checking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Geometry (AREA)
  • Computational Mathematics (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

本发明涉及量子电路故障仿真技术领域,尤其涉及一种量子电路的故障仿真方法、系统、存储介质和电子设备,方法包括:获取待测试故障量子电路所对应的超算子,并获取所述超算子中的每个逻辑超算子所分别对应的Kraus矩阵集合,基于输入状态数据、期望输出状态数据以及所有的Kraus矩阵集合,计算所述待测试故障量子电路中的故障的故障影响率,通过仿真实验结果表明,本发明能够模拟大小超过5000个量子比特的故障量子电路,能够满足NISQ时代的应用,而且适用性广泛,既可以独立使用,也可以集成到当前开发的量子自动测试模式生成程序中,用于验证和检测量子电路的设计错误、制造缺陷和量子噪声效应。

Figure 202210352795

The invention relates to the technical field of quantum circuit fault simulation, in particular to a fault simulation method, system, storage medium and electronic device for a quantum circuit. The Kraus matrix set corresponding to each logical super-operator in the operator, based on the input state data, the expected output state data and all the Kraus matrix sets, calculate the failure influence rate of the failure in the fault quantum circuit to be tested, The simulation experiment results show that the invention can simulate the fault quantum circuit with a size of more than 5000 qubits, can meet the application in the NISQ era, and has a wide range of applicability, which can be used independently or integrated into the currently developed quantum automatic test mode generation. A program used to verify and detect design errors, manufacturing defects, and quantum noise effects in quantum circuits.

Figure 202210352795

Description

量子电路的故障仿真方法、系统、存储介质和电子设备Fault simulation method, system, storage medium and electronic device for quantum circuit

技术领域technical field

本发明涉及量子电路故障仿真技术领域,尤其涉及一种量子电路的故障仿真方法、系统、存储介质和电子设备。The invention relates to the technical field of quantum circuit fault simulation, in particular to a quantum circuit fault simulation method, system, storage medium and electronic device.

背景技术Background technique

在物理构建电路之前,仿真在数字电路验证、测试开发、设计调试和诊断中起着重要作用。具体来说,故障仿真是对有故障的数字电路进行仿真。其主要有两个目的:一是无故障(逻辑)仿真,帮助设计者验证数字电路的设计是否符合预期的功能描述;二是确定测试模式在检测感兴趣的故障时的效率,此类模式通常由自动测试模式生成器(ATPG)生成。现在故障仿真可以有效地应用于大规模集成电路,并已发展成电子设计自动化(EDA)的标准技术。Simulation plays an important role in digital circuit verification, test development, design debugging, and diagnostics before a circuit is physically built. Specifically, fault simulation is the simulation of a faulty digital circuit. It has two main purposes: one is fault-free (logic) simulation, which helps designers verify that the design of digital circuits conforms to the expected functional description; Generated by Automatic Test Pattern Generator (ATPG). Fault simulation can now be effectively applied to large-scale integrated circuits and has developed into a standard technique for electronic design automation (EDA).

然而,目前在量子计算中,物理学家通常通过实验构建设计的量子电路,然后估计它们在存在量子故障时的性能。其中,量子故障不仅包括与经典故障一样的量子电路的设计错误和制造缺陷,还包括来自周围环境的量子噪声,而且,在当前的嘈杂中型量子(NISQ)时代中量子噪声是不可避免的。例如,研究者实现了一个具有四个量子比特和四个受控量子逻辑门的电路,用于HHL算法的实验(HHL算法可以在量子计算机上指数加速求解线性方程组)。在电路性能测试中,三种不同状态被输入到电路中,实际输出状态与理想输出状态相比的保真度分别为99.3%、82.5%和83.6%。谷歌也使用类似的方法来确认量子霸权(即超越经典计算),以0.2%的保真度对53量子比特的量子电路进行采样。Currently in quantum computing, however, physicists typically experimentally build designed quantum circuits and then estimate their performance in the presence of quantum glitches. Among them, quantum faults include not only design errors and manufacturing defects of quantum circuits like classical faults, but also quantum noise from the surrounding environment, which is unavoidable in the current Noisy Intermediate Scale Quantum (NISQ) era. For example, the researchers implemented a circuit with four qubits and four controlled quantum logic gates for use in experiments with the HHL algorithm (the HHL algorithm can solve linear equations exponentially faster on a quantum computer). In the circuit performance test, three different states were input into the circuit, and the fidelity of the actual output state compared with the ideal output state was 99.3%, 82.5% and 83.6%, respectively. Google also used a similar approach to confirm quantum supremacy (i.e. beyond classical computing), sampling a 53-qubit quantum circuit with 0.2% fidelity.

显然,由于实验实施量子电路的昂贵资源和严格条件(例如环境温度必须接近绝对零度)以及读取量子状态的不确定性,在物理构建它们之前对量子电路(在经典计算机上)进行故障仿真是有帮助的并且更具有性价比。另一方面,将经典电路的现有故障仿真方法直接推广到量子电路上可以想象是不会成功。一个主要原因是量子故障仿真通常是定量的,而不是经典故障仿真中定性的:量子电路的输入/输出是复数的向量或矩阵,而经典电路的输入/输出是布尔值,即0或1。这一根本区别需要以新的方式构建量子故障仿真。Clearly, due to the expensive resources and stringent conditions of experimentally implementing quantum circuits (e.g. the ambient temperature must be close to absolute zero) and the uncertainty of reading quantum states, failure simulation of quantum circuits (on a classical computer) before physically building them is Helpful and more cost-effective. On the other hand, it is conceivably unsuccessful to directly generalize existing fault simulation methods for classical circuits to quantum circuits. A major reason is that quantum fault simulations are often quantitative, rather than qualitative in classical fault simulations: the inputs/outputs of quantum circuits are vectors or matrices of complex numbers, while the inputs/outputs of classical circuits are Boolean values, i.e. 0 or 1. This fundamental distinction requires building quantum fault simulations in new ways.

目前主要有两种仿真量子故障的方法。一是针对特定设计错误(例如单个量子门缺失)和制造缺陷(例如实际制造出的量子CNOT门)的基于矢量的仿真方法。二是针对量子噪声引起的故障,提出了基于密度矩阵的仿真方法,并嵌入到几乎所有目前流行的量子电路编程平台中,如IBM的Qiskit、微软的Q#和谷歌的Cirq。它的策略是通过在每个感兴趣的故障的数学模型中直接应用矩阵运算来更新存储的量子态的密度矩阵。There are currently two main methods for simulating quantum faults. One is a vector-based simulation approach for specific design errors (e.g. missing a single quantum gate) and fabrication defects (e.g. actually fabricated quantum CNOT gates). Second, for the failure caused by quantum noise, a simulation method based on density matrix is proposed and embedded in almost all the currently popular quantum circuit programming platforms, such as IBM's Qiskit, Microsoft's Q# and Google's Cirq. Its strategy is to update the density matrix of stored quantum states by directly applying matrix operations in the mathematical model of each fault of interest.

不幸的是,由于状态空间的维数随着量子比特(qubits)的数量呈指数增长,目前 上述的仿真方法的可扩展性(≤10 qubits)远未满足NISQ(NISQ为Noisy Intermediate- Scale Quantum的缩写,表示:含噪声的中型量子)时代的应用(量子电路的比特数≥ 50qubits和

Figure 956576DEST_PATH_IMAGE001
的复数矩阵)。Unfortunately, since the dimensionality of the state space grows exponentially with the number of quantum bits (qubits), the scalability (≤10 qubits) of the above simulation methods is far from NISQ (NISQ is a Noisy Intermediate-Scale Quantum Abbreviation for: Noisy medium quantum) applications in the era (quantum circuits with bits ≥ 50qubits and
Figure 956576DEST_PATH_IMAGE001
complex matrix).

发明内容SUMMARY OF THE INVENTION

本发明所要解决的技术问题是针对现有技术的不足,提供了一种量子电路的故障仿真方法、系统、存储介质和电子设备。The technical problem to be solved by the present invention is to provide a fault simulation method, system, storage medium and electronic device for a quantum circuit aiming at the deficiencies of the prior art.

本发明的一种量子电路的故障仿真方法的技术方案如下:The technical scheme of the fault simulation method of a quantum circuit of the present invention is as follows:

获取待测试故障量子电路所对应的超算子,并获取所述超算子中的每个逻辑超算子所分别对应的Kraus矩阵集合;Obtain the super-operator corresponding to the fault quantum circuit to be tested, and obtain the Kraus matrix set corresponding to each logical super-operator in the super-operator;

基于输入状态数据、期望输出状态数据以及所有的Kraus矩阵集合,计算所述待测试故障量子电路中的故障的故障影响率,其中,所述期望输出状态数据指:将所述输入状态数据输入已消除故障的待测试故障量子电路时,所输出的数据。Based on the input state data, the expected output state data, and all the Kraus matrix sets, the failure influence rate of the failure in the fault quantum circuit to be tested is calculated, wherein the expected output state data refers to: inputting the input state data into the The data output when the faulty quantum circuit to be tested is eliminated.

本发明的一种量子电路的故障仿真方法的有益效果如下:The beneficial effects of the fault simulation method of a quantum circuit of the present invention are as follows:

通过仿真实验结果表明,本发明能够模拟大小超过5000个量子比特的故障量子电路,能够满足NISQ时代的应用,而且适用性广泛,既可以独立使用,也可以集成到当前开发的量子自动测试模式生成程序中,用于验证和检测量子电路的设计错误、制造缺陷和量子噪声效应。The simulation results show that the invention can simulate the fault quantum circuit with a size of more than 5000 qubits, can meet the application in the NISQ era, and has a wide range of applicability, which can be used independently or integrated into the currently developed quantum automatic test mode generation A program used to verify and detect design errors, manufacturing defects, and quantum noise effects in quantum circuits.

在上述方案的基础上,本发明的一种量子电路的故障仿真方法还可以做如下改进。On the basis of the above solution, the fault simulation method of a quantum circuit of the present invention can also be improved as follows.

进一步,所述计算所述待测试故障量子电路中的故障的故障影响率,包括:Further, the calculating the fault influence rate of the fault in the fault quantum circuit to be tested includes:

所述故障影响率为:

Figure 661227DEST_PATH_IMAGE002
,其中,
Figure 265384DEST_PATH_IMAGE003
表示所述输入状态数据,
Figure 702181DEST_PATH_IMAGE004
表示
Figure 657368DEST_PATH_IMAGE005
的复数共轭转置,
Figure 837814DEST_PATH_IMAGE006
表示所述期望输出状 态数据,
Figure 562056DEST_PATH_IMAGE007
的复数共轭,
Figure 169755DEST_PATH_IMAGE008
的复数共轭,
Figure 81079DEST_PATH_IMAGE009
Figure 65216DEST_PATH_IMAGE010
表示第
Figure 643964DEST_PATH_IMAGE011
个逻辑超算子
Figure 422565DEST_PATH_IMAGE012
所对应的Kraus矩阵集合中Kraus矩阵的总 数量,
Figure 821185DEST_PATH_IMAGE013
表示:第
Figure 343433DEST_PATH_IMAGE011
个逻辑超算子
Figure 776689DEST_PATH_IMAGE012
对应的Kraus矩阵集合中的第
Figure 726190DEST_PATH_IMAGE014
个Kraus矩阵,
Figure 877686DEST_PATH_IMAGE015
Figure 938046DEST_PATH_IMAGE016
的复数共轭,
Figure 491387DEST_PATH_IMAGE017
Figure 611789DEST_PATH_IMAGE018
表示第
Figure 985002DEST_PATH_IMAGE019
个逻辑超算子
Figure 849053DEST_PATH_IMAGE020
所对应的Kraus矩阵集合中Kraus矩阵的总数量,
Figure 256900DEST_PATH_IMAGE021
表示第
Figure 548204DEST_PATH_IMAGE022
个逻辑超算子
Figure 408713DEST_PATH_IMAGE023
对应的 Kraus矩阵集合中的第
Figure 76455DEST_PATH_IMAGE024
个Kraus矩阵,
Figure 338809DEST_PATH_IMAGE025
的复数共轭,
Figure 801014DEST_PATH_IMAGE026
Figure 148819DEST_PATH_IMAGE027
表示第1个逻辑超算子
Figure 620251DEST_PATH_IMAGE028
所对应的Kraus矩阵集合中 Kraus矩阵的总数量,
Figure 940374DEST_PATH_IMAGE029
表示第1个逻辑超算子
Figure 698115DEST_PATH_IMAGE030
对应的Kraus矩阵集合中的第
Figure 674161DEST_PATH_IMAGE031
个 Kraus矩阵,
Figure 808339DEST_PATH_IMAGE032
Figure 982969DEST_PATH_IMAGE033
的复数共轭,
Figure 52556DEST_PATH_IMAGE034
Figure 109373DEST_PATH_IMAGE035
表示所有逻辑超算子的总数量,
Figure 188188DEST_PATH_IMAGE036
Figure 14061DEST_PATH_IMAGE011
Figure 254550DEST_PATH_IMAGE037
Figure 533084DEST_PATH_IMAGE038
均为正整数。 The failure impact rate is:
Figure 661227DEST_PATH_IMAGE002
,in,
Figure 265384DEST_PATH_IMAGE003
represents the input state data,
Figure 702181DEST_PATH_IMAGE004
express
Figure 657368DEST_PATH_IMAGE005
The complex conjugate transpose of ,
Figure 837814DEST_PATH_IMAGE006
represents the desired output status data,
Figure 562056DEST_PATH_IMAGE007
The complex conjugate of ,
Figure 169755DEST_PATH_IMAGE008
The complex conjugate of ,
Figure 81079DEST_PATH_IMAGE009
,
Figure 65216DEST_PATH_IMAGE010
means the first
Figure 643964DEST_PATH_IMAGE011
logical superoperator
Figure 422565DEST_PATH_IMAGE012
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 821185DEST_PATH_IMAGE013
means: the first
Figure 343433DEST_PATH_IMAGE011
logical superoperator
Figure 776689DEST_PATH_IMAGE012
The first in the corresponding set of Kraus matrices
Figure 726190DEST_PATH_IMAGE014
a Kraus matrix,
Figure 877686DEST_PATH_IMAGE015
Yes
Figure 938046DEST_PATH_IMAGE016
The complex conjugate of ,
Figure 491387DEST_PATH_IMAGE017
,
Figure 611789DEST_PATH_IMAGE018
means the first
Figure 985002DEST_PATH_IMAGE019
logical superoperator
Figure 849053DEST_PATH_IMAGE020
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 256900DEST_PATH_IMAGE021
means the first
Figure 548204DEST_PATH_IMAGE022
logical superoperator
Figure 408713DEST_PATH_IMAGE023
The first in the corresponding set of Kraus matrices
Figure 76455DEST_PATH_IMAGE024
a Kraus matrix,
Figure 338809DEST_PATH_IMAGE025
The complex conjugate of ,
Figure 801014DEST_PATH_IMAGE026
,
Figure 148819DEST_PATH_IMAGE027
represents the first logical superoperator
Figure 620251DEST_PATH_IMAGE028
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 940374DEST_PATH_IMAGE029
represents the first logical superoperator
Figure 698115DEST_PATH_IMAGE030
The first in the corresponding set of Kraus matrices
Figure 674161DEST_PATH_IMAGE031
a Kraus matrix,
Figure 808339DEST_PATH_IMAGE032
Yes
Figure 982969DEST_PATH_IMAGE033
The complex conjugate of ,
Figure 52556DEST_PATH_IMAGE034
,
Figure 109373DEST_PATH_IMAGE035
represents the total number of all logical superoperators,
Figure 188188DEST_PATH_IMAGE036
,
Figure 14061DEST_PATH_IMAGE011
,
Figure 254550DEST_PATH_IMAGE037
and
Figure 533084DEST_PATH_IMAGE038
All are positive integers.

本发明的一种量子电路的故障仿真系统的技术方案如下:The technical scheme of the fault simulation system of a quantum circuit of the present invention is as follows:

包括获取模块和计算模块;Including acquisition module and calculation module;

所述获取模块用于:获取待测试故障量子电路所对应的超算子,并获取所述超算子中的每个逻辑超算子所分别对应的Kraus矩阵集合;The acquisition module is used for: acquiring the super-operator corresponding to the fault quantum circuit to be tested, and acquiring the Kraus matrix set corresponding to each logical super-operator in the super-operator;

所述计算模块用于:基于输入状态数据、期望输出状态数据以及所有的Kraus矩阵集合,计算所述待测试故障量子电路中的故障的故障影响率,其中,所述期望输出状态数据指:将所述输入状态数据输入已消除故障的待测试故障量子电路时,所输出的数据。The calculation module is used for: based on the input state data, the expected output state data and all the Kraus matrix sets, to calculate the failure influence rate of the failure in the to-be-tested failure quantum circuit, wherein the expected output state data refers to: The input state data is the output data when the faulty quantum circuit to be tested whose fault has been eliminated is input.

本发明的一种量子电路的故障仿真系统的有益效果如下:The beneficial effects of the fault simulation system of a quantum circuit of the present invention are as follows:

通过将待测试故障量子电路即有缺陷的量子电路表示为多个Kraus矩阵集合,能够编码到在一个双倍大小的张量网络中,张量网络的收缩计算效率高,能够快速计算张量网络收缩,从而能够在很短的时间内完成故障仿真,即得到待测试故障量子电路中的故障的故障影响率。By representing the faulty quantum circuit to be tested, that is, the defective quantum circuit, as a set of multiple Kraus matrices, it can be encoded into a double-sized tensor network. The shrinkage of the tensor network has high computational efficiency and can quickly calculate the tensor network Therefore, the fault simulation can be completed in a very short time, that is, the fault influence rate of the fault in the fault quantum circuit to be tested can be obtained.

在上述方案的基础上,本发明的一种量子电路的故障仿真系统还可以做如下改进。On the basis of the above solution, the fault simulation system of a quantum circuit of the present invention can also be improved as follows.

进一步,所述故障影响率为:

Figure 884431DEST_PATH_IMAGE039
, 其中,
Figure 95970DEST_PATH_IMAGE003
表示所述输入状态数据,
Figure 100835DEST_PATH_IMAGE040
的复数共轭转置,
Figure 7611DEST_PATH_IMAGE006
表示所述 期望输出状态数据,
Figure 287283DEST_PATH_IMAGE041
的复数共轭,
Figure 963115DEST_PATH_IMAGE042
的复数共轭,
Figure 670040DEST_PATH_IMAGE043
Figure 64112DEST_PATH_IMAGE044
Figure 881895DEST_PATH_IMAGE045
表示第
Figure 677813DEST_PATH_IMAGE011
个逻辑超算子
Figure 290060DEST_PATH_IMAGE046
所对应的Kraus 矩阵集合中Kraus矩阵的总数量,
Figure 171428DEST_PATH_IMAGE047
表示:第
Figure 792902DEST_PATH_IMAGE011
个逻辑超算子
Figure 443326DEST_PATH_IMAGE046
对应的Kraus矩阵集合中 的第
Figure 492054DEST_PATH_IMAGE014
个Kraus矩阵,
Figure 595139DEST_PATH_IMAGE048
的复数共轭,
Figure 754725DEST_PATH_IMAGE049
Figure 525235DEST_PATH_IMAGE018
表示第
Figure 744864DEST_PATH_IMAGE019
个逻辑超算子
Figure 335245DEST_PATH_IMAGE046
所对应的Kraus矩阵集合中Kraus矩阵的总数量,
Figure 298522DEST_PATH_IMAGE050
表示第
Figure 923538DEST_PATH_IMAGE022
个逻辑超算子
Figure 314068DEST_PATH_IMAGE051
对应的Kraus矩阵集合中的第
Figure 391746DEST_PATH_IMAGE052
个Kraus矩阵,
Figure 893134DEST_PATH_IMAGE053
的复数共轭,
Figure 372657DEST_PATH_IMAGE054
Figure 957526DEST_PATH_IMAGE055
表示第1个逻辑超算子
Figure 522499DEST_PATH_IMAGE028
所对应的Kraus矩阵集合中 Kraus矩阵的总数量,
Figure 827579DEST_PATH_IMAGE056
表示第1个逻辑超算子
Figure 161608DEST_PATH_IMAGE030
对应的Kraus矩阵集合中的第
Figure 893941DEST_PATH_IMAGE037
个 Kraus矩阵,
Figure 946210DEST_PATH_IMAGE057
Figure 54981DEST_PATH_IMAGE058
的复数共轭,
Figure 243517DEST_PATH_IMAGE059
Figure 146751DEST_PATH_IMAGE035
表示所有逻辑超算子的总数量,
Figure 686316DEST_PATH_IMAGE060
Figure 333198DEST_PATH_IMAGE011
Figure 641820DEST_PATH_IMAGE037
Figure 715955DEST_PATH_IMAGE038
均为正整数。 Further, the failure influence rate is:
Figure 884431DEST_PATH_IMAGE039
, in,
Figure 95970DEST_PATH_IMAGE003
represents the input state data,
Figure 100835DEST_PATH_IMAGE040
The complex conjugate transpose of ,
Figure 7611DEST_PATH_IMAGE006
represents the desired output status data,
Figure 287283DEST_PATH_IMAGE041
The complex conjugate of ,
Figure 963115DEST_PATH_IMAGE042
The complex conjugate of ,
Figure 670040DEST_PATH_IMAGE043
,
Figure 64112DEST_PATH_IMAGE044
,
Figure 881895DEST_PATH_IMAGE045
means the first
Figure 677813DEST_PATH_IMAGE011
logical superoperator
Figure 290060DEST_PATH_IMAGE046
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 171428DEST_PATH_IMAGE047
means: the first
Figure 792902DEST_PATH_IMAGE011
logical superoperator
Figure 443326DEST_PATH_IMAGE046
The first in the corresponding set of Kraus matrices
Figure 492054DEST_PATH_IMAGE014
a Kraus matrix,
Figure 595139DEST_PATH_IMAGE048
The complex conjugate of ,
Figure 754725DEST_PATH_IMAGE049
,
Figure 525235DEST_PATH_IMAGE018
means the first
Figure 744864DEST_PATH_IMAGE019
logical superoperator
Figure 335245DEST_PATH_IMAGE046
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 298522DEST_PATH_IMAGE050
means the first
Figure 923538DEST_PATH_IMAGE022
logical superoperator
Figure 314068DEST_PATH_IMAGE051
The first in the corresponding set of Kraus matrices
Figure 391746DEST_PATH_IMAGE052
a Kraus matrix,
Figure 893134DEST_PATH_IMAGE053
The complex conjugate of ,
Figure 372657DEST_PATH_IMAGE054
,
Figure 957526DEST_PATH_IMAGE055
represents the first logical superoperator
Figure 522499DEST_PATH_IMAGE028
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 827579DEST_PATH_IMAGE056
represents the first logical superoperator
Figure 161608DEST_PATH_IMAGE030
The first in the corresponding set of Kraus matrices
Figure 893941DEST_PATH_IMAGE037
a Kraus matrix,
Figure 946210DEST_PATH_IMAGE057
Yes
Figure 54981DEST_PATH_IMAGE058
The complex conjugate of ,
Figure 243517DEST_PATH_IMAGE059
,
Figure 146751DEST_PATH_IMAGE035
represents the total number of all logical superoperators,
Figure 686316DEST_PATH_IMAGE060
,
Figure 333198DEST_PATH_IMAGE011
,
Figure 641820DEST_PATH_IMAGE037
and
Figure 715955DEST_PATH_IMAGE038
All are positive integers.

本发明的一种存储介质,所述存储介质中存储有指令,当计算机读取所述指令时,使所述计算机执行上述任一项所述的一种量子电路的故障仿真方法。According to a storage medium of the present invention, instructions are stored in the storage medium, and when a computer reads the instructions, the computer is made to execute any one of the above-mentioned methods for simulating a fault of a quantum circuit.

本发明的一种电子设备,包括处理器和上述的存储介质,所述处理器执行所述存储介质中的指令。An electronic device of the present invention includes a processor and the above-mentioned storage medium, wherein the processor executes the instructions in the storage medium.

附图说明Description of drawings

图1为本发明实施例的一种量子电路的故障仿真方法的流程示意图;1 is a schematic flowchart of a method for simulating a fault of a quantum circuit according to an embodiment of the present invention;

图2为待测试故障量子电路的结构示意图;Fig. 2 is the structural schematic diagram of the fault quantum circuit to be tested;

图3为消除故障后的待测试故障量子电路的结构示意图;Fig. 3 is the structural schematic diagram of the quantum circuit to be tested after the fault is eliminated;

图4为为图2的待测试故障量子电路的张量收缩示意图;4 is a schematic diagram of tensor contraction of the faulty quantum circuit to be tested of FIG. 2;

图5为本发明实施例的一种量子电路的故障仿真系统的结构示意图。FIG. 5 is a schematic structural diagram of a fault simulation system for a quantum circuit according to an embodiment of the present invention.

具体实施方式Detailed ways

如图1所示,本发明实施例的一种量子电路的故障仿真方法,包括如下步骤:As shown in FIG. 1 , a method for simulating a fault of a quantum circuit according to an embodiment of the present invention includes the following steps:

S1、获取待测试故障量子电路所对应的超算子,并获取所述超算子中的每个逻辑超算子所分别对应的Kraus矩阵集合;S1, obtain the superoperator corresponding to the fault quantum circuit to be tested, and obtain the Kraus matrix set corresponding to each logical superoperator in the superoperator;

S2、基于输入状态数据、期望输出状态数据以及所有的Kraus矩阵集合,计算所述待测试故障量子电路中的故障的故障影响率,其中,所述期望输出状态数据指:将所述输入状态数据输入已消除故障的待测试故障量子电路时,所输出的数据。S2. Calculate the failure influence rate of the failure in the to-be-tested failure quantum circuit based on the input state data, the expected output state data, and all the Kraus matrix sets, wherein the expected output state data refers to: the input state data The output data when the faulty quantum circuit to be tested with the fault removed is input.

其中,可根据实际情况设置输入状态数据,在量子计算的技术领域内,输入状态数据指:量子状态对应的矩阵,期望输出状态数据具体也为量子状态对应的矩阵。Among them, the input state data can be set according to the actual situation. In the technical field of quantum computing, the input state data refers to the matrix corresponding to the quantum state, and the expected output state data is also the matrix corresponding to the quantum state.

通过仿真实验结果表明,本发明能够模拟大小超过5000个量子比特的故障量子电路,能够满足NISQ时代的应用,而且适用性广泛,既可以独立使用,也可以集成到当前开发的量子自动测试模式生成程序中,用于验证和检测量子电路的设计错误、制造缺陷和量子噪声效应。The simulation results show that the invention can simulate the fault quantum circuit with a size of more than 5000 qubits, can meet the application in the NISQ era, and has a wide range of applicability, which can be used independently or integrated into the currently developed quantum automatic test mode generation A program used to verify and detect design errors, manufacturing defects, and quantum noise effects in quantum circuits.

可选地,在上述技术方案中,所述故障影响率为:

Figure 742817DEST_PATH_IMAGE061
,其中,
Figure 927811DEST_PATH_IMAGE003
表示所述输入状态 数据,
Figure 90939DEST_PATH_IMAGE062
表示
Figure 601555DEST_PATH_IMAGE063
的复数共轭转置,
Figure 850133DEST_PATH_IMAGE064
表示所述期望输出状态数据,
Figure 838818DEST_PATH_IMAGE065
Figure 122032DEST_PATH_IMAGE066
的 复数共轭,
Figure 537969DEST_PATH_IMAGE067
的复数共轭,
Figure 273844DEST_PATH_IMAGE068
Figure 66220DEST_PATH_IMAGE069
Figure 203940DEST_PATH_IMAGE070
表 示第
Figure 790779DEST_PATH_IMAGE011
个逻辑超算子
Figure 13950DEST_PATH_IMAGE071
所对应的Kraus矩阵集合中Kraus矩阵的总数量,
Figure 344437DEST_PATH_IMAGE072
表示:第
Figure 336664DEST_PATH_IMAGE011
个 逻辑超算子
Figure 359984DEST_PATH_IMAGE071
对应的Kraus矩阵集合中的第
Figure 70451DEST_PATH_IMAGE014
个Kraus矩阵,
Figure 939050DEST_PATH_IMAGE073
的复数共轭,
Figure 51362DEST_PATH_IMAGE074
Figure 980004DEST_PATH_IMAGE075
表示第
Figure 177767DEST_PATH_IMAGE019
个逻辑超算子
Figure 850057DEST_PATH_IMAGE071
所对应的Kraus矩阵 集合中Kraus矩阵的总数量,
Figure 816876DEST_PATH_IMAGE076
表示第
Figure 181998DEST_PATH_IMAGE022
个逻辑超算子
Figure 929374DEST_PATH_IMAGE077
对应的Kraus矩阵集合中的第
Figure 77459DEST_PATH_IMAGE078
个Kraus矩阵,
Figure 226680DEST_PATH_IMAGE079
的复数共轭,
Figure 638070DEST_PATH_IMAGE080
Figure 669480DEST_PATH_IMAGE081
表示第1个逻辑 超算子
Figure 558939DEST_PATH_IMAGE028
所对应的Kraus矩阵集合中Kraus矩阵的总数量,
Figure 624984DEST_PATH_IMAGE082
表示第1个逻辑超算子
Figure 4012DEST_PATH_IMAGE030
对 应的Kraus矩阵集合中的第
Figure 398085DEST_PATH_IMAGE037
个Kraus矩阵,
Figure 215868DEST_PATH_IMAGE083
的复数共轭,
Figure 746206DEST_PATH_IMAGE084
Figure 624033DEST_PATH_IMAGE035
表示所 有逻辑超算子的总数量,
Figure 505401DEST_PATH_IMAGE085
Figure 126875DEST_PATH_IMAGE011
Figure 777299DEST_PATH_IMAGE037
Figure 560448DEST_PATH_IMAGE086
均为正整数。 Optionally, in the above technical solution, the failure impact rate is:
Figure 742817DEST_PATH_IMAGE061
,in,
Figure 927811DEST_PATH_IMAGE003
represents the input state data,
Figure 90939DEST_PATH_IMAGE062
express
Figure 601555DEST_PATH_IMAGE063
The complex conjugate transpose of ,
Figure 850133DEST_PATH_IMAGE064
represents the desired output status data,
Figure 838818DEST_PATH_IMAGE065
Yes
Figure 122032DEST_PATH_IMAGE066
The complex conjugate of ,
Figure 537969DEST_PATH_IMAGE067
The complex conjugate of ,
Figure 273844DEST_PATH_IMAGE068
,
Figure 66220DEST_PATH_IMAGE069
,
Figure 203940DEST_PATH_IMAGE070
means the first
Figure 790779DEST_PATH_IMAGE011
logical superoperator
Figure 13950DEST_PATH_IMAGE071
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 344437DEST_PATH_IMAGE072
means: the first
Figure 336664DEST_PATH_IMAGE011
logical superoperator
Figure 359984DEST_PATH_IMAGE071
The first in the corresponding set of Kraus matrices
Figure 70451DEST_PATH_IMAGE014
a Kraus matrix,
Figure 939050DEST_PATH_IMAGE073
The complex conjugate of ,
Figure 51362DEST_PATH_IMAGE074
,
Figure 980004DEST_PATH_IMAGE075
means the first
Figure 177767DEST_PATH_IMAGE019
logical superoperator
Figure 850057DEST_PATH_IMAGE071
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 816876DEST_PATH_IMAGE076
means the first
Figure 181998DEST_PATH_IMAGE022
logical superoperator
Figure 929374DEST_PATH_IMAGE077
The first in the corresponding set of Kraus matrices
Figure 77459DEST_PATH_IMAGE078
a Kraus matrix,
Figure 226680DEST_PATH_IMAGE079
The complex conjugate of ,
Figure 638070DEST_PATH_IMAGE080
,
Figure 669480DEST_PATH_IMAGE081
represents the first logical superoperator
Figure 558939DEST_PATH_IMAGE028
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 624984DEST_PATH_IMAGE082
represents the first logical superoperator
Figure 4012DEST_PATH_IMAGE030
The first in the corresponding set of Kraus matrices
Figure 398085DEST_PATH_IMAGE037
a Kraus matrix,
Figure 215868DEST_PATH_IMAGE083
The complex conjugate of ,
Figure 746206DEST_PATH_IMAGE084
,
Figure 624033DEST_PATH_IMAGE035
represents the total number of all logical superoperators,
Figure 505401DEST_PATH_IMAGE085
,
Figure 126875DEST_PATH_IMAGE011
,
Figure 777299DEST_PATH_IMAGE037
and
Figure 560448DEST_PATH_IMAGE086
All are positive integers.

由于每个逻辑超算子对应的Kraus矩阵集合中的Kraus矩阵的数量相同,故统一用

Figure 257008DEST_PATH_IMAGE037
表示。 Since the number of Kraus matrices in the Kraus matrix set corresponding to each logical superoperator is the same, it is unified to use
Figure 257008DEST_PATH_IMAGE037
express.

通过将待测试故障量子电路即有缺陷的量子电路表示为多个Kraus矩阵集合,能够编码到在一个双倍大小的张量网络中,张量网络的收缩计算效率高,能够快速计算张量网络收缩,从而能够在很短的时间内完成故障仿真,即得到待测试故障量子电路中的故障的故障影响率。By representing the faulty quantum circuit to be tested, that is, the defective quantum circuit, as a set of multiple Kraus matrices, it can be encoded into a double-sized tensor network. The shrinkage of the tensor network has high computational efficiency and can quickly calculate the tensor network Therefore, the fault simulation can be completed in a very short time, that is, the fault influence rate of the fault in the fault quantum circuit to be tested can be obtained.

通过如下一个实施例,对本申请的一种量子电路的故障仿真方法进行说明,具体包括:A method for simulating a fault of a quantum circuit of the present application will be described through the following embodiment, which specifically includes:

S10、获取图2所示的待测试故障量子电路的超算子中每个逻辑超算子对应的 Kraus矩阵集合,

Figure 88698DEST_PATH_IMAGE087
,其中
Figure 859208DEST_PATH_IMAGE088
表示第i个 逻辑超算子
Figure 813257DEST_PATH_IMAGE089
所对应的Kraus矩阵集合
Figure 669218DEST_PATH_IMAGE090
。 S10. Obtain the Kraus matrix set corresponding to each logical superoperator in the superoperator of the fault quantum circuit to be tested shown in FIG. 2,
Figure 88698DEST_PATH_IMAGE087
,in
Figure 859208DEST_PATH_IMAGE088
represents the ith logical superoperator
Figure 813257DEST_PATH_IMAGE089
The corresponding Kraus matrix set
Figure 669218DEST_PATH_IMAGE090
.

其中,H、S、T为量子电路中的标准单量子基本门,符号“

Figure 632495DEST_PATH_IMAGE091
”为标准受控非门,记做 C门,本领域技术人员可根据图2直接确定超算子中每个逻辑超算子对应的Kraus矩阵集合,
Figure 991932DEST_PATH_IMAGE092
为极化噪音的逻辑超算子,表示待测试故障量子电路中的故障,该故障
Figure 382462DEST_PATH_IMAGE092
可表示 为:
Figure 460139DEST_PATH_IMAGE093
; Among them, H, S, T are standard single quantum fundamental gates in quantum circuits, and the symbol "
Figure 632495DEST_PATH_IMAGE091
" is a standard controlled NOT gate, denoted as C gate, those skilled in the art can directly determine the Kraus matrix set corresponding to each logical superoperator in the superoperator according to Fig. 2,
Figure 991932DEST_PATH_IMAGE092
is the logical superoperator of polarization noise, representing the fault in the fault quantum circuit to be tested, the fault
Figure 382462DEST_PATH_IMAGE092
can be expressed as:
Figure 460139DEST_PATH_IMAGE093
;

S11、确定输入状态数据和期望输出状态数据:S11. Determine the input state data and the expected output state data:

输入状态数据

Figure 227107DEST_PATH_IMAGE094
为:
Figure 706630DEST_PATH_IMAGE095
,期望输出状态数据
Figure 268061DEST_PATH_IMAGE096
为:
Figure 833035DEST_PATH_IMAGE097
; Enter status data
Figure 227107DEST_PATH_IMAGE094
for:
Figure 706630DEST_PATH_IMAGE095
, expecting output status data
Figure 268061DEST_PATH_IMAGE096
for:
Figure 833035DEST_PATH_IMAGE097
;

期望输出状态数据的获取过程为:将图2所示的待测试故障量子电路的故障进行消除,得到图3所示的量子电路,将输入状态数据输入图3所述的量子电路,得到期望输出状态数据。The acquisition process of the expected output state data is as follows: eliminate the fault of the quantum circuit to be tested shown in Figure 2 to obtain the quantum circuit shown in Figure 3, input the input state data into the quantum circuit described in Figure 3, and obtain the expected output status data.

S12、利用

Figure 138114DEST_PATH_IMAGE098
,计算如图4所示 中的张量网络收缩,即为故障影响率。 S12. Use
Figure 138114DEST_PATH_IMAGE098
, calculate the shrinkage of the tensor network as shown in Figure 4, which is the failure impact rate.

根据故障影响率能够用来判断待测试故障量子电路是否可以使用。其中,故障影响率的取值范围为0~1,1表示无影响,0表示影响最大,故障影响率为0时,表示完全待测试故障量子电路完全不能用。According to the fault influence rate, it can be used to judge whether the fault quantum circuit to be tested can be used. Among them, the value range of the fault influence rate is 0~1, 1 means no influence, 0 means the greatest influence, and when the fault influence rate is 0, it means that the fault quantum circuit to be tested is completely unusable.

在上述各实施例中,虽然对步骤进行了编号S1、S2等,但只是本申请给出的具体实施例,本领域的技术人员可根据实际情况调整S1、S2等的执行顺序,此也在本发明的保护范围内,可以理解,在一些实施例中,可以包含如上述各实施方式中的部分或全部。In the above embodiments, although the steps are numbered S1, S2, etc., they are only specific embodiments given in this application. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation. Within the protection scope of the present invention, it can be understood that in some embodiments, some or all of the above-mentioned embodiments may be included.

如图5所示,本发明实施例的一种量子电路的故障仿真系统200,包括获取模块210和计算模块220;As shown in FIG. 5 , a fault simulation system 200 of a quantum circuit according to an embodiment of the present invention includes an acquisition module 210 and a calculation module 220;

所述获取模块210用于:获取待测试故障量子电路所对应的超算子,并获取所述超算子中的每个逻辑超算子所分别对应的Kraus矩阵集合;The obtaining module 210 is used for: obtaining the super-operator corresponding to the fault quantum circuit to be tested, and obtaining the Kraus matrix set corresponding to each logical super-operator in the super-operator;

所述计算模块220用于:基于输入状态数据、期望输出状态数据以及所有的Kraus矩阵集合,计算所述待测试故障量子电路中的故障的故障影响率,其中,所述期望输出状态数据指:将所述输入状态数据输入已消除故障的待测试故障量子电路时,所输出的数据。The calculation module 220 is configured to: based on the input state data, the expected output state data and all the Kraus matrix sets, calculate the failure influence rate of the failure in the to-be-tested failure quantum circuit, wherein the expected output state data refers to: The output data when the input state data is input into the faulty quantum circuit to be tested whose faults have been eliminated.

通过仿真实验结果表明,本发明能够模拟大小超过5000个量子比特的故障量子电路,能够满足NISQ时代的应用,而且适用性广泛,既可以独立使用,也可以集成到当前开发的量子自动测试模式生成程序中,用于验证和检测量子电路的设计错误、制造缺陷和量子噪声效应。The simulation results show that the invention can simulate the fault quantum circuit with a size of more than 5000 qubits, can meet the application in the NISQ era, and has a wide range of applicability, which can be used independently or integrated into the currently developed quantum automatic test mode generation A program used to verify and detect design errors, manufacturing defects, and quantum noise effects in quantum circuits.

可选地,在上述技术方案中,所述故障影响率为:

Figure 472144DEST_PATH_IMAGE099
,其中,
Figure 204476DEST_PATH_IMAGE003
表示所述输入 状态数据,
Figure 256746DEST_PATH_IMAGE062
表示
Figure 99937DEST_PATH_IMAGE063
的复数共轭转置,
Figure 554052DEST_PATH_IMAGE064
表示所述期望输出状态数据,
Figure 457286DEST_PATH_IMAGE100
Figure 996852DEST_PATH_IMAGE101
的复数共轭,
Figure 643734DEST_PATH_IMAGE102
的复数共轭,
Figure 952355DEST_PATH_IMAGE103
Figure 26491DEST_PATH_IMAGE104
Figure 787773DEST_PATH_IMAGE105
表示第
Figure 238346DEST_PATH_IMAGE011
个逻辑超算子
Figure 401474DEST_PATH_IMAGE106
所对应的Kraus矩阵集合中Kraus矩阵的总 数量,
Figure 646511DEST_PATH_IMAGE107
表示:第
Figure 160669DEST_PATH_IMAGE011
个逻辑超算子
Figure 149353DEST_PATH_IMAGE108
对应的Kraus矩阵集合中的第
Figure 166988DEST_PATH_IMAGE014
个Kraus矩阵,
Figure 848505DEST_PATH_IMAGE109
的复数共轭,
Figure 584380DEST_PATH_IMAGE110
Figure 376755DEST_PATH_IMAGE111
表示第
Figure 248896DEST_PATH_IMAGE112
个逻辑超 算子
Figure 101315DEST_PATH_IMAGE113
所对应的Kraus矩阵集合中Kraus矩阵的总数量,
Figure 324486DEST_PATH_IMAGE114
表示第
Figure 654973DEST_PATH_IMAGE022
个逻辑超算子
Figure 647200DEST_PATH_IMAGE023
对 应的Kraus矩阵集合中的第
Figure 670519DEST_PATH_IMAGE115
个Kraus矩阵,
Figure 115407DEST_PATH_IMAGE116
的复数共轭,
Figure 984006DEST_PATH_IMAGE117
Figure 361898DEST_PATH_IMAGE118
表示第1个逻辑超算子
Figure 290539DEST_PATH_IMAGE028
所对应的Kraus矩阵集合中 Kraus矩阵的总数量,
Figure 488303DEST_PATH_IMAGE119
表示第1个逻辑超算子
Figure 160592DEST_PATH_IMAGE030
对应的Kraus矩阵集合中的第
Figure 127411DEST_PATH_IMAGE037
个Kraus 矩阵,
Figure 430217DEST_PATH_IMAGE120
的复数共轭,
Figure 505489DEST_PATH_IMAGE121
Figure 856836DEST_PATH_IMAGE035
表示所有逻辑超算子的总数量,
Figure 802795DEST_PATH_IMAGE122
Figure 542081DEST_PATH_IMAGE011
Figure 448857DEST_PATH_IMAGE037
Figure 462950DEST_PATH_IMAGE086
均为正整数。 Optionally, in the above technical solution, the failure impact rate is:
Figure 472144DEST_PATH_IMAGE099
,in,
Figure 204476DEST_PATH_IMAGE003
represents the input state data,
Figure 256746DEST_PATH_IMAGE062
express
Figure 99937DEST_PATH_IMAGE063
The complex conjugate transpose of ,
Figure 554052DEST_PATH_IMAGE064
represents the desired output status data,
Figure 457286DEST_PATH_IMAGE100
Yes
Figure 996852DEST_PATH_IMAGE101
The complex conjugate of ,
Figure 643734DEST_PATH_IMAGE102
The complex conjugate of ,
Figure 952355DEST_PATH_IMAGE103
,
Figure 26491DEST_PATH_IMAGE104
,
Figure 787773DEST_PATH_IMAGE105
means the first
Figure 238346DEST_PATH_IMAGE011
logical superoperator
Figure 401474DEST_PATH_IMAGE106
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 646511DEST_PATH_IMAGE107
means: the first
Figure 160669DEST_PATH_IMAGE011
logical superoperator
Figure 149353DEST_PATH_IMAGE108
The first in the corresponding set of Kraus matrices
Figure 166988DEST_PATH_IMAGE014
a Kraus matrix,
Figure 848505DEST_PATH_IMAGE109
The complex conjugate of ,
Figure 584380DEST_PATH_IMAGE110
,
Figure 376755DEST_PATH_IMAGE111
means the first
Figure 248896DEST_PATH_IMAGE112
logical superoperator
Figure 101315DEST_PATH_IMAGE113
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 324486DEST_PATH_IMAGE114
means the first
Figure 654973DEST_PATH_IMAGE022
logical superoperator
Figure 647200DEST_PATH_IMAGE023
The first in the corresponding set of Kraus matrices
Figure 670519DEST_PATH_IMAGE115
a Kraus matrix,
Figure 115407DEST_PATH_IMAGE116
The complex conjugate of ,
Figure 984006DEST_PATH_IMAGE117
,
Figure 361898DEST_PATH_IMAGE118
represents the first logical superoperator
Figure 290539DEST_PATH_IMAGE028
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure 488303DEST_PATH_IMAGE119
represents the first logical superoperator
Figure 160592DEST_PATH_IMAGE030
The first in the corresponding set of Kraus matrices
Figure 127411DEST_PATH_IMAGE037
a Kraus matrix,
Figure 430217DEST_PATH_IMAGE120
The complex conjugate of ,
Figure 505489DEST_PATH_IMAGE121
,
Figure 856836DEST_PATH_IMAGE035
represents the total number of all logical superoperators,
Figure 802795DEST_PATH_IMAGE122
,
Figure 542081DEST_PATH_IMAGE011
,
Figure 448857DEST_PATH_IMAGE037
and
Figure 462950DEST_PATH_IMAGE086
All are positive integers.

通过将待测试故障量子电路即有缺陷的量子电路表示为多个Kraus矩阵集合,能够编码到在一个双倍大小的张量网络中,张量网络的收缩计算效率高,能够快速计算张量网络收缩,从而能够在很短的时间内完成故障仿真,即得到待测试故障量子电路中的故障的故障影响率。By representing the faulty quantum circuit to be tested, that is, the defective quantum circuit, as a set of multiple Kraus matrices, it can be encoded into a double-sized tensor network. The shrinkage of the tensor network has high computational efficiency and can quickly calculate the tensor network Therefore, the fault simulation can be completed in a very short time, that is, the fault influence rate of the fault in the fault quantum circuit to be tested can be obtained.

上述关于本发明的一种量子电路的故障仿真系统200中的各参数和各个单元模块实现相应功能的步骤,可参考上文中关于一种量子电路的故障仿真方法的实施例中的各参数和步骤,在此不做赘述。For the above-mentioned steps for each parameter and each unit module in the fault simulation system 200 for a quantum circuit of the present invention to implement corresponding functions, reference may be made to the above-mentioned parameters and steps in the embodiment of the fault simulation method for a quantum circuit , which will not be repeated here.

本发明实施例的一种存储介质,所述存储介质中存储有指令,当计算机读取所述指令时,使所述计算机执行上述任一项所述的一种量子电路的故障仿真方法。An embodiment of the present invention is a storage medium, where instructions are stored in the storage medium, and when a computer reads the instructions, the computer is made to execute any one of the above-mentioned methods for simulating a fault of a quantum circuit.

本发明实施例的一种电子设备,包括处理器和上述的存储介质,所述处理器执行所述存储介质中的指令,其中,电子设备可为计算机、手机或平板电脑等。An electronic device according to an embodiment of the present invention includes a processor and the above-mentioned storage medium, where the processor executes instructions in the storage medium, where the electronic device may be a computer, a mobile phone, or a tablet computer.

所属技术领域的技术人员知道,本发明可以实现为系统、方法或计算机程序产品。As will be appreciated by one skilled in the art, the present invention may be implemented as a system, method or computer program product.

因此,本公开可以具体实现为以下形式,即:可以是完全的硬件、也可以是完全的软件(包括固件、驻留软件、微代码等),还可以是硬件和软件结合的形式,本文一般称为“电路”、“模块”或“系统”。此外,在一些实施例中,本发明还可以实现为在一个或多个计算机可读介质中的计算机程序产品的形式,该计算机可读介质中包含计算机可读的程序代码。Therefore, the present disclosure can be embodied in the following forms, that is, it can be completely hardware, can also be completely software (including firmware, resident software, microcode, etc.), or can be a combination of hardware and software. Called a "circuit," "module," or "system." Furthermore, in some embodiments, the present invention may also be implemented in the form of a computer program product on one or more computer-readable media having computer-readable program code embodied thereon.

可以采用一个或多个计算机可读的介质的任意组合。计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。计算机可读存储介质例如可以是一一但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机存取存储器(RAM),只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本文件中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。Any combination of one or more computer-readable media may be employed. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples (non-exhaustive list) of computer readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), Erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。Although the embodiments of the present invention have been shown and described above, it should be understood that the above-mentioned embodiments are exemplary and should not be construed as limiting the present invention. Embodiments are subject to variations, modifications, substitutions and variations.

Claims (4)

1.一种量子电路的故障仿真方法,其特征在于,包括:1. a fault simulation method of quantum circuit, is characterized in that, comprises: 获取待测试故障量子电路所对应的超算子,并获取所述超算子中的每个逻辑超算子所分别对应的Kraus矩阵集合;Obtain the super-operator corresponding to the fault quantum circuit to be tested, and obtain the Kraus matrix set corresponding to each logical super-operator in the super-operator; 基于输入状态数据、期望输出状态数据以及所有的Kraus矩阵集合,计算所述待测试故障量子电路中的故障的故障影响率,其中,所述期望输出状态数据指:将所述输入状态数据输入已消除故障的待测试故障量子电路时,所输出的数据;Based on the input state data, the expected output state data, and all the Kraus matrix sets, the failure influence rate of the failure in the fault quantum circuit to be tested is calculated, wherein the expected output state data refers to: inputting the input state data into the The output data when the faulty quantum circuit to be tested is eliminated; 所述故障影响率为:
Figure DEST_PATH_IMAGE002
,其中,
Figure DEST_PATH_IMAGE004
表示所 述输入状态数据,
Figure DEST_PATH_IMAGE006
表示
Figure DEST_PATH_IMAGE008
的复数共轭转置,
Figure DEST_PATH_IMAGE009
表示所述期望输出状态数据,
Figure DEST_PATH_IMAGE011
Figure DEST_PATH_IMAGE013
的复数共轭,
Figure DEST_PATH_IMAGE015
Figure DEST_PATH_IMAGE017
的复数共轭,
Figure DEST_PATH_IMAGE019
Figure DEST_PATH_IMAGE021
Figure DEST_PATH_IMAGE023
表示第
Figure DEST_PATH_IMAGE025
个逻辑超算子
Figure DEST_PATH_IMAGE027
所对应的Kraus矩阵集合中Kraus矩阵的总数量,
Figure DEST_PATH_IMAGE029
表示:第
Figure DEST_PATH_IMAGE025A
个逻辑超算子
Figure DEST_PATH_IMAGE030
对应的Kraus矩阵集合中的第
Figure DEST_PATH_IMAGE032
个Kraus矩阵,
Figure DEST_PATH_IMAGE034
Figure DEST_PATH_IMAGE035
的复数共轭,
Figure DEST_PATH_IMAGE037
Figure DEST_PATH_IMAGE039
表示第
Figure DEST_PATH_IMAGE041
个逻辑超算子
Figure DEST_PATH_IMAGE042
所对应的Kraus矩阵集合中 Kraus矩阵的总数量,
Figure DEST_PATH_IMAGE044
表示第
Figure DEST_PATH_IMAGE045
个逻辑超算子
Figure DEST_PATH_IMAGE047
对应的Kraus矩阵集合中的第
Figure DEST_PATH_IMAGE048
个Kraus 矩阵,
Figure DEST_PATH_IMAGE050
Figure DEST_PATH_IMAGE051
的复数共轭,
Figure DEST_PATH_IMAGE053
Figure DEST_PATH_IMAGE055
表示第1个逻辑超算子
Figure DEST_PATH_IMAGE057
所对应的 Kraus矩阵集合中Kraus矩阵的总数量,
Figure DEST_PATH_IMAGE059
表示第1个逻辑超算子
Figure DEST_PATH_IMAGE061
对应的Kraus矩阵集合 中的第
Figure DEST_PATH_IMAGE062
个Kraus矩阵,
Figure DEST_PATH_IMAGE064
Figure DEST_PATH_IMAGE065
的复数共轭,
Figure DEST_PATH_IMAGE067
Figure DEST_PATH_IMAGE068
表示所有逻辑超算子的总数 量,
Figure DEST_PATH_IMAGE023A
Figure DEST_PATH_IMAGE025AA
Figure DEST_PATH_IMAGE069
Figure DEST_PATH_IMAGE070
均为正整数。
The failure impact rate is:
Figure DEST_PATH_IMAGE002
,in,
Figure DEST_PATH_IMAGE004
represents the input state data,
Figure DEST_PATH_IMAGE006
express
Figure DEST_PATH_IMAGE008
The complex conjugate transpose of ,
Figure DEST_PATH_IMAGE009
represents the desired output status data,
Figure DEST_PATH_IMAGE011
Yes
Figure DEST_PATH_IMAGE013
The complex conjugate of ,
Figure DEST_PATH_IMAGE015
Yes
Figure DEST_PATH_IMAGE017
The complex conjugate of ,
Figure DEST_PATH_IMAGE019
,
Figure DEST_PATH_IMAGE021
,
Figure DEST_PATH_IMAGE023
means the first
Figure DEST_PATH_IMAGE025
logical superoperator
Figure DEST_PATH_IMAGE027
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure DEST_PATH_IMAGE029
means: the first
Figure DEST_PATH_IMAGE025A
logical superoperator
Figure DEST_PATH_IMAGE030
The first in the corresponding set of Kraus matrices
Figure DEST_PATH_IMAGE032
a Kraus matrix,
Figure DEST_PATH_IMAGE034
Yes
Figure DEST_PATH_IMAGE035
The complex conjugate of ,
Figure DEST_PATH_IMAGE037
,
Figure DEST_PATH_IMAGE039
means the first
Figure DEST_PATH_IMAGE041
logical superoperator
Figure DEST_PATH_IMAGE042
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure DEST_PATH_IMAGE044
means the first
Figure DEST_PATH_IMAGE045
logical superoperator
Figure DEST_PATH_IMAGE047
The first in the corresponding set of Kraus matrices
Figure DEST_PATH_IMAGE048
a Kraus matrix,
Figure DEST_PATH_IMAGE050
Yes
Figure DEST_PATH_IMAGE051
The complex conjugate of ,
Figure DEST_PATH_IMAGE053
,
Figure DEST_PATH_IMAGE055
represents the first logical superoperator
Figure DEST_PATH_IMAGE057
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure DEST_PATH_IMAGE059
represents the first logical superoperator
Figure DEST_PATH_IMAGE061
The first in the corresponding set of Kraus matrices
Figure DEST_PATH_IMAGE062
a Kraus matrix,
Figure DEST_PATH_IMAGE064
Yes
Figure DEST_PATH_IMAGE065
The complex conjugate of ,
Figure DEST_PATH_IMAGE067
,
Figure DEST_PATH_IMAGE068
represents the total number of all logical superoperators,
Figure DEST_PATH_IMAGE023A
,
Figure DEST_PATH_IMAGE025AA
,
Figure DEST_PATH_IMAGE069
and
Figure DEST_PATH_IMAGE070
All are positive integers.
2.一种量子电路的故障仿真系统,其特征在于,包括获取模块和计算模块;2. a fault simulation system of quantum circuit, is characterized in that, comprises acquisition module and calculation module; 所述获取模块用于:获取待测试故障量子电路所对应的超算子,并获取所述超算子中的每个逻辑超算子所分别对应的Kraus矩阵集合;The acquisition module is used for: acquiring the super-operator corresponding to the fault quantum circuit to be tested, and acquiring the Kraus matrix set corresponding to each logical super-operator in the super-operator; 所述计算模块用于:基于输入状态数据、期望输出状态数据以及所有的Kraus矩阵集合,计算所述待测试故障量子电路中的故障的故障影响率,其中,所述期望输出状态数据指:将所述输入状态数据输入已消除故障的待测试故障量子电路时,所输出的数据;The calculation module is used for: based on the input state data, the expected output state data and all the Kraus matrix sets, to calculate the failure influence rate of the failure in the to-be-tested failure quantum circuit, wherein the expected output state data refers to: The output data when the input state data is input to the fault quantum circuit to be tested whose fault has been eliminated; 所述故障影响率为:
Figure DEST_PATH_IMAGE002A
,其中,
Figure DEST_PATH_IMAGE004A
表示所 述输入状态数据,
Figure DEST_PATH_IMAGE071
表示
Figure DEST_PATH_IMAGE008A
的复数共轭转置,
Figure DEST_PATH_IMAGE072
表示所述期望输出状态数据,
Figure DEST_PATH_IMAGE011A
Figure DEST_PATH_IMAGE013A
的复数共轭,
Figure DEST_PATH_IMAGE015A
Figure DEST_PATH_IMAGE017A
的复数共轭,
Figure DEST_PATH_IMAGE073
Figure 687603DEST_PATH_IMAGE021
Figure DEST_PATH_IMAGE023AA
表示 第
Figure DEST_PATH_IMAGE025AAA
个逻辑超算子
Figure DEST_PATH_IMAGE042A
所对应的Kraus矩阵集合中Kraus矩阵的总数量,
Figure DEST_PATH_IMAGE074
表示:第
Figure DEST_PATH_IMAGE025AAAA
个逻 辑超算子
Figure DEST_PATH_IMAGE030A
对应的Kraus矩阵集合中的第
Figure DEST_PATH_IMAGE075
个Kraus矩阵,
Figure DEST_PATH_IMAGE076
Figure DEST_PATH_IMAGE035A
的复数共轭,
Figure DEST_PATH_IMAGE077
Figure 572120DEST_PATH_IMAGE039
表示第
Figure DEST_PATH_IMAGE078
个逻辑超算子
Figure DEST_PATH_IMAGE042AA
所对应的Kraus矩阵集合中 Kraus矩阵的总数量,
Figure DEST_PATH_IMAGE079
表示第
Figure DEST_PATH_IMAGE080
个逻辑超算子
Figure 335546DEST_PATH_IMAGE047
对应的Kraus矩阵集合中的第
Figure DEST_PATH_IMAGE081
个Kraus 矩阵,
Figure 653393DEST_PATH_IMAGE050
Figure 936607DEST_PATH_IMAGE051
的复数共轭,
Figure DEST_PATH_IMAGE053A
Figure DEST_PATH_IMAGE082
表示第1个逻辑超算子
Figure 477178DEST_PATH_IMAGE057
所对应的 Kraus矩阵集合中Kraus矩阵的总数量,
Figure DEST_PATH_IMAGE083
表示第1个逻辑超算子
Figure 540949DEST_PATH_IMAGE061
对应的Kraus矩阵集合 中的第
Figure DEST_PATH_IMAGE084
个Kraus矩阵,
Figure 21740DEST_PATH_IMAGE064
Figure 284095DEST_PATH_IMAGE065
的复数共轭,
Figure DEST_PATH_IMAGE067A
Figure DEST_PATH_IMAGE085
表示所有逻辑超算子的总数 量,
Figure DEST_PATH_IMAGE086
Figure DEST_PATH_IMAGE087
Figure DEST_PATH_IMAGE088
Figure DEST_PATH_IMAGE089
均为正整数。
The failure impact rate is:
Figure DEST_PATH_IMAGE002A
,in,
Figure DEST_PATH_IMAGE004A
represents the input state data,
Figure DEST_PATH_IMAGE071
express
Figure DEST_PATH_IMAGE008A
The complex conjugate transpose of ,
Figure DEST_PATH_IMAGE072
represents the desired output status data,
Figure DEST_PATH_IMAGE011A
Yes
Figure DEST_PATH_IMAGE013A
The complex conjugate of ,
Figure DEST_PATH_IMAGE015A
Yes
Figure DEST_PATH_IMAGE017A
The complex conjugate of ,
Figure DEST_PATH_IMAGE073
,
Figure 687603DEST_PATH_IMAGE021
,
Figure DEST_PATH_IMAGE023AA
means the first
Figure DEST_PATH_IMAGE025AAA
logical superoperator
Figure DEST_PATH_IMAGE042A
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure DEST_PATH_IMAGE074
means: the first
Figure DEST_PATH_IMAGE025AAAA
logical superoperator
Figure DEST_PATH_IMAGE030A
The first in the corresponding set of Kraus matrices
Figure DEST_PATH_IMAGE075
a Kraus matrix,
Figure DEST_PATH_IMAGE076
Yes
Figure DEST_PATH_IMAGE035A
The complex conjugate of ,
Figure DEST_PATH_IMAGE077
,
Figure 572120DEST_PATH_IMAGE039
means the first
Figure DEST_PATH_IMAGE078
logical superoperator
Figure DEST_PATH_IMAGE042AA
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure DEST_PATH_IMAGE079
means the first
Figure DEST_PATH_IMAGE080
logical superoperator
Figure 335546DEST_PATH_IMAGE047
The first in the corresponding set of Kraus matrices
Figure DEST_PATH_IMAGE081
a Kraus matrix,
Figure 653393DEST_PATH_IMAGE050
Yes
Figure 936607DEST_PATH_IMAGE051
The complex conjugate of ,
Figure DEST_PATH_IMAGE053A
,
Figure DEST_PATH_IMAGE082
represents the first logical superoperator
Figure 477178DEST_PATH_IMAGE057
The total number of Kraus matrices in the corresponding Kraus matrix set,
Figure DEST_PATH_IMAGE083
represents the first logical superoperator
Figure 540949DEST_PATH_IMAGE061
The first in the corresponding set of Kraus matrices
Figure DEST_PATH_IMAGE084
a Kraus matrix,
Figure 21740DEST_PATH_IMAGE064
Yes
Figure 284095DEST_PATH_IMAGE065
The complex conjugate of ,
Figure DEST_PATH_IMAGE067A
,
Figure DEST_PATH_IMAGE085
represents the total number of all logical superoperators,
Figure DEST_PATH_IMAGE086
,
Figure DEST_PATH_IMAGE087
,
Figure DEST_PATH_IMAGE088
and
Figure DEST_PATH_IMAGE089
All are positive integers.
3.一种存储介质,其特征在于,所述存储介质中存储有指令,当计算机读取所述指令时,使所述计算机执行如权利要求1所述的一种量子电路的故障仿真方法。3 . A storage medium, characterized in that the storage medium stores instructions, and when a computer reads the instructions, the computer is made to execute the method for simulating a fault of a quantum circuit according to claim 1 . 4.一种电子设备,其特征在于,包括处理器和权利要求3所述的存储介质,所述处理器执行所述存储介质中的指令。4. An electronic device, comprising a processor and the storage medium of claim 3, wherein the processor executes instructions in the storage medium.
CN202210352795.7A 2022-04-06 2022-04-06 Fault simulation method and system of quantum circuit, storage medium and electronic device Active CN114429095B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210352795.7A CN114429095B (en) 2022-04-06 2022-04-06 Fault simulation method and system of quantum circuit, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210352795.7A CN114429095B (en) 2022-04-06 2022-04-06 Fault simulation method and system of quantum circuit, storage medium and electronic device

Publications (2)

Publication Number Publication Date
CN114429095A CN114429095A (en) 2022-05-03
CN114429095B true CN114429095B (en) 2022-06-24

Family

ID=81314273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210352795.7A Active CN114429095B (en) 2022-04-06 2022-04-06 Fault simulation method and system of quantum circuit, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114429095B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118376908B (en) * 2024-06-24 2024-08-16 北京炎黄国芯科技有限公司 Integrated circuit testing method and system convenient for line connection

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111566990A (en) * 2017-11-08 2020-08-21 维戈大学 Secure Key Agreement with Untrusted Devices

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11836573B2 (en) * 2020-02-18 2023-12-05 Keysight Technologies Canada Inc. Systems and methods for use of a maximally sensitive set of states to identify coherent errors in a quantum system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111566990A (en) * 2017-11-08 2020-08-21 维戈大学 Secure Key Agreement with Untrusted Devices

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Supercomputer simulations of transmon quantum computers;Dennis Willsch;《Quantum Physics》;20200831;全文 *

Also Published As

Publication number Publication date
CN114429095A (en) 2022-05-03

Similar Documents

Publication Publication Date Title
CN109543212B (en) Programmable logic device function test method, device and computer storage medium
CN106570293B (en) A kind of method for calculating probability of the circuit signal reliability based on EPTM model
US20190311075A1 (en) Verification of Hardware Design for Data Transformation Pipeline with Equivalent Data Transformation Element Output Constraint
CN114429095B (en) Fault simulation method and system of quantum circuit, storage medium and electronic device
EP3997608A1 (en) Systems and methods for simulating a quantum processor
KR20180112725A (en) Device and method for detecting points of failures
CN114429096B (en) Fault simulation method and system of quantum circuit, storage medium and electronic device
CN115329972B (en) Quantum computer performance determining method and device, electronic equipment and medium
CN115204104A (en) Computing device, method of operating the same, and computer program product
CN109726821B (en) Data equalization method, apparatus, computer-readable storage medium and electronic device
US10169502B2 (en) Addressing of process and voltage points
CN111159011B (en) Instruction Vulnerability Prediction Method and System Based on Deep Random Forest
TW201142639A (en) Zone-based optimization framework
US20140244226A1 (en) Compact opc model generation using virtual data
KR101297484B1 (en) Method for modeling error of system on chip
US8397189B2 (en) Model checking in state transition machine verification
TWI488063B (en) Apparatus, method and computer-readable storage medium to optimize and verify a first circuit
WO2022255238A1 (en) Classical computer, information processing method and information processing program
CN118261095A (en) A fault simulation method and related equipment
Jahanirad et al. Sequential logic circuits reliability analysis
CN116909935B (en) Chip joint simulation method, device and medium based on single processing module interface
JP3660097B2 (en) Logic circuit type verification apparatus and verification method
TWI476616B (en) Estimation Method and Device of Initial Value for Simulation of DC Working Point
US20230325570A1 (en) Determining the location of safety mechanism within a circuit design
US20250200258A1 (en) Generalized qed pre-silicon verification framework

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant