CN115660092B - Quantum gate assembly rendering method, device, equipment, storage medium and program product - Google Patents

Quantum gate assembly rendering method, device, equipment, storage medium and program product Download PDF

Info

Publication number
CN115660092B
CN115660092B CN202211410821.3A CN202211410821A CN115660092B CN 115660092 B CN115660092 B CN 115660092B CN 202211410821 A CN202211410821 A CN 202211410821A CN 115660092 B CN115660092 B CN 115660092B
Authority
CN
China
Prior art keywords
quantum gate
quantum
rendering
special effect
area
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
CN202211410821.3A
Other languages
Chinese (zh)
Other versions
CN115660092A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211410821.3A priority Critical patent/CN115660092B/en
Publication of CN115660092A publication Critical patent/CN115660092A/en
Application granted granted Critical
Publication of CN115660092B publication Critical patent/CN115660092B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The disclosure provides a quantum gate assembly rendering method, a device, equipment, a storage medium and a program product, and relates to the technical fields of quantum gate assemblies, quantum circuit diagrams and special effect rendering. The method comprises the following steps: in response to receiving a selection operation performed on an area where the quantum gate assembly library is located, confirming a selection position corresponding to the selection operation through a transparent position sensing assembly arranged on the top layer of the area where the quantum gate assembly library is located; the bottom layer of the area where the quantum gate assembly library is located is a single image drawn with icons of all the alternative quantum gate assemblies; determining a target quantum gate component corresponding to the selected position in the single image; and performing special effect animation rendering on the target quantum gate component only. According to the method, the rendering operation on 27 components can be reduced to the greatest extent when the interface of the quantum gate component library is presented for the first time, so that the instant rendering pressure is reduced as much as possible, the clamping phenomenon is reduced, the user experience is improved, and the drawing of a larger-scale quantum circuit diagram can be better supported.

Description

