CN117236457A - Method, system and electronic device for operating and using quantum simulator - Google Patents

Method, system and electronic device for operating and using quantum simulator Download PDF

Info

Publication number
CN117236457A
CN117236457A CN202311504593.0A CN202311504593A CN117236457A CN 117236457 A CN117236457 A CN 117236457A CN 202311504593 A CN202311504593 A CN 202311504593A CN 117236457 A CN117236457 A CN 117236457A
Authority
CN
China
Prior art keywords
quantum
gpu
quantum simulator
simulator
operating
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.)
Pending
Application number
CN202311504593.0A
Other languages
Chinese (zh)
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.)
Qike Quantum Technology Zhuhai Co ltd
Guokaike Quantum Technology Anhui Co ltd
Original Assignee
Qike Quantum Technology Zhuhai Co ltd
Guokaike Quantum Technology Anhui Co ltd
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 Qike Quantum Technology Zhuhai Co ltd, Guokaike Quantum Technology Anhui Co ltd filed Critical Qike Quantum Technology Zhuhai Co ltd
Priority to CN202311504593.0A priority Critical patent/CN117236457A/en
Publication of CN117236457A publication Critical patent/CN117236457A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a method, a system and electronic equipment for running and using a quantum simulator, and relates to the technical field of quantum computing, wherein the method for running the quantum simulator comprises the steps of identifying the type of a Graphic Processor (GPU) used by current equipment, acquiring an adaptive driving program according to the type of the Graphic Processor (GPU), loading the driving program to the Graphic Processor (GPU), and deploying the quantum simulator to the Graphic Processor (GPU) after the driving program is loaded.

Description

