AWS Quantum Technologies Blog

Announcing the Amazon Braket Challenge winners of the QHack 2023 Hackathon

Over 2800 developers from the PennyLane community came together to deliver impactful and creative solutions to quantum computing challenges during the virtual QHack event held February 13-28. Participants joined from 105 countries worldwide, from the high school level all the way through PhDs and professionals. As a member of the PennyLane steering council, AWS sponsored QHack for the third year in a row, continuing its support for the goal of creating an open source, community-driven project that empowers developers to explore and do research in quantum computing. Amazon Braket, the quantum computing service of AWS, is built with PennyLane integrated as the top-level stack for this very reason.

QHack’s main events were the Coding Challenges, where participants showed off their skills solving quantum machine learning problems with PennyLane, and the Open Quantum Hackathon, where “QHackers” had the opportunity to develop free-form quantum computing projects. This year, QHackers submitted a record number of 17,500 Coding Challenge solutions and 90 Open Hackathon projects. In addition to the main events, this year’s competition included a meme contest, repost raffle, and first ever quantum-themed puzzle contest. The conference portion of QHack featured 33 talks from eminent scientists and builders in the field, with the Twitch stream peaking at #1 in the Science and Technology category.

About the competition

QHack Logo

The top 50 teams on the Coding Challenges leaderboard were provided with USD$500 in AWS credit “Power Ups,” which participants could use during the Open Hackathon stage. For the first 24 hours of this phase, teams worked tirelessly on their open hackathon projects and submitted preliminary proposals to be considered for a final Power Up. These submissions were evaluated for scientific and technical merit, depth of use of the quantum computing software and hardware stack, and potential for onward development.

Based on these criteria, the top 15 teams received US$2000 in AWS credits to augment their projects with Braket, as well as other services, like Amazon Elastic Compute Cloud (Amazon EC2) and Amazon SageMaker for machine learning. Our Braket scientists then dived deep into all Open Hackathon submissions to choose three grand prize Amazon Braket Challenge winners, who will each receive USD$10,000 in AWS credits to continue their projects.

In this blog post, we will bring you some highlights about the QHack, and tell you about the winning projects created by the intrepid quantum hackers.

Amazon Braket Challenge winners

This year’s Amazon Braket Challenge was open-ended: use Braket Quantum Processing Units (QPUs) or simulators to solve a problem you find interesting. QHackers delivered. Now, drumroll please… we will now announce the winners of the Amazon Braket Challenge for the QHack 2023 Open Hackathon (and share a sneak peak of the future for the winning projects)!

In addition to US$10,000 of AWS credits, the winning teams will also receive limited-edition Braket swag, as well as a 1 hour mini-mentorship session with an Amazon Visiting Academic in quantum computing. The teams can use their credits to access QPUs such as superconducting, trapped-ion, photonic, and neutral atom devices from Rigetti, OQC, IonQ, QuEra, and Xanadu. In addition, they will have access to on-demand state vector, density matrix, and tensor network quantum simulators. In this blog post, we will give a brief overview of the winning projects created by the intrepid quantum hackers.

Molecular Energy Landscapes of Hardware Efficient Ansätze in Quantum Computing for Carbon Capture

As we transition to fully renewable energy, one complementary strategy to mitigate the effects of climate change is to capture emissions directly as they are released by power plants and industrial facilities. Because carbon dioxide (CO2) emissions are estimated to contribute ~76% of the total increase in greenhouse gasses over the past two centuries, they are a primary target for such capture.

Image of power transmission towers.Carbon capture can be performed using specific classes of chemical compounds called nanoporous adsorbent materials. Yes, you read that right: adsorption is when molecules adhere to the surface of a material rather than being taken up into the bulk of the material. Understanding the specific mechanisms for CO2 adsorption is crucial when designing and optimizing new materials of this class for carbon capture. Due to the high number of interactions involved between particles on the surface, simulating the adsorption process scales exponentially in memory and runtime on classical computers. Thankfully, quantum computers can handle this task without exponential overhead; in fact, it’s the problem they were originally proposed to solve.

The QHack team known as “Jetix” aimed to solve this very problem: mapping the potential energy surface (PES) of a CO2-adsorbing compound on a quantum computer. Finding the minimum of this energy landscape corresponds to finding the lowest possible energy: the ground state, which can be used to predict chemical reactions like adsorption. Their project was based on a 2023 work by Choy et al., which calculated PES ground states for a variety of molecules using the VQE algorithm. Team Jetix used the techniques from Choy et al. to find the lowest energy state for the overall system of CO2 placed nearby CO2-adsorbent metal ions: Mn(II) and Cu(I), which are candidates for carbon capture.