Quantum gate assembly rendering method, device, equipment, storage medium and program product
Technical Field
The disclosure relates to the technical field of image processing, in particular to the technical field of quantum gate assemblies, quantum circuit diagrams and special effect rendering, and particularly relates to a quantum gate assembly rendering method, a quantum gate assembly rendering device, electronic equipment, a computer readable storage medium and a computer program product.
Background
As quantum devices and quantum circuits continue to grow in scale, the heat of quantum algorithm development continues to increase, and quantum computing platforms need to meet multiple experimental demands from researchers in different fields. The visualized quantum computing platform provides a gate icon component for forming a quantum circuit and a freely edited circuit canvas, so that a user can complete the construction and operation of the quantum circuit through simple dragging. With the visual and convenient advantages, the visualized quantum computing platform becomes the choice of more and more researchers. At most, a few visualized quantum computing platforms (PC ends) in the industry only support rendering and animation operation of two thousands of door icons, wherein when the number of doors reaches hundreds, the animation operation is obviously blocked, the depth of a quantum circuit used by a researcher experiment is far beyond the rendering and processing range of the visualized quantum computing platform, and the visualized quantum computing platform is in urgent need of faster and stronger rendering capability and more sensitive and lower-consumption animation operation response.
Disclosure of Invention
Embodiments of the present disclosure provide a quantum gate assembly rendering method, apparatus, electronic device, computer readable storage medium, and computer program product.
In a first aspect, an embodiment of the present disclosure provides a quantum gate assembly rendering method, including: in response to receiving a selection operation performed on an area where the quantum gate assembly library is located, confirming a selection position corresponding to the selection operation through a transparent position sensing assembly arranged on the top layer of the area where the quantum gate assembly library is located; the bottom layer of the area where the quantum gate assembly library is located is a single image drawn with icons of all the alternative quantum gate assemblies; determining a target quantum gate component corresponding to the selected position in the single image; and performing special effect animation rendering on the target quantum gate component only.
In a second aspect, embodiments of the present disclosure provide a quantum gate assembly rendering apparatus, including: the selection position determining unit is configured to respond to receiving selection operation on the region where the quantum gate assembly library is located, and confirm the selection position corresponding to the selection operation through a transparent position sensing assembly arranged on the top layer of the region where the quantum gate assembly library is located; the bottom layer of the area where the quantum gate assembly library is located is a single image drawn with icons of all the alternative quantum gate assemblies; a target quantum gate assembly determining unit configured to determine a target quantum gate assembly corresponding to the selected position in the single image; and the single-component special effect animation rendering unit is configured to conduct special effect animation rendering on the target quantum gate component only.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to implement a quantum gate assembly rendering method as described in any one of the implementations of the first aspect when executed.
In a fourth aspect, embodiments of the present disclosure provide a non-transitory computer-readable storage medium storing computer instructions for enabling a computer to implement a quantum gate assembly rendering method as described in any one of the implementations of the first aspect when executed.
In a fifth aspect, embodiments of the present disclosure provide a computer program product comprising a computer program which, when executed by a processor, is capable of implementing the steps of a quantum gate assembly rendering method as described in any of the implementations of the first aspect.
According to the quantum gate component rendering method, the area where the quantum gate component library for presenting each alternative quantum gate component is located is adjusted to be the combination of a single image of the bottom layer, on which the icon of each alternative quantum gate component is drawn, and the transparent position sensing component arranged on the top layer of the single image, and the real quantum gate components are not directly arranged in the area, so that the rendering operation of 27 components (28 alternative quantum gate components in total) can be maximally reduced when the interface is first accessed, the instant rendering pressure is reduced as much as possible, the clamping phenomenon is reduced, the user experience is improved, and the larger-scale quantum circuit diagram can be better supported and drawn.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
Other features, objects and advantages of the present disclosure will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings:
FIG. 1 is an exemplary system architecture in which the present disclosure may be applied;
Fig. 2 is a flowchart of a quantum gate assembly rendering method according to an embodiment of the present disclosure;
FIG. 3 is a flow chart of a method of partially rendering quantum gate components and/or component connection architecture in a quantum circuit diagram provided by embodiments of the present disclosure;
FIG. 4a is an exemplary quantum circuit diagram provided by an embodiment of the present disclosure;
Fig. 4b is a schematic view of visual contents of a quantum gate component library region and a quantum circuit diagram drawing region that may be presented on the entire display interface of an intelligent mobile terminal according to an embodiment of the present disclosure;
fig. 5 is a block diagram of a quantum gate assembly rendering apparatus according to an embodiment of the present disclosure;
Fig. 6 is a schematic structural diagram of an electronic device adapted to perform a quantum gate assembly rendering method according to an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness. It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of quantum gate assembly rendering methods, apparatus, electronic devices, and computer-readable storage media of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include an operation object 101 and a terminal device 102. The operation object 101 may be an operation user, or may be an operation device (such as a simulation manipulator) controlled by an operation command issued by the operation user, for operating information presented on a touch display screen of the terminal device 102; the terminal device 102 is configured to perform an affected operation according to the received operation information, and render and present the operation result on the display screen in a visual manner. The terminal device 102 may have various applications installed thereon, for example, a quantum circuit diagram drawing application may be installed to provide a user with a drawing service of a quantum circuit diagram, for example, a drawing interface of the application may be presented as a region where a quantum gate component library on the left side and a quantum circuit diagram drawing region on the right side shown in fig. 1.
The terminal device 102 may be hardware or software. When the terminal device 102 is hardware, it may be a variety of electronic devices with a display screen including, but not limited to, smartphones, tablets, laptop and desktop computers, and the like; when the terminal device 102 is software, it may be installed in the above-listed electronic device, and it may be implemented as a plurality of software or software modules, or may be implemented as a single software or software module, which is not particularly limited herein.
The terminal device 102 can provide various services through various built-in applications, and taking a quantum circuit diagram drawing application that can provide a quantum circuit diagram drawing service as an example, the terminal device 102 can achieve the following effects when running the quantum circuit diagram drawing application: firstly, receiving selection operation of a region where a quantum gate assembly library is located, which is transmitted by an operation object 101, through a touch display screen; then, confirming a selection position corresponding to the selection operation through a transparent position sensing component arranged on the top layer of the area where the quantum gate component library is located, wherein the bottom layer of the area where the quantum gate component library is located is a single image drawn with icons of alternative quantum gate components; next, determining a target quantum gate assembly corresponding to the selected location in the single image; and finally, performing special effect animation rendering on the target quantum gate assembly.
It should be understood that the number of objects of operation, terminal devices in fig. 1 is merely illustrative. There may be any number of objects, terminal devices, as required by the implementation.
Referring to fig. 2, fig. 2 is a flowchart of a quantum gate assembly rendering method according to an embodiment of the disclosure, wherein a flowchart 200 includes the following steps:
Step 201: in response to receiving a selection operation performed on an area where the quantum gate assembly library is located, confirming a selection position corresponding to the selection operation through a transparent position sensing assembly arranged on the top layer of the area where the quantum gate assembly library is located;
the present step aims at that when an execution body of the quantum gate component rendering method (for example, the intelligent mobile terminal 102 shown in fig. 1) receives a selection operation of an operation object (for example, the operation object 101 shown in fig. 1) on an area where the quantum gate component library is located, a selection position corresponding to the selection operation, namely, a position coordinate indicated by the selection operation, is confirmed through a position sensing component preset at the top layer of the area where the quantum gate component library is located.
The interface presented in the area including the quantum gate component library is generally provided by a corresponding application program, and the application program can be generally installed in various terminal devices supporting the application program, such as an intelligent mobile terminal (including a smart phone, a tablet computer), a desktop computer, a server, a workstation, etc., the scenario shown in fig. 1 is an example of using the intelligent mobile terminal, and the selection operation includes a clicking operation performed on the area including the quantum gate component library presented in the display screen of the intelligent mobile terminal.
It should be appreciated that in applications for drawing a resulting quantum circuit diagram, the overall interface may generally be divided into two parts for drawing a target quantum circuit diagram that is needed or desired by a user: namely a component library region for providing alternative quantum gate components and a quantum circuit diagram drawing region for presenting quantum gate components which are respectively picked and connected by a proper connection structure.
The embodiment provides a rendering scheme with smaller performance load by improving the architecture of the region where the quantum gate assembly group is located, aiming at how to respond to the selection process of a certain quantum gate assembly which is needed to be selected at the moment in the quantum circuit diagram drawing process of an operation object in the region where the quantum gate assembly library is located.
In the conventional scheme, the quantum gate component library area is actually an arrangement and arrangement area of all candidate quantum gate components, and the total number of the various quantum gate components is generally 28 (as shown in fig. 1, the total number of the independent 28 component icons in the area of the quantum gate component library) so that in the conventional scheme, the quantum gate component library area is actually a collection display area of 28 components, and once an interface containing the area needs to be presented, at least the 28 quantum gate components need to be subjected to initialization special effect rendering at the same time, and therefore, after the initialization special effect rendering is completed, the selection operation of a certain quantum gate component by a corresponding subsequent user can be performed.
To reduce the amount of rendering data at the same time, the present disclosure reforms the quantum gate component library area into two parts: the single image of each icon of the alternative quantum gate assembly is drawn on the bottom layer, and the transparent position sensing assembly is covered on the single image of the bottom layer, and the boundaries of the single image and the position sensing assembly do not exceed the boundary of the area where the quantum gate assembly library is located. Under the scheme, the selection operation of the operation object on the region where the quantum gate assembly library is located can fall on the transparent position sensing assembly of the top layer in practice, and the operation object can issue the selection operation in a targeted manner based on the image of each quantum gate assembly presented by the single image of the bottom layer.
Therefore, only the position sensing component converts the sensed selection position corresponding to the selection operation into which icon in the corresponding single image of the bottom layer, the target quantum gate component which the operation object actually wants to select can be confirmed, and further, only the single target quantum gate component corresponding to the current moment is required to be confirmed, and special effect animation rendering is carried out on the target quantum gate component independently and temporarily, so that the selection requirement of the operation object on the target quantum gate component which the operation object wants to select can be met.
In the scheme, the region where the quantum gate assembly library is located is not an arrangement and arrangement region of a plurality of independent alternative quantum gate assemblies, but is only a position sensing assembly of an icon display picture at the bottom layer and a position sensing assembly at the top layer, at least the number of assemblies can be maximally reduced by 27, the special effect animation rendering of 28 assemblies is completed from single requirement, the change is that only at least one assembly is required to be subjected to special effect animation rendering at each time, and the rendering data volume at the same moment is effectively reduced.
Step 202: determining a target quantum gate component corresponding to the selected position in the single image;
On the basis of step 201, this step aims at determining, by the above-described execution subject, a target quantum gate component corresponding to the selected position in the single image. Specifically, when the size of the position sensing component is consistent with the size of the single image and the two are completely overlapped, the position coordinate conversion relationship between the two may be predetermined, the first coordinate of the selected position determined in step 201 is converted into the second coordinate in the single image, and finally the quantum gate component corresponding to the second coordinate is determined to be the target quantum gate component.
Step 203: and performing special effect animation rendering on the target quantum gate component only.
Based on step 202, this step aims at performing special effect animation rendering on only the target quantum gate assembly by the execution subject, that is, performing special effect animation rendering on only the selected target quantum gate assembly, and performing special effect animation rendering on other quantum gate assemblies not selected.
According to the quantum gate component rendering method provided by the embodiment of the disclosure, through adjusting the region where the quantum gate component library for presenting each candidate quantum gate component is located to be the combination of a single image of the bottom layer, on which the icon of each candidate quantum gate component is drawn, and the transparent position sensing component arranged on the top layer of the single image, because the real quantum gate components are not directly arranged in the region, the rendering operation on 27 components (28 candidate quantum gate components in total) can be maximally reduced when the interface is first accessed, so that the instant rendering pressure is reduced as much as possible, the clamping phenomenon is reduced, the user experience is improved, and the larger-scale quantum circuit diagram can be better supported and drawn.
The embodiment shown in fig. 2 only describes how to select a portion of a target quantum gate assembly from a quantum gate assembly library in the process of drawing a quantum circuit diagram, and after the target quantum gate assembly is selected and special effect animation rendering for the target quantum gate assembly is completed, a drag operation for the target quantum gate assembly will also appear later, so that the target quantum gate assembly is moved from the region where the quantum gate assembly library is located to a corresponding position of the quantum circuit diagram drawing region through the drag operation.
An implementation, including but not limited to, may be:
and in response to receiving the drag operation after the selection operation, the drag route and the drag destination of the execution main body along with the drag operation are rendered in real time to obtain the drag special effect animation and the drag ending special effect animation of the target quantum gate assembly. And when the dragging destination is a preset quantum circuit diagram drawing area, using the target quantum gate component to participate in the drawn target quantum circuit diagram.
Considering that the quantum circuit diagram drawn in the above manner may gradually increase in scale with the increase of the number of quantum gate components, in order to reduce the amount of data rendered in the overall quantum circuit diagram and the stress on the computation performance as much as possible, the present embodiment further provides a corresponding processing scheme through fig. 3, where the flow 300 includes the following steps:
Step 301: responding to the fact that the target quantum circuit diagram comprises at least one quantum gate component, and only carrying out special effect animation rendering on the quantum gate component and/or component connection structure which appears in the visible area of the current display screen in the process of initializing the quantum circuit diagram drawing area;
The method aims at performing special effect animation rendering on the quantum gate components and/or component connection structures which appear in the visible area of the current display screen in the initialization process of the drawing area of the quantum circuit diagram under the condition that the execution body already contains at least one quantum gate component in the target quantum circuit diagram.
As can be seen from the exemplary quantum circuit diagram shown in fig. 4a, since the quantum circuit diagram generally extends in a lateral direction, i.e., the overall length increases with the scale, it is difficult to present a complete quantum circuit diagram at one time for both large-screen devices and small-screen devices for ease of presentation and clarity of presentation, and similarly, because the larger scale quantum circuit includes a greater number of quantum gate assemblies and assembly connection structures, the user viewing the quantum circuit diagram is also substantially a portion of the view rather than looking through the whole.
Therefore, in this case, for the quantum circuit diagram already including a part of the quantum gate component and/or the component connection structure, in the initialization stage of the quantum circuit diagram drawing area for presenting the circuit diagram content thereof (i.e., presenting the interface including the quantum circuit diagram drawing area for the first time), only the quantum gate component and/or the component connection structure appearing in the visible area of the current display screen is subjected to special effect animation rendering, for example, when the execution subject is a certain small screen device under the intelligent mobile terminal, only the quantum gate component and/or the component connection structure appearing in the visible area of the current small screen is subjected to special effect animation rendering (see the quantum circuit diagram drawing area expanded in fig. 4b, in which only a part of the quantum gate component and the component connection structure constituting the target quantum circuit diagram is presented).
As shown in fig. 4b, the left side is the region where the quantum gate component library is located, the right side is the quantum circuit diagram drawing region, and each icon of the quantum gate component includes coordinate information X, Y, specifically, in the quantum circuit diagram, X is the quantum bit number where X is the gate icon of the quantum gate component, and Y is the column where Y is located. Each door icon also contains three types of drag and click gesture operations:
Namely, each gate icon in the quantum gate assembly library can be dragged into the quantum circuit diagram, and the original falling point position of the gate icon in the quantum circuit diagram can be changed by dragging again; clicking on the gate icon in the quantum circuit diagram may edit the gate parameters and delete the gate.
The gate icons of the quantum gate assemblies in one quantum circuit diagram also contain an automatic back-off animation of the independent gate icon positions, when the operated gate icon moves to a 'non-empty' position, the gate icon associated with the position will automatically back-off to the next empty position. In a normal case, the number of door icons which can be displayed and operated by a single screen on the mobile terminal visual platform is small. In this example, there are 28 gate icons on the left and a maximum of 42 gate icons (all filled with single bit gates) on the right.
Step 302: determining that initialization is finished when special effect animation rendering of all quantum gate components and/or component connection structures in a visible area is finished;
On the basis of step 301, this step aims at determining that initialization is completed when the above-mentioned execution subject completes the special effect animation rendering of all quantum gate components and/or component connection structures in the visible region. That is, the initialization of the quantum circuit diagram drawing area is marked by completing the special effect animation rendering of all the quantum gate components and/or the component connection structures in the visible area only.
Namely, the partial quantum gate assembly and/or the partial assembly connecting structure which do not perform special effect animation rendering in the initialization stage can temporarily perform special effect animation rendering when needed later.
Step 303: responding to the completion of initialization and the change of the visible area, and only performing supplementary rendering of special effect animation on the new quantum gate component and/or the new component connection structure in the changed visible area;
based on step 302, this step aims at performing, by the execution body, when the initialization is completed and the visible area is changed, only the new quantum gate component and/or the new component connection structure in the changed visible area to perform the complementary rendering of the special effect animation. That is, step 303 provides a specific scheme of performing complementary rendering on the partial quantum gate component and/or the partial component connection structure that does not perform special effect animation rendering in the initialization stage, that is, triggering complementary rendering only when the content of the visual area is changed.
In addition, besides triggering the complementary rendering after the content of the visual area is changed, the quantum gate components and/or component connection structures which are not subjected to special effect animation rendering can be subjected to complementary rendering every preset time in the subsequent time when the content of the visual area is not changed, so that the data quantity and performance pressure of single rendering can be reduced through a small quantity and multiple complementary rendering modes.
On the basis of the above embodiment, the present embodiment provides an implementation scheme for performing special effect animation rendering on only the quantum gate component and/or the component connection structure that appears in the visible area of the current display screen when the quantum circuit diagram drawing area is initialized through steps 301 to 302, so as to reduce the amount of single rendering data and avoid the occurrence of the catton phenomenon as far as possible under the condition that the quantum circuit diagram actually presents characteristics and the operation object viewing characteristics; and through step 303, the subsequent appropriate complementary rendering is performed on the partial quantum gate component and/or the partial component connection structure which are rendered in the initialization stage, so that a specific implementation scheme is provided, namely, the complementary rendering is triggered only when the content of the visual area is changed, and thus unnecessary rendering operations are reduced as far as possible.
It should be understood that step 303 is a specific lower level implementation of another hidden branch of the solution provided for step 302, and in some embodiments step 303 may not be included, or other implementations may be included that are different from step 303, this embodiment being presented as only one preferred embodiment that includes steps 301-302 and step 303 at the same time.
On the basis of the above embodiment, considering that the data size of the special effect animation data of each rendered quantum gate component and/or component connection structure is small, the special effect animation data can be continuously stored in the memory until the quantum circuit diagram drawing application is completely closed (i.e. no relevant background application is left) so as to facilitate recall before the complete closing.
With further reference to fig. 5, as an implementation of the method shown in the foregoing figures, the present disclosure provides an embodiment of a quantum gate assembly rendering apparatus, where the apparatus embodiment corresponds to the method embodiment shown in fig. 2, and the apparatus may be specifically applied in various electronic devices.
As shown in fig. 5, the quantum gate assembly rendering apparatus 500 of the present embodiment may include: a selection position determining unit 501, a target quantum gate component determining unit 502, a single component special effect animation rendering unit 503. Wherein, the selection position determining unit 501 is configured to respond to receiving a selection operation performed on an area where the quantum gate component library is located, and confirm a selection position corresponding to the selection operation through a transparent position sensing component arranged on the top layer of the area where the quantum gate component library is located; the bottom layer of the area where the quantum gate assembly library is located is a single image drawn with icons of all the alternative quantum gate assemblies; a target quantum gate assembly determining unit 502 configured to determine a target quantum gate assembly corresponding to the selected position in the single image; the single-component special effect animation rendering unit 503 is configured to perform special effect animation rendering only on the target quantum gate component.
In the present embodiment, in the quantum gate assembly rendering apparatus 500: specific processing of the selection position determining unit 501, the target quantum gate component determining unit 502, and the single component special effect animation rendering unit 503 and the technical effects thereof may refer to the relevant descriptions of steps 201 to 203 in the corresponding embodiment of fig. 2, and are not described herein.
In some optional implementations of the present embodiment, the quantum gate assembly rendering apparatus 500 may further include:
and a drag operation special effect animation rendering unit configured to render a drag special effect animation and a drag ending special effect animation of the target quantum gate assembly in real time along with a drag route and a drag destination of the drag operation in response to receiving the drag operation after the selection operation.
In some optional implementations of the present embodiment, the quantum gate assembly rendering apparatus 500 may further include:
and a target quantum circuit diagram drawing unit configured to participate in the drawn target quantum circuit diagram using the target quantum gate assembly in response to the dragging of the quantum circuit diagram drawing area whose destination is a preset.
In some optional implementations of the present embodiment, the quantum gate assembly rendering apparatus 500 may further include:
The rendering unit in the visible area is configured to respond to the fact that the target quantum circuit diagram comprises at least one quantum gate component, and in the process of initializing the drawing area of the quantum circuit diagram, special effect animation rendering is only carried out on the quantum gate component and/or the component connection structure which appear in the visible area of the current display screen;
And the initialization completion judging unit is configured to determine that the initialization is completed when the special effect animation rendering of all the quantum gate components and/or the component connection structures in the visible area is completed.
In some optional implementations of the present embodiment, the quantum gate assembly rendering apparatus 500 may further include:
and the supplementary rendering unit is configured to respond to the completion of initialization and the change of the visible area, and only carry out supplementary rendering of special effect animation on the new quantum gate component and/or the new component connection structure in the changed visible area.
In some optional implementations of the present embodiment, the quantum gate assembly rendering apparatus 500 may further include:
And the memory resident unit is configured to continuously resident the special effect animation data of the quantum gate component and/or the component connection structure which are subjected to special effect animation rendering in the memory until the affiliated quantum circuit diagram drawing application is closed.
In some optional implementations of this embodiment, the selecting operation includes a clicking operation on an area where the library of quantum gate components presented in the display screen of the intelligent mobile terminal is located.
In some alternative implementations of this embodiment, the position-aware component overlays the upper layer of Yu Shanzhang images in a stacked manner, and the boundaries of the individual images and the position-aware component do not exceed the boundaries of the region in which the quantum gate component library is located.
The quantum gate assembly rendering device provided by the embodiment of the present invention adjusts the area where the quantum gate assembly library for presenting each candidate quantum gate assembly is located to be a combination of a single image of the bottom layer on which the icon of each candidate quantum gate assembly is drawn and a transparent position sensing assembly arranged on the top layer of the quantum gate assembly, and since the real quantum gate assemblies are not directly arranged in the area, the rendering operation on 27 assemblies (28 candidate quantum gate assemblies) can be maximally reduced when the quantum gate assembly enters the interface for the first time, so that the instant rendering pressure is reduced as much as possible, the clamping phenomenon is reduced, the user experience is improved, and the larger-scale quantum circuit diagram can be better supported and drawn.
According to an embodiment of the present disclosure, the present disclosure further provides an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to implement the quantum gate assembly rendering method described in any of the embodiments above when executed.
According to an embodiment of the disclosure, the disclosure further provides a readable storage medium storing computer instructions for enabling a computer to implement the quantum gate assembly rendering method described in any of the above embodiments when executed.
According to an embodiment of the present disclosure, the present disclosure further provides a computer program product, which, when executed by a processor, is capable of implementing the steps of the quantum gate assembly rendering method described in any of the above embodiments.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the quantum gate component rendering method. For example, in some embodiments, the quantum gate component rendering method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When a computer program is loaded into RAM 603 and executed by computing unit 601, one or more steps of the quantum gate assembly rendering method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the quantum gate component rendering method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical host and Virtual Private Server (VPS) PRIVATE SERVER service.
According to the technical scheme of the embodiment of the disclosure, the area where the quantum gate assembly library for presenting each alternative quantum gate assembly is located is adjusted to be the combination of a single image of the bottom layer, on which the icon of each alternative quantum gate assembly is drawn, and the transparent position sensing assembly arranged on the top layer of the single image, and because the real quantum gate assemblies are not directly arranged in the area, the rendering operation of 27 assemblies (28 alternative quantum gate assemblies in total) can be maximally reduced when the interface is first accessed, so that the instant rendering pressure is reduced as much as possible, the clamping phenomenon is reduced, the user experience is improved, and the larger-scale quantum circuit diagram can be better supported and drawn.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (17)