Method, system and electronic device for operating and using quantum simulator
Technical Field
The present application relates to the field of quantum computing technology, and in particular to a method, system, electronic device and computer readable storage medium for operating and using a quantum simulator.
Background
Quantum computing theory has shown its great potential in solving some important problems beyond the computing power of the system, for example, in cryptography, financial modeling and machine learning scenarios. At present, more and more quantum computers are proposed, but an extensible general quantum computer has not been developed, so before the general quantum computer is developed, the huge superiority exhibited by the quantum computer lacks verification of a true machine, and therefore, how to verify the huge superiority exhibited by the quantum computer is particularly important. Quantum simulators are used to simulate quantum systems (quantum computers) as one of the important research directions for quantum computing to support research of quantum algorithms and applications.
The current quantum simulator adopts models including a quantum circuit model, an adiabatic quantum computing model, an One-way quantum computing model, a topology quantum computing model and the like. Quantum simulators using a quantum circuit model include a quantum simulator Qiskit developed by IBM corporation and a quantum simulator ProjectQ developed by the fedband institute of technology, zurich, all of which have the following drawbacks:
(1) Because interfaces of GPUs produced by various merchants (NVIDIA, AMD and the like) are not unified, and meanwhile, the types of graphics processors (Graphics Processing Unit, GPU) cannot be automatically identified by the quantum simulators, before the quantum simulators are operated, the types of the GPUs are required to be definitely determined by a user, so that when the user uses the GPU to simulate quantum computation, different adaptation programs are required to be written for the GPUs of different types, and meanwhile, the types of the GPUs used by the current equipment are required to be definitely determined by the user when the user uses quantum programming software, otherwise, the GPU cannot be normally used for operation, and professional requirements on the user are strong, so that the GPU is not easy to use;
(2) The ability to handle matrix operations is low, resulting in a low efficiency of running the quantum simulator.
Disclosure of Invention
In view of the above-described drawbacks, embodiments of the present application provide a method, system, electronic device, and computer-readable storage medium for operating and using a quantum simulator.
In a first aspect, a method for operating a quantum simulator provided by an embodiment of the present application includes:
the type of graphics processor GPU currently used by the device is identified.
And acquiring an adaptive driver according to the type of the GPU, and loading the driver to the GPU.
And after the driver is loaded, deploying a quantum simulator to the GPU.
And operating the quantum simulator by using the GPU.
In some examples, with the graphics processor GPU, running the quantum simulator includes:
and adopting a multi-step computing mode, and respectively computing a result state vector obtained after each quantum gate of the quantum simulator acts on the quantum bit by the GPU.
In some examples, in a multi-step computing manner, the graphics processor GPU calculates, respectively, a resultant state vector obtained after each quantum gate of the quantum simulator acts on a qubit, where the resultant state vector includes:
and adopting a matrix partitioning mode, wherein the graphic processor GPU respectively and sequentially executes each step in a plurality of steps to obtain a result state vector obtained after each quantum gate of the quantum simulator acts on the quantum bit.
In some examples, identifying the type of graphics processor GPU that is currently being used by the device includes:
using the Taichi graphics library, the type of graphics processor GPU currently used by the device is identified.
In a second aspect, a system for operating a quantum simulator provided by an embodiment of the present application includes:
and an identification module configured to identify a type of graphics processor GPU used by the current device.
And the loading module is configured to acquire a corresponding driver according to the type of the GPU and load the driver to the GPU.
A deployment module configured to deploy a quantum simulator to the graphics processor GPU.
And the running module is configured to run the quantum simulator by using the GPU.
In a third aspect, a method for using a quantum simulator provided by an embodiment of the present application includes the steps of:
judging whether the quantum simulator is a local quantum simulator or not according to a type identifier preset by the quantum simulator to be used.
If the quantum simulator is determined to be a local quantum simulator, judging whether the sub-simulator uses a GPU running mode or not according to a running mode identifier preset by the quantum simulator.
If the quantum simulator is determined to use the GPU running mode, judging whether available GPU exists in the current equipment.
If it is determined that a current device has a usable GPU, then the quantum simulator is run using the GPU and based on the method for running a quantum simulator disclosed in the first aspect.
In a fourth aspect, a system for using a quantum simulator disclosed in an embodiment of the present application includes:
and the judging module is configured to judge whether the quantum simulator is a local quantum simulator according to the type identifier of the quantum simulator to be used.
The judging module is further configured to judge whether the quantum simulator uses the GPU operation mode according to the operation mode of the quantum simulator.
The judging module is further configured to judge whether the available GPU exists in the current device.
A run module configured to run the quantum simulator using the GPU and based on the method for running a quantum simulator disclosed in the first aspect.
In a fifth aspect, an electronic device according to an embodiment of the present application includes a processor and computer instructions stored in a memory and executable on the processor, the processor executing the method according to the first or third aspect when the computer instructions are executed.
In a sixth aspect, an embodiment of the present application discloses a computer readable storage medium, where the computer readable storage medium stores computer instructions for causing a computer to perform the method disclosed in the first aspect or the third aspect.
Compared with the prior art, the method, the system, the electronic equipment and the computer readable storage medium for running and using the quantum simulator disclosed by the embodiment of the application have the following beneficial effects:
(1) By automatically identifying the type of the GPU, a driving program matched with the GPU is acquired according to the type, so that the self-adaption of the GPU is realized, and the usability of the quantum simulator is improved;
(2) In the process of operating the quantum simulator, a multi-step operation mode is adopted, so that the calculation complexity is simplified, and the efficiency of operating the quantum simulator is improved;
(3) In the process of running the quantum simulator, a matrix blocking operation mode is adopted, so that multithread parallel calculation is realized, the calculation process is optimized, the calculation efficiency is further improved, and the efficiency of running the quantum simulator is further improved.
Drawings
For a clearer description of embodiments of the application or of solutions according to the prior art, the following description will make a brief introduction to the drawings used in the embodiments or description of the prior art, it being obvious that the drawings in the description of the following are some embodiments of the application and that other drawings can be obtained from them without the aid of inventive labour for a person skilled in the art.
Fig. 1 is a flow chart of a method for operating a quantum simulator according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a system for operating a quantum simulator according to an embodiment of the present application.
Fig. 3 is a flow chart of a method for using a quantum simulator according to an embodiment of the present application.
Fig. 4 is a schematic diagram of a system architecture for using a quantum simulator according to an embodiment of the present application.
Fig. 5 is a functional block diagram of an electronic device as a classical computing device according to one embodiment of the application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Interpretation of the terms
The quantum simulator is a calculation tool capable of simulating the behavior of a quantum system, and the basic working principle of the quantum simulator is to simulate the quantum system through the interaction between quantum bits, calculate the state evolution of the quantum system and verify the calculation result. Quantum simulators are capable of simulating more complex problems than traditional simulators and exhibit the advantages of quantum computing to some extent.
Graphics processor GPUs are parallel computing devices that can speed up computation and simulation. In quantum computation and simulation, the GPU can accelerate the computation and simulation speed, and the computation and simulation efficiency and accuracy are improved. In accelerating quantum computation and simulation using a GPU, a GPU acceleration library and a quantum computation and simulation framework are required. The GPU acceleration library is a software library and can realize GPU acceleration calculation and simulation. The quantum computing and simulating framework is a software framework and can realize the related functions of quantum computing and simulating. Common GPU acceleration libraries include CUDA, openCL, etc., and common quantum computing and simulation frameworks include Qiskit, cirq, projectQ, etc.
Methods, systems, electronic devices, and computer-readable storage media for operating and using quantum simulators provided in embodiments of the present application are described in detail below.
As a specific embodiment of the present application, as shown in fig. 1, the method for operating and using a quantum simulator provided in the embodiment of the present application includes the following steps:
s101, identifying the type of the GPU used by the current device.
Specifically, the type of the graphics processor GPU may be determined according to the manufacturer and model of the graphics processor GPU. The current device may be a classical computing device such as a classical computer, a tablet computer, etc.
In some examples, the type of graphics processor GPU currently used by the device is identified using a Taichi graphics library.
S102, according to the type of the GPU, an adaptive driver is obtained and loaded to the GPU, so that the self-adaption of the GPU is realized, and the usability of the quantum simulator is improved.
Specifically, the GPU needs to load a driver adapted to the GPU to operate normally.
And S103, after the driver is loaded, deploying the quantum simulator to the GPU.
S104, using the graphic processor GPU to run the quantum simulator.
In particular, GPUs can be used to accelerate classical computational tasks in quantum computing, such as optimizing and accelerating in classical parts of quantum algorithms, improving overall computational efficiency.
In some examples, with a graphics processor GPU, running the quantum simulator includes:
and respectively calculating result state vectors obtained after each quantum gate of the quantum simulator acts on the quantum bit by adopting a multi-step calculation mode by using a Graphic Processor (GPU).
Specifically, for unitary matricesResultant state vector u|ψ after acting on the qubits>The process of (1) is divided into a plurality of steps for calculation, namely +.>And->The three steps of calculation simplify the complexity of calculation and improve the efficiency of running the quantum simulator, wherein I is an identity matrix.
Assuming the number of qubits n=3, in the hilbert space, the initial quantum state of the qubitCan be expressed as a unit vector: />
Unitary matrixAt the time, the result state vector +.>The calculation process of (1) is divided intoThe specific calculation process comprises the following steps:wherein, in this step, +_A->The calculation process of the step (a) can be performed simultaneously, so that the parallel calculation of the step (a) is realized;
wherein, in this step,and->The calculation processes of (a) can be performed simultaneously, and the parallel calculation of the step is realized.
Wherein the matrices H and I are defined as follows:
,/>
in some examples, using a multi-step operation, the graphics processor GPU respectively calculates a resultant state vector obtained after each quantum gate of the quantum simulator acts on the qubit, including:
and adopting a matrix blocking mode, and respectively and sequentially executing each step in the steps by the GPU to obtain a result state vector obtained after each quantum gate of the quantum simulator acts on the quantum bit.
Specifically, a quantum simulator based on a quantum circuit model uses complex vectors to represent quantum states and complex matrices to represent quantum gates, and simulates the behavior of a quantum system through the operation of the matrices. The evolution of the quantum states can be described using quantum circuits in which one quantum gate corresponds to a unitary matrix U and the quantum state of one quantum bit corresponds to a unit vector in the hilbert spaceAfter the quantum gate acts on the quantum bit, a result state vector under the action of the unitary matrix U is obtained. For example, n qubits are subjected toThe size of unitary matrix U corresponding to each quantum gate in the quantum circuit is N×N, and the unit vector +.>And the resulting state vector->Is n×1, where n=2 n
In particular, the quantum system can simulate other individual quantum gates, such as quantum T gate, quantum H gate and quantum CNOT gate, with a small number of quantum gates, indicating that the operation object of each quantum gate in the quantum circuit involves at most two quantum bits, resulting in a large number of zero elements in the unitary matrix U. Based on the characteristic that the unitary matrix U is a sparse matrix, the result state vector under the action of the unitary matrix U can be calculated through a matrix blocking mode. Resulting state vector under unitary matrix U>In the calculation process of (1), the submatrix U of the unitary matrix U b (size M×M, M)<N) as a block, performs a matrix block operation with the unitary matrix I, i.e., unitary matrix U multiplied by the unit vector |ψ>The operation of (1) is decomposed into a plurality of unit matrixes multiplied by unit vectors, and the state vector U|psi is calculated by adopting multithreading parallel computing based on the characteristic that each element is mutually independent in the matrix multiplication operation process>The calculation process is optimized, and the calculation efficiency is further improved, namely, the efficiency of running the quantum simulator is further improved.
Specifically, unitary matrix U is multiplied by a unit vectorThe operation of (a) is converted into->In which the identity matrix I l Is +.>The specific operation process is as follows:
wherein,is a unit vector +.>I (i=0,) L-1) segment vectors, i.e., multiplication of a matrix of size n×n with an N-dimensional vector is decomposed into multiplication of L matrices of size m×m with corresponding M-dimensional vectors, respectively.
In the embodiment of the application, the Taichi graphic library is directly adopted to realize the multithreading parallel computation so as to optimize the matrix computation. The Taichi graphic library is a programming language embedded in a Python environment and used in a special application field, and can compile a custom function into a machine instruction code to be executed on a CPU or a GPU in parallel, so that the performance is ensured, and the efficiency is ensured. At the CPU:13th Gen Intel (R) Core (TM) i9-13900HX 2.20 GHz, RAM: 16GB, operating system: under the operating environment of the Chinese version of Windows 11 family, when the number of prime numbers between 1 and 10000000 is counted, the calculation time of the Taichi graphic library is 0.187 seconds, the calculation time of the Python library is 93.635 seconds, and the calculation speed of the Taichi is 500 times of that of the Python, so that the calculation efficiency is greatly improved.
As shown in fig. 2, a system for operating a quantum simulator according to an embodiment of the present application includes:
and an identification module configured to identify a type of graphics processor GPU used by the current device.
And the loading module is configured to acquire a corresponding driver according to the type of the GPU and load the driver to the GPU.
And a deployment module configured to deploy the quantum simulator to the graphics processor GPU.
And the running module is configured to run the quantum simulator by using the GPU.
As shown in fig. 3, a method for using a quantum simulator provided by an embodiment of the present application includes the following steps:
s201, judging whether the quantum simulator is a local quantum simulator according to a type identifier preset by the quantum simulator to be used.
Specifically, when the type preset by the quantum simulator to be used is identified as "local", it is determined that the quantum simulator is a local quantum simulator. Otherwise, it is determined that the quantum simulator is not a local quantum simulator, and at this time, the quantum simulator selected by the user is taken as the quantum simulator to be used.
S202, if the quantum simulator is determined to be a local quantum simulator, judging whether the quantum simulator uses a GPU operation mode or not according to an operation mode identifier preset by the quantum simulator.
Specifically, when the running mode preset by the quantum simulator is identified as GPU, determining that the quantum simulator uses the GPU running mode.
S203, if the quantum simulator is determined to use the GPU operation mode, judging whether available GPU exists in the current equipment.
Specifically, the Taichi graphics library is utilized to determine whether a usable GPU exists in the current device.
S204, if it is determined that the current device has a usable GPU, the quantum simulator is operated using the GPU and based on the method for operating a quantum simulator disclosed in embodiment 1.
Specifically, when it is determined that there is no available GPU for the current device, the quantum simulator is run using the main processor CPU. By adopting the method for using the quantum simulator provided by the embodiment of the application, the usability and the operation efficiency of the quantum simulator are improved.
As shown in fig. 4, a system for using a quantum simulator according to an embodiment of the present application includes:
the judging module is configured to judge whether the quantum simulator is a local quantum simulator according to a type identifier preset by the quantum simulator to be used;
the judging module is further configured to judge whether the sub-simulator uses the GPU running mode according to the running mode identifier preset by the quantum simulator;
the judging module is further configured to judge whether available GPUs exist in the current equipment;
an execution module configured to execute the quantum simulator using the GPU and based on the method for executing the quantum simulator disclosed in embodiment 1.
As shown in fig. 5, fig. 5 is a functional block diagram of an electronic device as a classical computing device comprising a processor 601 and a memory 602 storing computer program instructions according to one embodiment of the application.
In particular, the processor 601 may include a Central Processing Unit (CPU), or an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured as one or more integrated circuits that implement embodiments of the present application.
Memory 602 may include mass storage for data or instructions. By way of example, and not limitation, memory 602 may include a Hard Disk Drive (HDD), floppy Disk Drive, flash memory, optical Disk, magneto-optical Disk, magnetic tape, or universal serial bus (Universal Serial Bus, USB) Drive, or a combination of two or more of the above. The memory 602 may include removable or non-removable (or fixed) media, where appropriate. Memory 602 may be internal or external to the integrated gateway disaster recovery device, where appropriate. In a particular embodiment, the memory 602 is a non-volatile solid state memory.
The memory may include Read Only Memory (ROM), random Access Memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical, or other physical/tangible memory storage devices. Thus, in general, the memory comprises one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions and when the software is executed (e.g., by one or more processors) it is operable to perform the operations described with reference to the method for operating a quantum simulator disclosed in embodiment 1 above and the method for using a quantum simulator disclosed in embodiment 3 above.
The processor 601 implements the method for operating the quantum simulator disclosed in the above embodiment 1 and the method for using the quantum simulator disclosed in the above embodiment 3 in the above embodiments by reading and executing the computer program instructions stored in the memory 602.
In one example, the electronic device may also include a communication interface 603 and a bus 610. As shown in fig. 5, the processor 601, the memory 602, and the communication interface 603 are connected to each other through a bus 610 and perform communication with each other. The electronic device in the embodiment of the application can be a server or other computing devices, and also can be a cloud server.
The communication interface 603 is mainly used for implementing communication between each module, apparatus, unit and/or device in the embodiment of the present application.
Bus 610 includes hardware, software, or both, coupling components of the online data flow billing device to each other. By way of example, and not limitation, the buses may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an infiniband interconnect, a Low Pin Count (LPC) bus, a memory bus, a micro channel architecture (MCa) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a video electronics standards association local (VLB) bus, or other suitable bus, or a combination of two or more of the above. Bus 610 may include one or more buses, where appropriate. Although embodiments of the application have been described and illustrated with respect to a particular bus, the application contemplates any suitable bus or interconnect.
According to another aspect of the present application, there is also provided a computer readable storage medium having stored therein computer instructions which, when executed by a processor, implement the aforementioned method for computing a fourier kernel function. The computer readable storage medium is, for example, a classical computer readable storage medium, such as a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical/tangible memory storage device, or a storage medium readable by a quantum computer, such as a Quantum Random Access Memory (QRAM), for storing quantum information, where QRAM is used as a quantum version of RAM in a classical computer, by which a quantum stack state containing information can be created, and the stacked data can be read with a stacked address, compared to the sequential reading required by RAM. QRAM can be physically implemented in optical, semiconductor quantum dots, superconducting wires, ion traps, and the like.
The foregoing exemplarily describes the flow diagrams and/or block diagrams of methods, apparatus, systems, and computer program products according to embodiments of the present application, and describes various aspects related thereto. It will be understood that each block of the flowchart illustrations and/or block diagrams, or combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions, special purpose hardware which perform the specified functions or acts, and combinations of special purpose hardware and computer instructions. For example, these computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the present application, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit.
Functional blocks shown in the block diagrams of the embodiments of the present application can be implemented in hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, a plug-in, a function card, or the like; when implemented in software, are the programs or code segments used to perform the required tasks. The program or code segments can be stored in a memory or transmitted over transmission media or communication links through data signals carried in carrier waves. The code segments may be downloaded via computer networks such as the internet, intranets, etc.
It should be noted that the present application is not limited to the specific configurations and processes described above or shown in the drawings. The foregoing is merely specific embodiments of the present application, and it will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working processes of the described system, apparatus, module or unit may refer to corresponding processes in the method embodiments, and need not be repeated. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art may conceive various equivalent modifications or substitutions within the technical scope of the present application, which are intended to be included in the scope of the present application.