VQE finds electronic ground states by starting with a trial wavefunction or ansatz (a parameterized guess for the final form of the ground state), encoding it into a parameterized quantum circuit, and then using classical machine learning to iteratively optimize the parameters to reach the lowest energy state. Choosing a good ansatz has to balance accuracy against compactness: using an ansatz with many parameters that must be optimized (e.g. taking into account more details of the physical system) can provided greater accuracy, but this comes at the cost of increasing the difficulty of the optimization problem. Specifically, more parameters to optimize often means longer convergence time and increased risk of ending up in “barren plateaus” of the optimization space.

Circuit board with CPU.Hardware-efficient ansätze are those that try to minimize the burden placed on the quantum computer (e.g. reducing the gate depth and degree of entanglement) when designing the circuit for the trial wavefunction. Team Jetix used the deparamterization technique from Choy et al. to find these types of reduced-resource ansätze. The technique works by successively freezing parameters in the optimization to determine which, if any, of them tend to be {0, ±π, ±π/2}, and which others need to be tuned more finely. Gates parameterized by the former can be replaced by standard gates (e.g. I, Z, H), thus avoiding the need to optimize over the full parameter space for the VQE instance and reducing convergence time.

Using their deparameterized ansatz on the Braket local simulator, the Jetix team was able to reduce the convergence time of their five qubit VQE instance for Mn(II) and Cu(I) by 60.8%, with an increased error rate of 2.82% (still within 0.002 Hartree of the true ground state). The team coded their simulated solution in Qiskit via the open-source Qiskit-Braket provider. To extend their work to run on quantum hardware, the team used PennyLane’s built-in functionality to group the Hamiltonian terms for their chosen chemical systems, thereby reducing the number of circuit executions. They further used the Braket-PennyLane plugin to run their VQE experiment on the Rigetti Aspen-M-3 superconducting QPU. Although it only ran for three iterations, the results appeared to show a downward trend toward the ground state.

As a whole, the Jetix team demonstrated the ability to understand and implement VQE for a climate change application, making judicious use of a variety of integrated quantum frameworks, including Braket, PennyLane, and Qiskit. The team will now have the opportunity to meet with Amazon Visiting Academic Prof. James Whitfield of Dartmouth College to discuss extending their project and how they might use their USD$10,000 in AWS credits. Stay tuned for future work from the Jetix team!

You can find their source code on GitHub.

Quantum Graph Neural Network for graph structured data using classical initialization

Graph classification is a machine learning task that involves predicting a label or category for a given input graph. This has a vast range of applications across social network analysis, computer vision, recommender systems, fraud detection, drug discovery, natural language processing, and more! The classifications can be binary (e.g. “is this an image of a bicycle?”) or multi-class (e.g. “which class of enzyme is this?”). An example of graph classification in the realm of drug discovery is identifying whether a given compound is carcinogenic (i.e. whether it has the potential to cause cancer). Chemical compounds can be mapped to graphs, with the nodes representing atoms or molecules and edges representing chemical bonds between them.

When a lab synthesizes a new drug, they don’t know all the risks that may be associated with it. Testing often begins with preclinical trials on living cells and animals to try to discover and mitigate safety risks for humans. However, there is a growing trend among pharmaceutical companies to reduce or replace animal testing in drug development, due to cost and ethical considerations. If we had the ability to predict the effect a drug would have on an animal with high accuracy, this would help reduce the need for animal testing. One such example is using machine learning to predict whether a compound will be carcinogenic to the humble lab rat.

The “QuantuMother” team chose this graph classification problem as their project, solving it with two different methods. The first was based on the 2022 paper by Albrecht et al., where the team implemented the Quantum Evolving Kernel technique. For this, they used the Braket local simulator for Analog Hamiltonian Simulation (AHS), which emulates the behavior of a noiseless Rydberg atom array like QuEra’s Aquila device. To program a Rydberg atom array, we take advantage of the so-called Rydberg-blockade effect, where the energy required to excite one atom to the Rydberg state is so large that it prevents nearby atoms (those within the “blockade radius”) from being excited to the same state, due to the strong van der Waals interaction between them. We can drive this interaction with laser pulses of a specific amplitude, duration, and detuning. This allows us to program spatial configurations and interactions between the atoms, naturally encoding graphs like the ones in team QuantuMother’s use case.

Depiction of a meshKernel methods in machine learning are used to compute similarity or distance between objects by transforming input data into a higher dimensional space, where they can be more easily separated. The Quantum Evolving Kernel works by driving the system encoding the graphs with a laser pulse for different durations, searching for the optimal duration that reveals a separation between graphs. The team was able to successfully show a separation between two graphs in a toy problem by finding the optimal drive duration. They then moved on to implement their algorithm on the real dataset of carcinogenesis in rats, finding an optimal drive duration to separate carcinogenic from non-carcinogenic chemical compounds.

