-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement problem mask for QUBO
- Loading branch information
1 parent
9ca8c65
commit bd6acdc
Showing
3 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import Head from "next/head"; | ||
import React, { useState } from "react"; | ||
import type { NextPage } from "next"; | ||
import { TextArea } from "../../components/solvers/SAT/TextArea"; | ||
import { ProgressHandler } from "../../components/solvers/ProgressHandler"; | ||
import { Text, Divider, Heading, Spacer, Code } from "@chakra-ui/react"; | ||
import { Layout } from "../../components/layout/Layout"; | ||
import { EditorControls } from "../../components/solvers/EditorControls"; | ||
import { baseUrl } from "../../api/ToolboxAPI"; | ||
|
||
const QUBO: NextPage = () => { | ||
const [quboTerm, setQuboTerm] = useState(""); | ||
|
||
return ( | ||
<Layout> | ||
<Head> | ||
<title>ProvideQ</title> | ||
<meta name="description" content="Generated by create next app" /> | ||
<link rel="icon" href="/favicon.ico" /> | ||
{/* TODO: replace favicon */} | ||
</Head> | ||
|
||
<Heading as="h1">QUBO Solver</Heading> | ||
<Text color="text" align="justify"> | ||
In the Quadratic Unconstrained Binary Optimization problem, we try to | ||
find the assignment for a finite amount of <Code>0/1</Code> | ||
decision variables that minimizes a given quadratic term with these | ||
variables. The problem statement is given in the LP format and all | ||
solvers will present a variable assigment as a solution. | ||
</Text> | ||
|
||
<Spacer /> | ||
|
||
<EditorControls | ||
idleText={'Try "a and not (not a or not b)" 👇'} | ||
onUpload={setQuboTerm} | ||
editorContent={quboTerm} | ||
documentationLink={`${baseUrl()}/webjars/swagger-ui/index.html#/qubo`} | ||
/> | ||
<TextArea problemString={quboTerm} setProblemString={setQuboTerm} /> | ||
<Divider /> | ||
<ProgressHandler problemTypes={["qubo"]} problemInput={quboTerm} /> | ||
</Layout> | ||
); | ||
}; | ||
|
||
export default QUBO; |