Claims (9)

1. A method for operating a quantum simulator, comprising:
identifying the type of Graphics Processor (GPU) used by the current device;
according to the type of the GPU, acquiring an adaptive driver and loading the driver to the GPU;
after the driver is loaded, deploying a quantum simulator to the GPU;
and operating the quantum simulator by using the GPU.
2. The method for operating a quantum simulator of claim 1, wherein operating the quantum simulator with the graphics processor GPU comprises:
and adopting a multi-step computing mode, and respectively computing a result state vector obtained after each quantum gate of the quantum simulator acts on the quantum bit by the GPU.
3. The method for operating a quantum simulator according to claim 2, wherein the graphics processor GPU calculates the resulting state vector of the quantum simulator after each quantum gate acts on a qubit using a multi-step calculation scheme, respectively, comprising:
and adopting a matrix partitioning mode, wherein the graphic processor GPU respectively and sequentially executes each step in a plurality of steps to obtain a result state vector obtained after each quantum gate of the quantum simulator acts on the quantum bit.
4. The method for running a quantum simulator of claim 1, wherein identifying the type of graphics processor GPU currently used by the device comprises:
using the Taichi graphics library, the type of graphics processor GPU currently used by the device is identified.
5. A system for operating a quantum simulator, comprising:
an identification module configured to identify a type of graphics processor GPU used by the current device;
the loading module is configured to acquire a corresponding driver according to the type of the GPU and load the driver to the GPU;
a deployment module configured to deploy a quantum simulator to the graphics processor GPU;
and the running module is configured to run the quantum simulator by using the GPU.
6. A method for using a quantum simulator, comprising the steps of:
judging whether the quantum simulator is a local quantum simulator or not according to a type identifier preset by the quantum simulator to be used;
if the quantum simulator is determined to be a local quantum simulator, judging whether the sub simulator uses a GPU operation mode according to an operation mode identifier preset by the quantum simulator;
if the quantum simulator is determined to use the GPU operation mode, judging whether available GPU exists in the current equipment or not;
if it is determined that a current device has a usable GPU, then running the quantum simulator using the GPU and based on the method for running a quantum simulator of any of claims 1-4.
7. A system for using a quantum simulator, comprising:
the judging module is configured to judge whether the quantum simulator is a local quantum simulator according to the type identifier of the quantum simulator to be used;
the judging module is further configured to judge whether the quantum simulator uses the GPU operation mode according to the operation mode of the quantum simulator;
the judging module is further configured to judge whether the available GPU exists in the current equipment;
a run module configured to run the quantum simulator using the GPU and based on the method for running a quantum simulator of any of claims 1-4.
8. An electronic device comprising a processor and computer instructions stored in a memory and executable on the processor, the processor executing the computer instructions to perform the method of any one of claims 1-4 or 6.
9. A computer readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any one of claims 1-4 or 6.
CN202311504593.0A 2023-11-13 2023-11-13 Method, system and electronic device for operating and using quantum simulator Pending CN117236457A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311504593.0A CN117236457A (en) 2023-11-13 2023-11-13 Method, system and electronic device for operating and using quantum simulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311504593.0A CN117236457A (en) 2023-11-13 2023-11-13 Method, system and electronic device for operating and using quantum simulator