1. A quantum gate assembly rendering method is applied to an intelligent mobile terminal and comprises the following steps:
In response to receiving a selection operation performed on an area where a quantum gate assembly library is located, confirming a selection position corresponding to the selection operation through a transparent position sensing assembly arranged on the top layer of the area where the quantum gate assembly library is located; the bottom layer of the area where the quantum gate assembly library is located is a single image drawn with icons of various alternative quantum gate assemblies, the position sensing assemblies are covered on the upper layer of the single image in a stacked mode, and the boundaries of the single image and the position sensing assemblies do not exceed the boundary of the area where the quantum gate assembly library is located;
Determining a target quantum gate component corresponding to the selected position in the single image;
and performing special effect animation rendering on the target quantum gate component only.
2. The method of claim 1, further comprising:
And responding to the received drag operation after the selection operation, and rendering in real time along with the drag route and the drag destination of the drag operation to obtain the drag special effect animation and the drag ending special effect animation of the target quantum gate assembly.
3. The method of claim 2, further comprising:
And responding to the drawing area with the preset destination of the quantum circuit diagram, and using the target quantum gate assembly to participate in drawing a target quantum circuit diagram.
4. A method according to claim 3, further comprising:
Responding to the fact that the target quantum circuit diagram comprises at least one quantum gate component, and in the process of initializing the drawing area of the quantum circuit diagram, performing special effect animation rendering on the quantum gate component and/or the component connecting structure which appears in the visible area of the current display screen;
And when the special effect animation rendering of all the quantum gate components and/or the component connection structures in the visible area is completed, determining that the initialization is completed.
5. The method of claim 4, further comprising:
And responding to the initialization completion and the visual area being changed, and only performing supplementary rendering of special effect animation on the new quantum gate component and/or the new component connection structure in the changed visual area.
6. The method of claim 5, further comprising:
And continuously residing the special effect animation data of the quantum gate component and/or the component connection structure which are subjected to special effect animation rendering in the memory until the quantum circuit diagram drawing application is closed.
7. The method of any of claims 1-6, wherein the selecting operation comprises a clicking operation on an area where a library of quantum gate components presented in a display screen of the intelligent mobile terminal is located.
8. A quantum gate assembly rendering device, wherein, be applied to intelligent mobile terminal, include:
The selection position determining unit is configured to respond to receiving a selection operation on the region where the quantum gate assembly library is located, and confirm a selection position corresponding to the selection operation through a transparent position sensing assembly arranged on the top layer of the region where the quantum gate assembly library is located; the bottom layer of the area where the quantum gate assembly library is located is a single image drawn with icons of various alternative quantum gate assemblies, the position sensing assemblies are covered on the upper layer of the single image in a stacked mode, and the boundaries of the single image and the position sensing assemblies do not exceed the boundary of the area where the quantum gate assembly library is located;
A target quantum gate assembly determining unit configured to determine a target quantum gate assembly corresponding to the selected position in the single image;
and the single-component special effect animation rendering unit is configured to conduct special effect animation rendering on the target quantum gate component only.
9. The apparatus of claim 8, further comprising:
And the drag operation special effect animation rendering unit is configured to respond to the drag operation received after the selection operation, and render the drag special effect animation and the drag ending special effect animation of the target quantum gate assembly in real time along with a drag route and a drag destination of the drag operation.
10. The apparatus of claim 9, further comprising:
And a target quantum circuit diagram drawing unit configured to participate in drawing a target quantum circuit diagram using the target quantum gate assembly in response to the drag destination being a preset quantum circuit diagram drawing area.
11. The apparatus of claim 10, further comprising:
The rendering unit in the visible area is configured to respond to the fact that the target quantum circuit diagram comprises at least one quantum gate component, and in the process of initializing the drawing area of the quantum circuit diagram, special effect animation rendering is only carried out on the quantum gate component and/or the component connection structure which appear in the visible area of the current display screen;
And the initialization completion judging unit is configured to determine that the initialization is completed when the special effect animation rendering of all the quantum gate components and/or the component connection structures in the visible area is completed.
12. The apparatus of claim 11, further comprising:
And the supplementary rendering unit is configured to respond to the completion of the initialization and the change of the visual area, and only carry out supplementary rendering of special effect animation on the new quantum gate component and/or the new component connection structure in the changed visual area.
13. The apparatus of claim 12, further comprising:
And the memory resident unit is configured to continuously resident the special effect animation data of the quantum gate component and/or the component connection structure which are subjected to special effect animation rendering in the memory until the affiliated quantum circuit diagram drawing application is closed.
14. The apparatus of any of claims 8-13, wherein the selecting operation comprises a clicking operation on an area where a library of quantum gate components presented in a display screen of the intelligent mobile terminal is located.
15. An electronic device, comprising:
at least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the quantum gate assembly rendering method of any one of claims 1-7.
16. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the quantum gate assembly rendering method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the quantum gate assembly rendering method according to any one of claims 1-7.
CN202211410821.3A 2022-11-11 2022-11-11 Quantum gate assembly rendering method, device, equipment, storage medium and program product Active CN115660092B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211410821.3A CN115660092B (en) 2022-11-11 2022-11-11 Quantum gate assembly rendering method, device, equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211410821.3A CN115660092B (en) 2022-11-11 2022-11-11 Quantum gate assembly rendering method, device, equipment, storage medium and program product