For their second method of graph classification, QuantuMother used the PennyLane plugin for Braket to run on the managed state vector simulator, SV1, which emulates the behavior of a noiseless gate-based quantum computer. To do this, the team Trotterized the Hamiltonian they had designed for the AHS experiment so that it could be simulated by a sequence of gates. In the gate-based case, they were not able to find an optimal evolution time that led to a clear separation between graphs, which the team speculated may be due to the absence of longer-range interactions which were present in the AHS device.

Every member of the QuantumMother team showcased their ability to learn the new quantum paradigm of Analog Hamiltonian Simulation and implemented a quantum machine learning algorithm to tackle a real-world use case with social impact. In addition to their prize of USD$10,000, the team will now have the chance to meet with Amazon Visiting Academic Prof. Xiaodi Wu of the University of Maryland to brainstorm ways of expanding their project. Look out for their planned future work on solving the same problem with Decompositional Quantum Graph Neural Networks.

Their source code is available on GitHub.

Enhancing portfolio optimization solutions

Investors want to make the most efficient use of their financial resources by selecting a combination of investments that maximize returns while minimizing risks, creating an optimized portfolio of assets with strong long-term financial prospects. Investment firms around the world have highly varied approaches to this problem, typically using High-Performance Computing (HPC) to deal with the vast amounts of financial data which go into making informed investment decisions. Any potential edge an investor can have against competitors in choosing exactly the right combination of assets could be highly valuable.

Image depicting financial analysis.Portfolio optimization fundamentally involves making investment decisions under a set of constraints. For example, we may want to invest in a set of assets while making sure we don’t exceed a given budget or that we earn a minimum profit. This is a type of combinatorial optimization problem, which may be amenable to quantum advantage, though the relative speedup is an open question. A standard method of encoding optimization problems for quantum computers is with the Quadratic Unconstrained Binary Optimization (QUBO) formulation. With QUBO, we confine our choices to binary decisions (e.g. “buy” and “don’t buy”), and then optimize a cost function (e.g. total profit) to determine which set of decisions leads to the best outcome. QUBO is a convenient formulation for quantum computers partially because finding the optimal solution of a QUBO maps directly onto finding the ground state of an Ising model Hamiltonian, i.e. simulating quantum mechanics.

For QUBO, we need a way to transform inequality constraints (e.g. “the total value of the portfolio must be less than the maximum budget ”) into equality constraints. For instance, if we have the constraint Axb, we can transform it into an equality Ax + s – b = 0, with the requirement that s ≥ 0 Here, b is called a penalty term, and s is called a “slack variable.” Slack variables make the penalty terms vanish when the constraint is achieved. One disadvantage to introducing slack variables for optimization on quantum computers is that they usually require extra qubits to store.

Team “Avocados” set out to implement a technique proposed in a 2022 paper by Montañez-Barrera et al. called unbalanced penalization, which encodes inequality constraints in QUBO without introducing slack variables. The technique works by essentially combining the penalization and slack variable into one. If we take the constraint h(x) ≥ 0 , we can avoid adding a slack variable by defining a penalty function of exponential decay: f(x) = e-h(x). In this function, positive values of x make f(x)≈0 while negative values make it grow exponentially. This is unbalanced penalization. In QUBO however, we are required to use quadratic functions, so we need to use a quadratic approximation for the exponential decay:

quadratic approximation for the exponential decay

Team Avocado used a quadratic approximation for the exponential decay.

For their QHack project, team Avocados used Entropica Labs’ OpenQAOA library with unbalanced penalization to solve an instance of portfolio optimization with up to 24 assets. They ran their quantum algorithm on the Braket managed simulator SV1, the IBM Guadalupe quantum processor, as well as a running an experiment on the IonQ device via Braket. Eliminating slack variables ended up not only saving qubits, but also dramatically improving the success probability of the optimization: in the case of a 10-asset optimization, the probability of finding an optimal solution was 1400x higher when using unbalanced penalization vs. slack variables.

Team Avocados was able to implement a recent technique to reduce the number of qubits required and achieve a higher success probability for portfolio optimization than the standard approach. They will have the opportunity to meet with Amazon Visiting Academic Prof. James Whitfield of Dartmouth College to discuss their project, and will receive USD$10,000 to continue his work on Amazon Braket, as well as the 200+ other AWS services. We look forward to seeing more work from team Avocados in the future!

And, of course, you can find their source code on GitHub.


AWS is humbled to sponsor QHack for the third year running, and we’re looking forward to empowering ongoing innovation, experimentation, and collaboration in the quantum community. To get started with PennyLane on Braket, check out our example notebooks.

PennyLane comes preinstalled in Amazon Braket managed notebooks and in our PennyLane containers for Amazon Braket Hybrid Jobs. Want to do research on Braket? Check out these resources: AWS Cloud Credits for Research and NSF CloudBank.