Publications (1)

Publication Number Publication Date
CN117236457A true CN117236457A (en) 2023-12-15

Family

ID=89082907

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311504593.0A Pending CN117236457A (en) 2023-11-13 2023-11-13 Method, system and electronic device for operating and using quantum simulator

Country Status (1)

Country Link
CN (1) CN117236457A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118608A (en) * 2007-08-23 2008-02-06 清华大学 Decompose method for arbitrarily quantum bit gate
US20150371354A1 (en) * 2014-06-19 2015-12-24 Vmware, Inc. Host-Based GPU Resource Scheduling
US20190340532A1 (en) * 2018-05-02 2019-11-07 IonQ, Inc. Quantum computer simulator characterization
CN113569511A (en) * 2021-06-11 2021-10-29 清华大学 Quantum circuit simulation method and device
CN113887730A (en) * 2021-09-06 2022-01-04 鹏城实验室 Quantum simulator implementation method and device, related equipment and quantum simulation method
CN115965517A (en) * 2023-01-09 2023-04-14 摩尔线程智能科技(北京)有限责任公司 Graphics processor resource management method and device, electronic device and storage medium
CN116303099A (en) * 2023-05-17 2023-06-23 北京天信瑞安信息技术有限公司 Cross-platform rapid deployment method, device, medium and equipment for automatic test environment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101118608A (en) * 2007-08-23 2008-02-06 清华大学 Decompose method for arbitrarily quantum bit gate
US20150371354A1 (en) * 2014-06-19 2015-12-24 Vmware, Inc. Host-Based GPU Resource Scheduling
US20190340532A1 (en) * 2018-05-02 2019-11-07 IonQ, Inc. Quantum computer simulator characterization
CN113569511A (en) * 2021-06-11 2021-10-29 清华大学 Quantum circuit simulation method and device
CN113887730A (en) * 2021-09-06 2022-01-04 鹏城实验室 Quantum simulator implementation method and device, related equipment and quantum simulation method
CN115965517A (en) * 2023-01-09 2023-04-14 摩尔线程智能科技(北京)有限责任公司 Graphics processor resource management method and device, electronic device and storage medium
CN116303099A (en) * 2023-05-17 2023-06-23 北京天信瑞安信息技术有限公司 Cross-platform rapid deployment method, device, medium and equipment for automatic test environment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ALIBABA CLOUD: "在GPU计算型实例中安装GPU驱动(windows)", pages 1 - 3, Retrieved from the Internet <URL:https://www.alibabacloud.com/help/zh/egs/user-guide/install-a-gpu-driver-on-a-gpu-accelerated-compute-optimized-windows-instance> *
魏璐等: "量子计算模拟平台发展综述", 《微电子学与计算机》, vol. 39, no. 11, pages 1 - 10 *

