KR20230155760A - Quantum Circuit Simulation Hardware - Google Patents

Quantum Circuit Simulation Hardware Download PDF

Info

Publication number
KR20230155760A
KR20230155760A KR1020220055340A KR20220055340A KR20230155760A KR 20230155760 A KR20230155760 A KR 20230155760A KR 1020220055340 A KR1020220055340 A KR 1020220055340A KR 20220055340 A KR20220055340 A KR 20220055340A KR 20230155760 A KR20230155760 A KR 20230155760A
Authority
KR
South Korea
Prior art keywords
quantum circuit
gate
quantum
state
states
Prior art date
Application number
KR1020220055340A
Other languages
Korean (ko)
Inventor
홍윤표
전석훈
김병수
최규현
Original Assignee
한국전자기술연구원
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 한국전자기술연구원 filed Critical 한국전자기술연구원
Priority to KR1020220055340A priority Critical patent/KR20230155760A/en
Priority to PCT/KR2022/007270 priority patent/WO2023214608A1/en
Publication of KR20230155760A publication Critical patent/KR20230155760A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena
    • G06N10/20Models of quantum computing, e.g. quantum circuits or universal quantum computers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena
    • G06N10/60Quantum algorithms, e.g. based on quantum optimisation, quantum Fourier or Hadamard transforms
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B82NANOTECHNOLOGY
    • B82YSPECIFIC USES OR APPLICATIONS OF NANOSTRUCTURES; MEASUREMENT OR ANALYSIS OF NANOSTRUCTURES; MANUFACTURE OR TREATMENT OF NANOSTRUCTURES
    • B82Y10/00Nanotechnology for information processing, storage or transmission, e.g. quantum computing or single electron logic

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computational Mathematics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Chemical & Material Sciences (AREA)
  • Nanotechnology (AREA)
  • Crystallography & Structural Chemistry (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

양자 회로 시뮬레이션 하드웨어가 제공된다. 본 발명의 실시예에 따른 양자 회로 시뮬레이터는, 컴퓨터 상에 시뮬레이션된 양자 회로를 구성하는 게이트의 타겟 큐빗을 기반으로 상태 벡터를 구성하는 상태들을 다수의 세트로 그룹핑하는 그룹핑부, 게이트 연산을 수행할 세트를 결정하는 결정부 및 결정된 세트에 대해 게이트 연산을 수행하는 연산부를 포함한다. 이에 의해, 양자 회로 모델을 양자 컴퓨터가 아닌 고전 컴퓨터에서 시뮬레이션함에 있어, 양자 회로의 연산 결과인 양자 출력 시 발생하는 상태 벡터를 적은 복잡도와 메모리로 연산할 수 있게 된다.Quantum circuit simulation hardware is provided. The quantum circuit simulator according to an embodiment of the present invention includes a grouping unit that groups the states that make up the state vector into a plurality of sets based on the target qubit of the gate that makes up the quantum circuit simulated on the computer, and a gate operation that is performed. It includes a decision unit that determines the set and an operation unit that performs a gate operation on the determined set. As a result, when simulating a quantum circuit model on a classical computer rather than a quantum computer, the state vector generated at the quantum output, which is the result of the calculation of the quantum circuit, can be calculated with less complexity and memory.

Description

양자 회로 시뮬레이션 하드웨어{Quantum Circuit Simulation Hardware}Quantum Circuit Simulation Hardware

본 발명은 양자 회로 모델의 시뮬레이터에 관한 것으로, 더욱 상세하게는 고전 컴퓨터에서 양자 회로 연산에서의 상태 벡터를 효율적으로 계산하기 위한 양자 회로 시뮬레이션 하드웨어에 관한 기술이다.The present invention relates to a simulator of a quantum circuit model, and more specifically, to a technology related to quantum circuit simulation hardware for efficiently calculating state vectors in quantum circuit operations on a classical computer.

양자 컴퓨터는 Shor 알고리즘, Groover 알고리즘 등 여러 새로운 알고리즘을 이용하여 기존 NP-complete 문제들을 다항 시간 내에 해결할 수 있는 컴퓨터로, 현재 소수의 특성을 활용한 RSA 암호체계를 붕괴시킬 수 있는 기술이다. 하지만 양자 컴퓨터를 실제로 가지고 연구를 수행하기는 자원의 한계가 있으므로, 양자 회로를 이용한 알고리즘 연구를 위해 고전 컴퓨터에서 시뮬레이션이 필수적이다.A quantum computer is a computer that can solve existing NP-complete problems within polynomial time using several new algorithms such as the Shor algorithm and Groover algorithm, and is a technology that can collapse the RSA encryption system that currently utilizes the characteristics of prime numbers. However, there are resource limitations in actually conducting research with quantum computers, so simulations on classical computers are essential for algorithmic research using quantum circuits.

양자 회로는 복소수로 구성된 2차원 행렬로 표현할 수 있는데, N 큐빗(Qubit)을 사용하는 양자 회로는 2N×2N의 행렬로 표현이 된다. 따라서 양자 우위를 점하는 50 큐빗의 시스템에서는 250×250의 복소수 행렬이 필요하므로 1.26×1030 개의 복소수가 필요한데, 이는 고전 컴퓨터의 데이터 저장 용량으로는 해결할 수 없는 크기이다. A quantum circuit can be expressed as a two-dimensional matrix composed of complex numbers, and a quantum circuit using N qubits is expressed as a 2 N × 2 N matrix. Therefore, in a 50-qubit system that enjoys quantum supremacy, a complex matrix of 2 50

따라서 이를 해결하기 위해 양자 회로를 연산할 때 사용해야 하는 연산량과 필요로 하는 메모리를 줄이기 위한 방안이 필요하다.Therefore, to solve this problem, a method is needed to reduce the amount of calculations and memory required when calculating quantum circuits.

본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 본 발명의 목적은, 양자 회로 모델을 고전 컴퓨터에서 시뮬레이션함에 있어, 양자 회로의 연산 결과인 양자 출력 시 발생하는 상태 벡터(State Vector)를 작은 복잡도와 메모리로 연산할 수 있는 양자 회로 시뮬레이션 하드웨어를 제공함에 있다.The present invention was created to solve the above problems, and the purpose of the present invention is to simulate the quantum circuit model on a classical computer, and to use the state vector generated at the quantum output, which is the result of the calculation of the quantum circuit. The goal is to provide quantum circuit simulation hardware that can operate with small complexity and memory.

상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 양자 회로 시뮬레이터는, 컴퓨터 상에 시뮬레이션된 양자 회로를 구성하는 게이트의 타겟 큐빗을 기반으로, 상태 벡터를 구성하는 상태들을 다수의 세트로 그룹핑하는 그룹핑부; 게이트 연산을 수행할 세트를 결정하는 결정부; 및 결정된 세트에 대해 게이트 연산을 수행하는 연산부;를 포함한다.A quantum circuit simulator according to an embodiment of the present invention to achieve the above object groups the states constituting the state vector into a plurality of sets based on the target qubit of the gate constituting the quantum circuit simulated on the computer. Grouping Department; a decision unit that determines a set to perform a gate operation; and an operation unit that performs a gate operation on the determined set.

그룹핑부는, 타겟 큐빗이 동일하고 나머지 큐빗은 다른 상태들을 동일 세트로 그룹핑할 수 있다.The grouping unit may group states in which the target qubit is the same and the remaining qubits are different into the same set.

결정부는, 그룹핑된 상태들 모두가 0이 아닌 세트에 대해서는, 게이트 연산을 수행하는 것으로 결정할 수 있다.The decision unit may decide to perform a gate operation on a set in which all grouped states are not 0.

결정부는, 그룹핑된 상태들 모두가 0인 세트에 대해서는, 게이트 연산을 수행하지 않는 것으로 결정할 수 있다.The decision unit may decide not to perform the gate operation on a set in which all grouped states are 0.

결정부는, 그룹핑된 상태들 중 일부가 0인 세트에 대해서는, 0이 아닌 상태와 게이트를 기초로 게이트 연산을 수행할지 여부를 결정할 수 있다.The decision unit may determine whether to perform a gate operation based on non-zero states and gates for a set in which some of the grouped states are 0.

결정부는, 게이트가 컨트롤 게이트이고 0인 상태가 컨트롤 큐빗이면, 게이트 연산을 수행하지 않는 것으로 결정할 수 있다.The decision unit may determine not to perform the gate operation if the gate is a control gate and the 0 state is a control qubit.

연산부는, 양자 회로를 구성하는 게이트들에 대해 게이트 단위로 양자 상태 벡터를 순차적으로 업데이트 하면서 연산할 수 있다.The calculation unit can perform calculations by sequentially updating the quantum state vector on a gate-by-gate basis for the gates constituting the quantum circuit.

결정부는, 결정을 위해 세트의 상태의 값이 0인 것을 판단하기 위해, 외부 메모리를 사용하지 않고 내부 메모리를 이용하여 저 지연으로 상태가 0인지 확인할 수 있다.In order to determine that the value of the state of the set for decision is 0, the decision unit can check whether the state is 0 with low delay by using internal memory instead of using external memory.

결정부는, 게이트가 컨트롤 게이트이고 0인 상태가 컨트롤 큐빗이면, 내부 메모리를 접근하지 않고 게이트 연산을 수행하지 않는 것으로 결정할 수 있다.The decision unit may determine not to access the internal memory and not perform the gate operation if the gate is a control gate and the 0 state is a control qubit.

본 발명의 다른 실시예에 따른 양자 회로 시뮬레이션 방법은, 컴퓨터 상에 시뮬레이션된 양자 회로를 구성하는 게이트의 타겟 큐빗을 기반으로, 상태 벡터를 구성하는 상태들을 다수의 세트로 그룹핑하는 단계; 게이트 연산을 수행할 세트를 결정하는 단계; 및 결정된 세트에 대해 게이트 연산을 수행하는 단계;를 포함한다.A quantum circuit simulation method according to another embodiment of the present invention includes grouping states constituting a state vector into a plurality of sets based on the target qubit of a gate constituting a quantum circuit simulated on a computer; determining a set to perform a gate operation on; and performing a gate operation on the determined set.

이상 설명한 바와 같이, 본 발명의 실시예들에 따르면, 양자 회로 모델을 양자 컴퓨터가 아닌 고전 컴퓨터에서 시뮬레이션함에 있어, 양자 회로의 연산 결과인 양자 출력 시 발생하는 상태 벡터를 적은 복잡도와 메모리로 연산할 수 있게 된다. 이에 의해 기존 시뮬레이션 방식에서 양자 회로의 상태 벡터 연산 시 요구되던 2N×2N의 데이터를 2N+1의 데이터로 줄일 수 있어 필요한 메모리 용량을 획기적으로 감소시킬 수 있게 된다.As described above, according to embodiments of the present invention, when simulating a quantum circuit model on a classical computer rather than a quantum computer, the state vector generated at the quantum output, which is the result of the calculation of the quantum circuit, can be calculated with less complexity and memory. It becomes possible. As a result , the 2 N

도 1은 본 발명의 일 실시예에 따른 양자 회로 시뮬레이션 시스템의 구성을 도시한 도면,
도 2는 양자 회로 시뮬레이션 가속기의 상세 구조를 도시한 도면,
도 3은 양자 회로 시뮬레이터의 상세 구조를 도시한 도면,
도 4는 양자 회로의 게이트를 예시한 도면,
도 5는 상태 그룹핑 결과를 예시한 도면,
도 6은 2 큐빗의 싱글 게이트를 예시한 도면,
도 7은 2 큐빗의 컨트롤 게이트를 예시한 도면,
도 8과 도 9는, 기존의 양자 회로 연산 방법의 설명에 제공되는 도면들,
도 10과 도 11은, 본 발명의 실시예에 따른 양자 회로 연산 방법의 설명에 제공되는 도면들이다.
1 is a diagram showing the configuration of a quantum circuit simulation system according to an embodiment of the present invention;
Figure 2 is a diagram showing the detailed structure of a quantum circuit simulation accelerator;
3 is a diagram showing the detailed structure of a quantum circuit simulator;
4 is a diagram illustrating a gate of a quantum circuit;
5 is a diagram illustrating the state grouping results;
6 is a diagram illustrating a 2-qubit single gate;
7 is a diagram illustrating a 2-qubit control gate;
Figures 8 and 9 are drawings provided to explain the existing quantum circuit calculation method,
10 and 11 are diagrams provided to explain the quantum circuit calculation method according to an embodiment of the present invention.

이하에서는 도면을 참조하여 본 발명을 보다 상세하게 설명한다.Hereinafter, the present invention will be described in more detail with reference to the drawings.

본 발명의 실시예에서는 고전 컴퓨터에서 실행되는 양자 회로 시뮬레이터가 양자 회로 연산에서 상태 벡터를 제한된 메모리를 이용하여 효율적으로 계산하기 위한 시뮬레이션 하드웨어를 제시한다.An embodiment of the present invention presents simulation hardware for a quantum circuit simulator running on a classical computer to efficiently calculate state vectors in quantum circuit operations using limited memory.

여기서 고전 컴퓨터는 비트(0 또는 1) 기반의 연산을 수행하는 현재 일반적으로 사용되고 있는 컴퓨터로, 큐빗(Qubit) 기반의 연산을 수행하는 양자 컴퓨터에 대응하는 개념이다.Here, a classical computer is a currently commonly used computer that performs bit (0 or 1)-based operations, and is a concept corresponding to a quantum computer that performs qubit-based operations.

양자 회로에서 상태 벡터의 효율적 계산을 위해, 본 발명의 실시예에서는 양자 회로를 구성하는 양자 게이트들에 대한 각 행렬들을 크로네커 곱(Kronecker Product) 하여 하나로 결합하는 행렬식을 계산하지 않고, 양자 회로를 구성하는 각 게이트 단위로 양자 상태 벡터를 순차적으로 연산한다.In order to efficiently calculate the state vector in the quantum circuit, in the embodiment of the present invention, the determinant that combines the matrices of the quantum gates constituting the quantum circuit into one by Kronecker product is not calculated, but the quantum circuit is Quantum state vectors are sequentially calculated for each gate unit.

즉 본 발명의 실시예에서는 양자 회로에서 다수의 게이트들로 구성된 부분을 게이트 단위로 분할하여, 각 게이트를 통과할 때마다 상태 벡터를 업데이트 하는 방식으로 연산하여, 많은 연산량과 메모리 사용량을 요구하는 크로네커 곱 연산을 배제함으로써 연산량과 메모리 사용량이 획기적으로 줄어들도록 하였다.That is, in the embodiment of the present invention, the part consisting of a number of gates in the quantum circuit is divided into gate units and the state vector is updated each time it passes through each gate, thereby requiring a large amount of calculation and memory usage. By excluding the Kerr product operation, the amount of computation and memory usage are dramatically reduced.

도 1은 본 발명의 일 실시예에 따른 양자 회로 시뮬레이션 시스템의 구성을 도시한 도면이다. 본 발명의 실시예에 따른 양자 회로 시뮬레이션 시스템은, 도시된 바와 같이, 호스트 시스템(100)과 양자 회로 시뮬레이션 가속기(200)를 포함하여 구성된다.Figure 1 is a diagram showing the configuration of a quantum circuit simulation system according to an embodiment of the present invention. As shown, the quantum circuit simulation system according to an embodiment of the present invention includes a host system 100 and a quantum circuit simulation accelerator 200.

양자 회로 시뮬레이션 가속기(200)는 양자 회로를 모사한 시뮬레이션 하드웨어로, FPGA(Field Programmable Gate Array)를 이용하여 구현할 수 있다. 호스트 시스템(100)은 양자 회로 시뮬레이션 가속기(200)의 양자 회로 시뮬레이터를 개발하기 위한 시스템이다.The quantum circuit simulation accelerator 200 is simulation hardware that simulates a quantum circuit and can be implemented using an FPGA (Field Programmable Gate Array). The host system 100 is a system for developing a quantum circuit simulator of the quantum circuit simulation accelerator 200.

도 2에는 양자 회로 시뮬레이션 가속기(200)의 상세 구조를 도시하였다. 도시된 바와 같이, 양자 회로 시뮬레이션 가속기(200)는 MCU(Micro Controller Unit)(210), 메모리(220), BUS(230) 및 양자 회로 시뮬레이터(240)를 포함하여 구성된다.Figure 2 shows the detailed structure of the quantum circuit simulation accelerator 200. As shown, the quantum circuit simulation accelerator 200 includes a Micro Controller Unit (MCU) 210, a memory 220, a BUS 230, and a quantum circuit simulator 240.

MCU(210)에는 호스트 시스템(100)에서 개발되어 컴파일된 펌웨어가 탑재된다. 펌웨어가 탑재된 MCU(210)는 호스트 시스템(100)으로부터 양자 회로 시뮬레이터(240)에서 모사할 양자 회로 데이터와 초기 양자 상태 데이터를 수신하여 메모리(220)에 저장한다.The MCU 210 is equipped with firmware developed and compiled in the host system 100. The MCU 210 equipped with firmware receives quantum circuit data and initial quantum state data to be simulated by the quantum circuit simulator 240 from the host system 100 and stores them in the memory 220.

양자 회로는 다양한 게이트들을 연결하여 구성한다. 게이트들에는 항등(identity) 게이트, 파울리(Pauli) 게이트, 클리포드(Clifford) 게이트와 같은 싱글 큐빗 게이트, 제어 파울리 게이트, 제어 하다마드(Hadamard) 게이트, 제어 회전 게이트, 토폴리(Toffoli) 게이트 등의 멀티 큐빗 게이트 등이 있다.Quantum circuits are constructed by connecting various gates. Gates include single-qubit gates such as identity gates, Pauli gates, and Clifford gates, controlled Pauli gates, controlled Hadamard gates, controlled rotation gates, and Toffoli gates. There are multi-qubit gates, etc.

양자 회로를 구성하는 게이트들은 행렬들로 표현된다. 호스트 시스템(100)이 이 행렬들을 MCU(210)로 전달하면, MCU(210)는 행렬들을 메모리(220)에 저장한다. 양자 회로 시뮬레이터(240)는 MCU(210)의 제어에 의해 메모리(220)에 저장된 행렬들을 이용하여 양자 연산을 수행한다.Gates that make up a quantum circuit are expressed as matrices. When the host system 100 transfers these matrices to the MCU 210, the MCU 210 stores the matrices in the memory 220. The quantum circuit simulator 240 performs quantum operations using matrices stored in the memory 220 under the control of the MCU 210.

양자 회로 시뮬레이터(240)에 의한 양자 연산 결과와 최종 양자 상태는 MCU(210)를 통해 호스트 시스템(100)으로 전달된다. BUS(240)는 양자 회로 시뮬레이션 가속기(200)의 구성들 간의 통신 인터페이스를 제공한다.The quantum operation results and final quantum state by the quantum circuit simulator 240 are transmitted to the host system 100 through the MCU 210. BUS 240 provides a communication interface between components of quantum circuit simulation accelerator 200.

도 3에는 양자 회로 시뮬레이터(240)의 상세 구조를 도시하였다. 도시된 바와 같이, 양자 회로 시뮬레이터(240)는 상태 그룹핑부(241), 연산 스킵 결정부(242), 연산부(243) 및 ZF(Zero Flag) SRAM(244)을 포함하여 구성된다.Figure 3 shows the detailed structure of the quantum circuit simulator 240. As shown, the quantum circuit simulator 240 includes a state grouping unit 241, an operation skip decision unit 242, an operation unit 243, and a Zero Flag (ZF) SRAM 244.

상태 그룹핑부(241)는 양자 회로를 구성하는 게이트의 타겟 큐빗을 기반으로, 상태 벡터를 구성하는 상태들을 그룹핑하여 출력한다. 구체적으로 상태 그룹핑부(242)는 타겟 큐빗이 동일하고 나머지 큐빗은 다른 상태 2개를 한 세트로 그룹핑한다.The state grouping unit 241 groups and outputs the states constituting the state vector based on the target qubit of the gate constituting the quantum circuit. Specifically, the state grouping unit 242 groups two states in which the target qubit is the same and the remaining qubits are different into one set.

N개의 큐빗으로 양자 회로에서 상태 벡터는 2N×1 행렬로 표현 가능하며, 행렬의 각 항(item)은 해당 상태(|000>, |001>, ... )가 측정될 확률을 나타낸다. 그리고 타겟 큐빗은 게이트가 적용되는 큐빗을 말한다.In a quantum circuit with N qubits, the state vector can be expressed as a 2 N × 1 matrix, and each item of the matrix represents the probability of measuring the corresponding state (|000>, |001>, ...). And the target qubit refers to the qubit to which the gate is applied.

도 4에 예시된 바와 같이 큐빗이 3개(q0,q1,q2)인 양자 회로에서 q0에 게이트가 있는 경우, 타겟 큐빗은 q0이며 상태 벡터를 구성하는 8개의 상태들은 도 5에 도시된 바와 같이 4개의 세트로 그룹핑된다.As illustrated in Figure 4, when there is a gate at q0 in a quantum circuit with three qubits (q0, q1, q2), the target qubit is q0 and the eight states constituting the state vector are as shown in Figure 5. Grouped into four sets.

상태 그룹핑부(241)에서 그룹핑되어 출력되는 세트는 도 5에 도시된 바와 같이 2개의 상태(s1, s2)로 구성되며, 2개의 인덱스(v1, v2)를 이용하여 명명한다. 하나의 게이트를 통과하면서 연산을 수행할 때 동일 세트에 있는 상태들(s1, s2)은 서로 관련이 있지만 다른 세트의 상태들과는 독립적이다.The set grouped and output from the state grouping unit 241 consists of two states (s1, s2) as shown in FIG. 5, and is named using two indices (v1, v2). When performing an operation while passing through one gate, the states (s1, s2) in the same set are related to each other, but are independent from the states in other sets.

연산 스킵 결정부(242)는 상태 그룹핑부(241)에서 그룹핑되어 출력되는 세트들 중 게이트 연산을 수행하지 않고 스킵(Skip)할 세트들과 게이트 연산을 수행할 세트들을 결정한다.The operation skip decision unit 242 determines sets to be skipped without performing the gate operation and sets to perform the gate operation among the sets grouped and output from the state grouping unit 241.

도 6에는 2 큐빗의 싱글 게이트를 나타내었다. 게이트를 통해 입력되는 세트가 (s1, s2)라고 하면 게이트의 출력 (s1', s2')은 다음과 같은 행렬 연산으로 나타낼 수 있다.Figure 6 shows a 2-qubit single gate. If the set input through the gate is (s1, s2), the output of the gate (s1', s2') can be expressed by the following matrix operation.

s1'을 연산하지 않고 바이패스 할 수 있는 경우는 다음과 같다.The cases that can be bypassed without calculating s1' are as follows.

s1이 0이고 u1이 0인 경우 또는 s2가 0이고 u0이 0인 경우If s1 is 0 and u 1 is 0 or if s2 is 0 and u 0 is 0

그리고 s2'을 연산하지 않고 바이패스 할 수 있는 경우는 다음과 같다.The cases in which s2' can be bypassed without calculating it are as follows.

s1이 0이고 u3이 0인 경우 또는 s2가 0이고 u2가 0인 경우If s1 is 0 and u 3 is 0 or if s2 is 0 and u 2 is 0

위 내용을 기초로 연산 스킵 결정부(242)는 그룹핑된 상태들 모두가 0이 아닌 세트에 대해서는 게이트 연산을 수행하는 것으로 결정하고, 그룹핑된 상태들 모두가 0인 세트에 대해서는 게이트 연산을 수행하지 않고 스킵하는 것으로 결정할 수 있다.Based on the above, the operation skip decision unit 242 determines to perform the gate operation on the set in which all grouped states are not 0, and does not perform the gate operation on the set in which all grouped states are 0. You can decide to skip it.

한편 상태가 0인지 여부는 외부 메모리(220)가 아닌 ZF SRAM(244)에서 확인하므로 실제 값을 읽어들이는 것 보다 적은 computational cost와 저 지연으로 상태 확인이 가능하다.Meanwhile, whether the state is 0 is checked in the ZF SRAM 244 rather than the external memory 220, so the state can be checked with less computational cost and lower delay than reading the actual value.

또한 연산 스킵 결정부(242)는 그룹핑된 상태들 중 일부가 0인 세트에 대해서는 0이 아닌 상태와 게이트를 기초로 게이트 연산을 수행할지 여부를 결정하게 된다.Additionally, the operation skip decision unit 242 determines whether to perform a gate operation based on non-zero states and gates for a set in which some of the grouped states are 0.

구체적으로 게이트가 도 6에 예시된 바와 같이 싱글 게이트인 경우, 연산 스킵 결정부(242)는 상태들 중 일부가 0인 세트라 하더라도 연산을 수행하는 것으로 결정한다.Specifically, when the gate is a single gate as illustrated in FIG. 6, the operation skip decision unit 242 determines to perform the operation even if some of the states are set to 0.

반면 게이트가 입력 큐빗에 따라 바이패스가 가능한 멀티 큐빗 게이트인 도 7에 예시된 바와 같은 컨트롤 게이트이고 0인 상태가 컨트롤 큐빗(q0)이면 ZF SRAM(244)의 접근과 게이트 연산을 수행하지 않고 스킵하는 것으로 결정한다.On the other hand, if the gate is a control gate as illustrated in FIG. 7, which is a multi-qubit gate that can be bypassed according to the input qubit, and the 0 state is the control qubit (q0), it is skipped without accessing the ZF SRAM 244 and performing the gate operation. Decide to do it.

연산부(243)는 연산 스킵 결정부(242)에 의해 게이트 연산을 수행하기로 결정된 세트의 상태들을 메모리(220)에서 순차적으로 읽어들여 게이트의 입력으로 하여 연산을 수행하고, 연산에 의해 업데이트된 상태들을 메모리(220)에 기록한다.The operation unit 243 sequentially reads the set of states determined to perform the gate operation by the operation skip decision unit 242 from the memory 220 and uses them as inputs to the gate to perform the operation, and the state updated by the operation. These are recorded in memory 220.

연산부(243)에 의한 연산은 양자 회로 시뮬레이터(240)에 의해 모사된 양자 회로를 구성하는 모든 게이트들 각각에 대해 연산이 완료될때까지 반복된다. 이에 의해 메모리(120)에는 최종으로 업데이트 된 최종 양자 상태 벡터가 남게 된다.The calculation by the calculation unit 243 is repeated for each of all gates constituting the quantum circuit simulated by the quantum circuit simulator 240 until the calculation is completed. As a result, the final updated quantum state vector remains in the memory 120.

이하에서는 임의의 양자 회로를 상정하여, 본 발명의 실시예에 따른 양자 회로 연산 방법을 기존의 양자 회로 연산 방법과 비교하여 설명한다.Hereinafter, assuming an arbitrary quantum circuit, the quantum circuit calculation method according to an embodiment of the present invention will be described by comparing it with the existing quantum circuit calculation method.

도 8은 임의의 양자 회로에 대한 기존의 양자 회로 연산 방법의 개념을 나타낸 도면이고, 도 9는 기존의 양자 회로 연산 방법을 나타낸 흐름도이다.FIG. 8 is a diagram showing the concept of an existing quantum circuit calculation method for an arbitrary quantum circuit, and FIG. 9 is a flowchart showing the existing quantum circuit calculation method.

도 8과 도 9에 나타난 바와 같이, 기존 방법에서는 8×1 크기의 상태 벡터 |A>가 입력되면, 먼저 큐빗에 존재하는 양자 게이트들을 크로네커 곱(ⓧ) 하여 8×8 크기의 유니터리 행렬(unitary matrix)을 계산한다. 다음 상태 벡터 |A>와 유니터리 행렬을 곱하여 |B>을 계산한다.As shown in Figures 8 and 9, in the existing method, when a state vector |A> of 8 Calculate (unitary matrix). Next, calculate |B> by multiplying the state vector |A> and the unitary matrix.

이후 다음 양자 게이트에 대한 유니터리 행렬(XⓧIⓧI)을 계산한 후 |B>에 곱하여 |C>로 업데이트 하고, 다음 양자 게이트에 대한 유니터리 행렬(CXⓧI)을 계산한 후 |C>에 곱하여 |D>로 업데이트 하여, 최종 상태 벡터를 출력하게 된다.After calculating the unitary matrix ( By multiplying C> and updating it to |D>, the final state vector is output.

도 10은 임의의 양자 회로에 대한 본 발명의 실시예에 따른 양자 회로 연산 방법의 개념을 나타낸 도면이고, 도 11은 본 발명의 실시예에 따른 양자 회로 연산 방법을 나타낸 흐름도이다.FIG. 10 is a diagram showing the concept of a quantum circuit calculation method according to an embodiment of the present invention for an arbitrary quantum circuit, and FIG. 11 is a flowchart showing a quantum circuit calculation method according to an embodiment of the present invention.

도 10과 도 11에 나타난 바와 같이, 본 발명의 실시예에 따른 방법에서는 양자 게이트 단위로 연산, 즉 한 번에 양자 게이트 하나씩만 연산한다. 이에 따라 3개의 H 게이트들을 크로네커 곱(ⓧ) 하지 않고 하니씩 분리하여 개별적으로 연산한다.As shown in Figures 10 and 11, in the method according to the embodiment of the present invention, calculation is performed on a quantum gate basis, that is, calculation is performed on only one quantum gate at a time. Accordingly, instead of Kronecker multiplying (ⓧ) the three H gates, they are separated by Hani and operated individually.

이에 따라 8×1 크기의 상태 벡터 |A>가 입력되면, 첫 번째 양자 게이트의 행렬과 곱하여 |B>로 업데이트 하고, 이후 두 번째 양자 게이트의 행렬과 곱하여 |C>로 업데이트 하며, 세 번째 양자 게이트의 행렬과 곱하여 |D>로 업데이트 한다.Accordingly, when a state vector of size 8×1 |A> is input, it is multiplied by the matrix of the first quantum gate and updated to |B>, then multiplied by the matrix of the second quantum gate and updated to |C>, and the third quantum gate It is multiplied by the gate matrix and updated to |D>.

이후에도 네 번째 양자 게이트의 행렬과 곱하여 |E>로 업데이트 하고, 다섯 번째 양자 게이트의 행렬과 곱하여 |F>로 업데이트 하여, 최종 상태 벡터를 출력하게 된다.Afterwards, it is multiplied with the matrix of the fourth quantum gate and updated to |E>, and multiplied by the matrix of the fifth quantum gate and updated to |F> to output the final state vector.

이에 의해 기존 방법 보다 게이트 연산 횟수(상태 벡터 업데이트 횟수)는 증가하였지만, 크로네커 곱을 수행하지 않기 때문에 연산량과 필요한 메모리는 획기적으로 줄어들게 된다. 구체적으로 기존 방법은 크로네커 곱의 수행으로 중간값을 저장하기 위한 공간으로 2N×2N이 필요하고, 입력 상태 벡터와 출력 상태 벡터를 저장하기 위한 공간으로 2N+1이 필요하다.As a result, the number of gate operations (number of state vector updates) increases compared to the existing method, but since Kronecker multiplication is not performed, the amount of calculations and required memory are dramatically reduced. Specifically , the existing method requires 2 N

반면 본 발명의 실시예에 따른 방법의 경우, 한 번에 양자 게이트 하나씩 처리되므로 입력 상태 벡터와 출력 상태 벡터를 저장하는 공간은 기존 방법과 동일하게 필요하지만, 양자 연산을 위해 필요한 중간값을 저장하는 공간은 큐빗 사이즈와 무관하게 2×2 만 필요하다. 또한 상태 벡터 연산을 수행함에 있어서도 행렬 곱셈이 아니라 출력 상태 벡터의 상태 수 만큼의 곱셈과 덧셈 연산만을 수행하므로 계산 복잡도 측면에서도 유리한 이점을 갖는다.On the other hand, in the case of the method according to the embodiment of the present invention, since one quantum gate is processed at a time, the same space for storing the input state vector and the output state vector is required as the existing method, but the space for storing the intermediate value required for quantum operation is required. The space required is only 2×2 regardless of the qubit size. In addition, when performing state vector operations, only multiplication and addition operations corresponding to the number of states of the output state vector are performed rather than matrix multiplication, which is advantageous in terms of computational complexity.

지금까지 상태 벡터를 효율적으로 계산하는 양자 회로 시뮬레이션 장치에 대해 바람직한 실시예를 들어 상세히 설명하였다.So far, a quantum circuit simulation device that efficiently calculates state vectors has been described in detail using preferred embodiments.

본 발명의 실시예에서는 양자 회로 모델을 고전 컴퓨터에서 시뮬레이션함에 있어, 양자 회로의 연산 결과인 양자 출력 시 발생하는 상태 벡터를 적은 메모리로 연산할 수 있는 하드웨어 구조를 제시하였다.In an embodiment of the present invention, when simulating a quantum circuit model on a classical computer, a hardware structure that can calculate the state vector generated at the quantum output, which is the result of the calculation of the quantum circuit, with a small memory is presented.

본 발명의 실시예에서는 여러 양자 게이트로 구성된 양자 회로에서 2N×2N 크기를 갖는 중간 유니터리 행렬을 사용하여 최종 상태 벡터를 계산하지 않고, 단일 양자 게이트의 2×2 단위 연산으로 반복적으로 나누어 연산하여 2N+1의 크기를 갖는 상태 벡터 단위로 중간 결과를 사용하여 메모리 소모를 줄였다.In an embodiment of the present invention, the final state vector is not calculated using an intermediate unitary matrix with a size of 2 N × 2 N in a quantum circuit composed of several quantum gates, but is repeatedly divided into 2 × 2 unitary operations of a single quantum gate. Memory consumption was reduced by using intermediate results in units of state vectors with a size of 2N +1 .

또한 본 발명의 실시예에서는 게이트의 타겟 큐빗을 기반으로 서로 관련이 있는 상태들 끼리 세트로 그룹핑하여, 상태 값과 게이트의 종류에 따라 게이트 연산을 바이패스할 수 있는 경우 연산을 스킵하여 latency와 전력 소모를 감소시켰다.Additionally, in an embodiment of the present invention, states that are related to each other are grouped into a set based on the target qubit of the gate, and if the gate operation can be bypassed depending on the state value and type of gate, the operation is skipped to increase latency and power. Consumption was reduced.

한편 본 실시예에 따른 장치와 방법의 기능을 수행하게 하는 컴퓨터 프로그램을 수록한 컴퓨터로 읽을 수 있는 기록매체에도 본 발명의 기술적 사상이 적용될 수 있음은 물론이다. 또한, 본 발명의 다양한 실시예에 따른 기술적 사상은 컴퓨터로 읽을 수 있는 기록매체에 기록된 컴퓨터로 읽을 수 있는 코드 형태로 구현될 수도 있다. 컴퓨터로 읽을 수 있는 기록매체는 컴퓨터에 의해 읽을 수 있고 데이터를 저장할 수 있는 어떤 데이터 저장 장치이더라도 가능하다. 예를 들어, 컴퓨터로 읽을 수 있는 기록매체는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광디스크, 하드 디스크 드라이브, 등이 될 수 있음은 물론이다. 또한, 컴퓨터로 읽을 수 있는 기록매체에 저장된 컴퓨터로 읽을 수 있는 코드 또는 프로그램은 컴퓨터간에 연결된 네트워크를 통해 전송될 수도 있다.Meanwhile, of course, the technical idea of the present invention can be applied to a computer-readable recording medium containing a computer program that performs the functions of the device and method according to this embodiment. Additionally, the technical ideas according to various embodiments of the present invention may be implemented in the form of computer-readable code recorded on a computer-readable recording medium. A computer-readable recording medium can be any data storage device that can be read by a computer and store data. For example, of course, computer-readable recording media can be ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical disk, hard disk drive, etc. Additionally, computer-readable codes or programs stored on a computer-readable recording medium may be transmitted through a network connected between computers.

또한 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.In addition, although preferred embodiments of the present invention have been shown and described above, the present invention is not limited to the specific embodiments described above, and can be used in the technical field to which the invention pertains without departing from the gist of the present invention as claimed in the claims. Of course, various modifications can be made by those skilled in the art, and these modifications should not be understood individually from the technical idea or perspective of the present invention.

100 : 호스트 컴퓨터
200 : 양자 회로 시뮬레이션 가속기
240 : 양자 회로 시뮬레이터
241 : 상태 그룹핑부
242 : 연산 스킵 결정부
243 : 연산부
244 : ZF SRAM
100: host computer
200: Quantum circuit simulation accelerator
240: Quantum circuit simulator
241: Status grouping unit
242: Operation skip decision unit
243: Calculation unit
244: ZF SRAM

Claims (10)

컴퓨터 상에 시뮬레이션된 양자 회로를 구성하는 게이트의 타겟 큐빗을 기반으로, 상태 벡터를 구성하는 상태들을 다수의 세트로 그룹핑하는 그룹핑부;
게이트 연산을 수행할 세트를 결정하는 결정부; 및
결정된 세트에 대해 게이트 연산을 수행하는 연산부;를 포함하는 것을 특징으로 하는 양자 회로 시뮬레이터.
A grouping unit that groups the states constituting the state vector into a plurality of sets based on the target qubit of the gate constituting the quantum circuit simulated on the computer;
a decision unit that determines a set to perform a gate operation; and
A quantum circuit simulator comprising a calculation unit that performs a gate operation on the determined set.
청구항 1에 있어서,
그룹핑부는,
타겟 큐빗이 동일하고 나머지 큐빗은 다른 상태들을 동일 세트로 그룹핑하는 것을 특징으로 하는 양자 회로 시뮬레이터.
In claim 1,
Grouping department,
A quantum circuit simulator characterized by grouping states in which the target qubit is the same and the remaining qubits are different into the same set.
청구항 2에 있어서,
결정부는,
그룹핑된 상태들 모두가 0이 아닌 세트에 대해서는, 게이트 연산을 수행하는 것으로 결정하는 것을 특징으로 하는 양자 회로 시뮬레이터.
In claim 2,
The decision department,
A quantum circuit simulator characterized in that it determines to perform a gate operation for a set in which all grouped states are not 0.
청구항 3에 있어서,
결정부는,
그룹핑된 상태들 모두가 0인 세트에 대해서는, 게이트 연산을 수행하지 않는 것으로 결정하는 것을 특징으로 하는 양자 회로 시뮬레이터.
In claim 3,
The decision department,
A quantum circuit simulator characterized in that for a set in which all grouped states are 0, a gate operation is not performed.
청구항 4에 있어서,
결정부는,
그룹핑된 상태들 중 일부가 0인 세트에 대해서는, 0이 아닌 상태와 게이트를 기초로 게이트 연산을 수행할지 여부를 결정하는 것을 특징으로 하는 양자 회로 시뮬레이터.
In claim 4,
The decision department,
For a set in which some of the grouped states are 0, a quantum circuit simulator characterized in that it determines whether to perform a gate operation based on the non-zero state and the gate.
청구항 5에 있어서,
결정부는,
게이트가 컨트롤 게이트이고 0인 상태가 컨트롤 큐빗이면, 게이트 연산을 수행하지 않는 것으로 결정하는 것을 특징으로 하는 양자 회로 시뮬레이터.
In claim 5,
The decision department,
A quantum circuit simulator characterized in that if the gate is a control gate and the 0 state is a control qubit, it is decided not to perform the gate operation.
청구항 2에 있어서,
결정부는,
결정을 위해 세트의 상태의 값이 0인 것을 판단하기 위해, 외부 메모리를 사용하지 않고 내부 메모리를 이용하여 저 지연으로 상태가 0인지 확인하는 것을 특징으로 하는 양자 회로 시뮬레이터.
In claim 2,
The decision department,
A quantum circuit simulator characterized by checking whether the state is 0 with low delay using internal memory rather than using external memory to determine that the value of the state of the set is 0.
청구항 7에 있어서,
결정부는,
게이트가 컨트롤 게이트이고 0인 상태가 컨트롤 큐빗이면, 내부 메모리를 접근하지 않고 게이트 연산을 수행하지 않는 것으로 결정하는 것을 특징으로 하는 양자 회로 시뮬레이터.
In claim 7,
The decision department,
A quantum circuit simulator characterized in that, if the gate is a control gate and the 0 state is a control qubit, it is determined not to access the internal memory and not perform the gate operation.
청구항 1에 있어서,
연산부는,
양자 회로를 구성하는 게이트들에 대해 게이트 단위로 양자 상태 벡터를 순차적으로 업데이트 하면서 연산하는 것을 특징으로 하는 양자 회로 시뮬레이터.
In claim 1,
The calculation department,
A quantum circuit simulator that operates by sequentially updating the quantum state vector on a gate-by-gate basis for the gates that make up the quantum circuit.
컴퓨터 상에 시뮬레이션된 양자 회로를 구성하는 게이트의 타겟 큐빗을 기반으로, 상태 벡터를 구성하는 상태들을 다수의 세트로 그룹핑하는 단계;
게이트 연산을 수행할 세트를 결정하는 단계; 및
결정된 세트에 대해 게이트 연산을 수행하는 단계;를 포함하는 것을 특징으로 하는 양자 회로 시뮬레이션 방법.
Grouping states constituting a state vector into a plurality of sets based on target qubits of gates constituting a quantum circuit simulated on a computer;
determining a set to perform a gate operation on; and
A quantum circuit simulation method comprising: performing a gate operation on the determined set.
KR1020220055340A 2022-05-04 2022-05-04 Quantum Circuit Simulation Hardware KR20230155760A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020220055340A KR20230155760A (en) 2022-05-04 2022-05-04 Quantum Circuit Simulation Hardware
PCT/KR2022/007270 WO2023214608A1 (en) 2022-05-04 2022-05-23 Quantum circuit simulation hardware

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220055340A KR20230155760A (en) 2022-05-04 2022-05-04 Quantum Circuit Simulation Hardware

Publications (1)

Publication Number Publication Date
KR20230155760A true KR20230155760A (en) 2023-11-13

Family

ID=88646529

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220055340A KR20230155760A (en) 2022-05-04 2022-05-04 Quantum Circuit Simulation Hardware

Country Status (2)

Country Link
KR (1) KR20230155760A (en)
WO (1) WO2023214608A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR3064380B1 (en) * 2017-03-24 2019-04-19 Bull S.A.S. METHOD FOR SIMULATING A QUANTUM CIRCUIT ON A CLASSIC COMPUTER
US11373112B2 (en) * 2020-01-24 2022-06-28 United States Of America As Represented By The Secretary Of The Navy Quantum computer based method for analyzing cyber data and spectra while performing optimization based on the analysis
CN111510158B (en) * 2020-04-15 2021-10-15 腾讯科技(深圳)有限公司 Fault-tolerant error-correcting decoding method, device and chip of quantum circuit
US20210342730A1 (en) * 2020-05-01 2021-11-04 equal1.labs Inc. System and method of quantum enhanced accelerated neural network training
US11625639B2 (en) * 2020-09-28 2023-04-11 Beit Inc. Controllable quantum logic gates with measurement and methods for use therewith

Also Published As

Publication number Publication date
WO2023214608A1 (en) 2023-11-09

Similar Documents

Publication Publication Date Title
CN109800883B (en) Quantum machine learning framework construction method and device and quantum computer
JP7186891B2 (en) Quantum error correction decoding method, device, chip, computer equipment, and computer program based on neural network
KR102618148B1 (en) Fault-tolerant and error-correcting decoding method and device for quantum circuits, and chip
JP7186797B2 (en) Method and system for quantum computing
CN110516810B (en) Quantum program processing method and device, storage medium and electronic device
US20210295168A1 (en) Gradient compression for distributed training
CN110826719A (en) Quantum program processing method and device, storage medium and electronic device
CN111914378B (en) Single-amplitude quantum computing simulation method and device
Khalil et al. Distributed whale optimization algorithm based on MapReduce
CN114764549B (en) Quantum circuit simulation calculation method and device based on matrix product state
KR102550463B1 (en) Solving Complex Problems with Self-Organizing Logic Gates and Circuits and Self-Organizing Circuits
CN114219076A (en) Quantum neural network training method and device, electronic device and medium
CN114511094B (en) Quantum algorithm optimization method and device, storage medium and electronic device
JP7381723B2 (en) Quantum operation execution method and device, quantum operation control waveform generation method and device, quantum operation chip, computer device and program
Moreno Network reliability assessment using a cellular automata approach
US11568217B2 (en) Sparse modifiable bit length deterministic pulse generation for updating analog crossbar arrays
KR20230155760A (en) Quantum Circuit Simulation Hardware
WO2020200774A1 (en) Method for flexible, fast all-reduce on arbitrary tree topology
KR20230155761A (en) Quantum circuit computation method for efficiently computing state vectors
CN117709415A (en) Quantum neural network model optimization method and device
CN112651492A (en) Self-connection width graph convolution neural network model and training method thereof
US20220019876A1 (en) Pulse generation for updating crossbar arrays
CN113887730A (en) Quantum simulator implementation method and device, related equipment and quantum simulation method
CN113112400A (en) Model training method and model training device
US11163707B2 (en) Virtualization in hierarchical cortical emulation frameworks