Publications (2)

Publication Number Publication Date
CN115660092A CN115660092A (en) 2023-01-31
CN115660092B true CN115660092B (en) 2024-07-05

Family

ID=85020719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211410821.3A Active CN115660092B (en) 2022-11-11 2022-11-11 Quantum gate assembly rendering method, device, equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN115660092B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296865A (en) * 2021-05-28 2021-08-24 贵州海誉科技股份有限公司 Cloud desktop mouse position sensing and mouse operation event management method
CN113723614A (en) * 2021-09-01 2021-11-30 北京百度网讯科技有限公司 Method, apparatus, device and medium for assisting in designing quantum circuits

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017078731A1 (en) * 2015-11-06 2017-05-11 Rigetti & Co., Inc. Analyzing quantum information processing circuits
US20190102496A1 (en) * 2017-09-29 2019-04-04 International Business Machines Corporation Interactive user interface for composing quantum circuits
CN108479067B (en) * 2018-04-12 2019-09-20 网易(杭州)网络有限公司 The rendering method and device of game picture
WO2021087384A1 (en) * 2019-11-01 2021-05-06 Evolution Optiks Limited Light field device, multi-depth pixel rendering method therefor, and multi-depth vision perception system and method using same
US11580286B2 (en) * 2021-01-13 2023-02-14 International Business Machines Corporation Electronic generation of three-dimensional quantum circuit diagrams
CN114924712A (en) * 2022-03-16 2022-08-19 深圳市德驰微视技术有限公司 AUI modularization realization method and system based on domain controller platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113296865A (en) * 2021-05-28 2021-08-24 贵州海誉科技股份有限公司 Cloud desktop mouse position sensing and mouse operation event management method
CN113723614A (en) * 2021-09-01 2021-11-30 北京百度网讯科技有限公司 Method, apparatus, device and medium for assisting in designing quantum circuits

