Skip to content

Commit

Permalink
feat: add useful information to problem chooser
Browse files Browse the repository at this point in the history
  • Loading branch information
schweikart committed Sep 28, 2023
1 parent 2766d91 commit 9ca8c65
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
17 changes: 13 additions & 4 deletions src/components/landing-page/ProblemCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import NextLink from "next/link";
interface ProblemCardProps {
href: string;
new: boolean;
qubits: number;
speedup: "polynomial" | "superpolynomial";
tags: string[];
problemName: string;
description: string;
}
Expand All @@ -16,7 +15,7 @@ export const ProblemCard = (props: ProblemCardProps) => {
<Box p="6">
<Box display="flex" alignItems="baseline">
{props.new && (
<Badge borderRadius="full" px="2" colorScheme="teal" mr="2">
<Badge borderRadius="full" px="2" colorScheme="blue" mr="2">
New
</Badge>
)}
Expand All @@ -27,7 +26,17 @@ export const ProblemCard = (props: ProblemCardProps) => {
fontSize="xs"
textTransform="uppercase"
>
{props.qubits} qubits &bull; {props.speedup} speedup
{props.tags.map((tag) => (
<Badge
key={tag}
borderRadius="full"
px="2"
colorScheme="teal"
mr="2"
>
{tag}
</Badge>
))}
</Box>
</Box>

Expand Down
11 changes: 4 additions & 7 deletions src/components/landing-page/ProblemChooser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ export const ProblemChooser = (props: GridProps) => (
<GridItem>
<ProblemCard
href="solve/SAT"
new={true}
qubits={23}
speedup="superpolynomial"
new={false}
tags={["simulated"]}
problemName="SAT"
description="For a given Boolean formula, this algorithm checks if there exists an interpretation that satisfies it."
/>
Expand All @@ -17,8 +16,7 @@ export const ProblemChooser = (props: GridProps) => (
<ProblemCard
href="solve/MaxCut"
new={false}
qubits={12}
speedup="polynomial"
tags={["QAOA", "simulated"]}
problemName="MaxCut"
description="For a given undirected, weighted graph, this algorithm finds a cut that is a maximum in some way or another."
/>
Expand All @@ -27,8 +25,7 @@ export const ProblemChooser = (props: GridProps) => (
<ProblemCard
href="solve/FeatureModelAnomaly"
new={false}
qubits={12}
speedup="polynomial"
tags={["sub-routines"]}
problemName="Feature Model Anomaly"
description="For a given feature model, check for Void Feature Model, Dead Features, False-Optional Features, Redundant Constraints.."
/>
Expand Down

0 comments on commit 9ca8c65

Please sign in to comment.