Pennylane Archives - Welcome to Quantum Guru https://www.quantumcomputers.guru/news-tags/pennylane/ Mon, 09 May 2022 20:04:20 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.2 https://www.quantumcomputers.guru/wp-content/uploads/2021/11/cropped-cropped-favicon-32x32.png Pennylane Archives - Welcome to Quantum Guru https://www.quantumcomputers.guru/news-tags/pennylane/ 32 32 An Overview for Hybrid Algorithm and Its Architecture https://www.quantumcomputers.guru/news/hybrid-algorithm-and-its-architecture/ https://www.quantumcomputers.guru/news/hybrid-algorithm-and-its-architecture/#comments Mon, 09 May 2022 20:01:38 +0000 https://www.quantumcomputers.guru/?post_type=news&p=5234 What is a Hybrid Algorithm? While you were skimming over quantum programming, you’ll probably heard of “hybrid quantum-classical computing”. Hybrid quantum-classical computing is a hot topic among quantum computing enthusiasts and it typically refers to a set of programs that runs on a quantum processor. Programs such as variational quantum algorithms and quantum approximate optimization […]

The post An Overview for Hybrid Algorithm and Its Architecture appeared first on Welcome to Quantum Guru.

]]>

What is a Hybrid Algorithm?

While you were skimming over quantum programming, you’ll probably heard of “hybrid quantum-classical computing”. Hybrid quantum-classical computing is a hot topic among quantum computing enthusiasts and it typically refers to a set of programs that runs on a quantum processor. Programs such as variational quantum algorithms and quantum approximate optimization algorithms.

But what does “hybrid” really mean?

In layman terms, “hybrid” means a program that runs both classical and quantum code. Quantum code is defined as a sequence of quantum gates that is applied to one or multiple qubits on a quantum device or quantum processing unit i.e. QPU. “Classical” refers to a program that runs on a regular computer, written in available programming language. Typically anyone can choose to easily interface with quantum computing services.

Hybrid quantum computing is the preferred industry term for a simple idea: “A quantum computer and a classical computer working together to solve a problem.” It is an approach that takes the form of a back-and-forth collaboration where different aspects of a problem are passed between the quantum and classical tools best suited for each stage. According to scientists, hybrid quantum-classical algorithms are maybe one of the best ways for users to get the most out of a current or near-term quantum computer. Keeping in mind the edge existing classical systems possess in terms of hardware, there are a lot of things in which classical computers are better, or faster at. By letting the classical computer do what it’s good at and quantum computers do what it’s good at, could be a better solution.

Hybrid architecture for quantum algorithms:

The gate-based quantum computers are not universal. On the other hand, global unitary operations like the shift operator cannot be expressed within the circuit model, cannot be equally applied to machines with unlimited and limited memory and cannot be assumed to be equally available on different quantum hardware architectures.

To overcome the above restrictions, quantum programming uses a classical universal language to define the actual sequence of elementary instructions for a quantum computer, so a program is not intended to run on a quantum computer itself, but on a (probabilistic) classical computer, which in turn controls a quantum computer and processes the results of measurements. In the terms of classical computer science, you can describe this setting as a universal computer with a quantum oracle. Figure 1 shows the hybrid architecture.

Quantum algorithms such as Shor’s algorithm are in two separate parts: First part is classical algorithm which can be done on a classical computer and second part is Quantum algorithm which can be done on a quantum computer or can be simulated on classical computer.

Fig 1. The hybrid architecture between classical and quantum computers.

hybrid 1
Fig 1. The hybrid architecture between classical and quantum computers.

Naturally quantum algorithms are the hybrid algorithms that consist of a classical and a quantum component. However, the quantum part of the manu algorithm is probabilistic, often they need multiple runs to get desired result. The complete cycle of the hybrid architecture for the quantum algorithms will be done as follows:

  • Pre-calculate certain classical factors (initialize and run the classical part of the algorithm)
  • Running the quantum algorithm by the quantum circuit
    • Initialize the quantum node (Initialize quantum circuit and define all gates, switches and unitary function)
    • Prepare inputs state (store inputs on target and control registers)
    • Execute the quantum portion of the algorithm (Apply gates and unitary transformation on input data)
    • Measure the output of Machine State (Measure the output registers of the quantum circuit)
    • Evaluate Measurement (If have the desired result, then doing post-processing in step 3)
    • Exit if desired result (If solution found then exit from quantum circuit, else repeat step 2)
  •  Finish post-processing (Run the second classical part of the algorithm)

Fig 2.

hybrid 2
Fig 2.