Also Published As

Publication number Publication date
CN115660092A (en) 2023-01-31

Similar Documents

Publication Publication Date Title
EP2584462B1 (en) Method of rendering a user interface
EP2584464B1 (en) Method of rendering a user interface
EP2605129B1 (en) Method of rendering a user interface
US9218105B2 (en) Method of modifying rendered attributes of list elements in a user interface
EP2584445A1 (en) Method of animating a rearrangement of ui elements on a display screen of an eletronic device
US20130097534A1 (en) Method of rendering a user interface
US20110145758A1 (en) Display navigation system, method and computer program product
CN114115681B (en) Page generation method and device, electronic equipment and medium
US20180196582A1 (en) Method and electronic device for managing data items
CN114330729B (en) Quantum circuit processing method, device, equipment and storage medium
CN112784588B (en) Method, device, equipment and storage medium for labeling text
CN114327057A (en) Object selection method, device, equipment, medium and program product
CN115660092B (en) Quantum gate assembly rendering method, device, equipment, storage medium and program product
CN113448668B (en) Method and device for skipping popup window and electronic equipment
CN114564268A (en) Equipment management method and device, electronic equipment and storage medium
CN114327718A (en) Interface display method and device, equipment and medium
CN115994970B (en) Quantum circuit diagram rendering method, quantum circuit diagram rendering device, quantum circuit diagram rendering equipment, quantum circuit diagram rendering storage medium and quantum circuit diagram rendering program product
CN113360074B (en) Soft keyboard display method, related device and computer program product
CN114546314B (en) Window display method and device, electronic equipment and storage medium
CN114327059B (en) Gesture processing method, device, equipment and storage medium
CN113744414B (en) Image processing method, device, equipment and storage medium
CN113655926B (en) Display control method, device, equipment and storage medium
CN116071422B (en) Method and device for adjusting brightness of virtual equipment facing meta-universe scene
CN113342413B (en) Method, apparatus, device, medium, and article for processing components
CN114116095B (en) Input method, input device, electronic equipment, medium and product

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