# Race against a quantum algorithm

Think you have what it takes to beat a quantum computer?

Instructions

In the following game, your goal is to get the highest score possible, faster than the quantum computer. Once you click **START RACE**, you can click the circles of a graph to change their color. You get one point for every pair of connected circles with non-matching colors. When you're confident you've got a good score, click **FINISH RACE**, and see how you fared against the quantum computer!

Difficulty (2 to {{maxSize}}):

Please enter a number between 2 and {{maxSize}}

Generated Graph ({{getSeconds(data.userTime)}})

Quantum Virtual Machine (QVM) ({{getSeconds(data.compileTime)}})

Quil code for this graph has been created:

{{data.quil}}

The Quil code generated in the previous step has now been compiled into a {{graphSize}}-qubit program.

After {{data.iterations}} iterations of the classical optimizer and classical subroutine, an answer has been found for the max cut of this graph.

The quantum algorithm has completed execution in {{getSeconds(data.compileTime)}}.

Time and Score Results | ||
---|---|---|

You: | {{graph.score()}} point{{graph.score() != 1 ? 's' : ''}} | {{getSeconds(data.userTime)}} |

QVM: | {{data.score}} point{{data.score != 1 ? 's' : ''}} | {{getSeconds(data.compileTime)}} |

Best possible: | {{maxScore}} point{{maxScore != 1 ? 's' : ''}} |

Possible Answers

## MAXIMUM CUT

A maximum cut is a separation of a graph into two parts (e.g., teal and pink) that maximizes the number of lines between the two parts. Finding the maximum cut of a graph is an important problem in fields like electronic circuit design, statistical physics, and machine learning (see here), but it's intrinsically difficult for today's computers to solve. Rigetti's quantum computers may soon be able to find close-to-optimal solutions faster than today's computers by using the Quantum Approximate Optimization Algorithm (QAOA). In this game, we aim to give you a sense of the difficulty of the problem and the approximate nature of the QAOA.

Interested in learning more? Read the documentation and begin developing with Forest.