Similar Documents

Publication Publication Date Title
CN102099798B (en) For the method and system using native code module to perform application
EP3574453A1 (en) Optimizing neural network architectures
CN111046027A (en) Missing value filling method and device for time series data
CN110516810B (en) Quantum program processing method and device, storage medium and electronic device
CN114219076A (en) Quantum neural network training method and device, electronic device and medium
CN113592095B (en) Model training method and device based on quantum computation
CN114764549B (en) Quantum circuit simulation calculation method and device based on matrix product state
KR102371844B1 (en) Computing method applied to artificial intelligence chip, and artificial intelligence chip
US11697205B2 (en) Determining control policies for robots with noise-tolerant structured exploration
CN110032868A (en) Program code characteristic is determined based on machine learning
CN113222161B (en) Implementation method and device of custom quantum logic gate
CN114008635A (en) Neural network layer-by-layer debugging
CN113168552A (en) Artificial intelligence application development system, computer device and storage medium
US9870199B2 (en) Generating compact representations of high-dimensional data
US11496775B2 (en) Neural network model compression with selective structured weight unification
US20160292064A1 (en) Iterative test generation based on data source analysis
US20120123746A1 (en) Exact parameter space reduction for numerically integrating parameterized differential equations
CN113222151B (en) Quantum state transformation method and device
CN110728351A (en) Data processing method, related device and computer storage medium
CN114819168A (en) Quantum comparison method and device for matrix eigenvalues
CN117236457A (en) Method, system and electronic device for operating and using quantum simulator
EP4141751A1 (en) Error mitigation for sampling on quantum devices
CN114819163A (en) Quantum generation countermeasure network training method, device, medium, and electronic device
US20230041338A1 (en) Graph data processing method, device, and computer program product
CN113887730A (en) Quantum simulator implementation method and device, related equipment and quantum simulation method

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