Steps 1 and 3 were executed on classical computers and step 2 was executed on quantum computers by quantum circuits. Measuring and evaluating the quantum circuit in steps 2(e) and 2(f) can be done on classical computers. The diagram in Fig. 3 shows the development of a general plan of hybrid architecture for the quantum algorithms and being simulated on classical computers. The quantum circuit is simulated on a classical computer.

The post An Overview for Hybrid Algorithm and Its Architecture appeared first on Welcome to Quantum Guru.

]]>
https://www.quantumcomputers.guru/news/hybrid-algorithm-and-its-architecture/feed/ 7
Getting ready for post Quantum Era with open Source Software https://www.quantumcomputers.guru/news/getting-ready-for-post-quantum-era-with-open-source-software/ https://www.quantumcomputers.guru/news/getting-ready-for-post-quantum-era-with-open-source-software/#comments Sat, 04 Dec 2021 17:37:30 +0000 https://www.quantumcomputers.guru/?post_type=news&p=4480 QuantumGuru recent articles have been on applications of quantum computers in addressing real world use cases. For the last three decades, software has been at the forefront of technology development and its application and scalability for general masses. Hence, this article is about some software frameworks that we foresee may influence quantum computer programming. Software […]

The post Getting ready for post Quantum Era with open Source Software appeared first on Welcome to Quantum Guru.

]]>

QuantumGuru recent articles have been on applications of quantum computers in addressing real world use cases. For the last three decades, software has been at the forefront of technology development and its application and scalability for general masses. Hence, this article is about some software frameworks that we foresee may influence quantum computer programming.

Software for classical computers is highly matured, but the computing enhancement brought by quantum computing will require significant changes in the current software paradigm. Tech giants like Google, IBM, Microsoft and Amazon are investing billions of dollars to bring commercially viable quantum computers – hardware to start with. However, all of these are software companies and invest considerably in software to enable programming of quantum computers. New age startups like Cambridge quantum, Orange Quantum, Qblox etc. are working creatively to overcome similar barriers. For example. Cambridge quantum, a company that creates agnostic quantum software, has merged with Honeywell Quantum Solutions, a quantum hardware company that uses trapped-ions for quantum computing to create Quantinuum, a blend of Quantum Continuum.

Some open source software in development for the post quantum era are:

1.       Quantify

The open-source software platform is for qubit calibration and characterization routines. Qblox provides a completely open-source software stack, called Quantify, to control experiments on Qblox Cluster and SPI hardware. Quantify is a python-based, high-level data acquisition platform focused on providing all the necessary tools for Quantum Computing experiments. It is built on top of QCoDeS, and is the successor of the extensively tested PyQED measurement environment. The simple software framework enables setting-up typical characterization experiments and advanced experimental procedures with ease-of-use.

2.       lambeq

lambeq is the world’s first software toolkit for quantum natural language processing (QNLP). It is capable of converting sentences into a quantum circuit. It is designed to accelerate the development of practical, real-world QNLP applications such as automated dialogue, text mining, language translation, text-to-speech, language generation and bioinformatics. lambeq has been released on a fully open-sourced basis for the benefit of the world’s quantum computing community. lambeg ecosystem is rapidly growing and includes quantum computing researchers, developers and users. lambeq works seamlessly with Cambridge Quantum’s TKET, the world’s leading and fastest-growing quantum software development platform that is also open-source. This provides QNLP developers with access to the broadest possible range of quantum computers.

3.       pyQuil

PyQuil is a Python library for quantum programming using Quil. Quil is a quantum instruction language developed by Rigetti Computing. PyQuil has the following three main functions:

  • Easily generates Quil programs from quantum gates and classical operations
  • Compiles and simulates Quil programs using the Quil Compiler (quilc) and the Quantum Virtual Machine (QVM)
  • Executes Quil programs on real quantum processors (QPUs) using Quantum Cloud Services (QCS)

4.       Pennylane

Pennylane is a cross-platform Python library for differentiable programming of quantum computers. It aims to build rich and flexible hybrid quantum-classical models. It trains a quantum computer similar to that of a neural network. Pennylane connects to quantum hardware using standard neural networks frameworks such as PyTorch, TensorFlow, JAX, Keras or NumPy. It is fully device independent and executes the same quantum circuit on different quantum backends. Plugins are needed in order to access even more devices, including Strawberry Fields, Amazon Braket, IBM Q, Google Cirq, Rigetti Forest, Qulacs, Pasqal, Honeywell, and more

The post Getting ready for post Quantum Era with open Source Software appeared first on Welcome to Quantum Guru.

]]>
https://www.quantumcomputers.guru/news/getting-ready-for-post-quantum-era-with-open-source-software/feed/ 7