Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Molecule Energy Simulator #64

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/components/landing-page/DemonstratorChooser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ export const DemonstratorChooser = (props: GridProps) => (
title="Mixed Integer Programming"
description="The MIP problem is a mathematical optimization problem where some or all of the variables are restricted to be integers."
/>
<DemonstratorCard
new={true}
href="demonstrate/MoleculeEnergySimulator"
title="Molecule Energy Simulator"
description="This demonstrator will compute the ground state energy for a given molecule using VQE algorithm."
/>
</GridItem>
</Grid>
);
32 changes: 32 additions & 0 deletions src/pages/demonstrate/MoleculeEnergySimulator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { Flex, Heading, Text } from "@chakra-ui/react";
import { NextPage } from "next";
import { useState } from "react";
import { Demonstrator } from "../../components/demonstrators/Demonstrator";
import { Layout } from "../../components/layout/Layout";

const MoleculeEnergySimulator: NextPage = () => {
const [svg, setSvg] = useState<string | null>(null);

return (
<Layout>
<Heading as="h1">Molecule Energy Simulator</Heading>
<Text color="text" align="justify">
This demonstrator will compute the ground state energy for a given
molecule using VQE algorithm. The molecule input is given in XYZ Format.
</Text>

<Demonstrator
demonstratorId="edu.kit.provideq.toolbox.demonstrators.MoleculeEnergySimulator"
onSolved={setSvg}
/>

{svg && (
<Flex justifyContent="center">
<div dangerouslySetInnerHTML={{ __html: svg }} />
</Flex>
)}
</Layout>
);
};

export default MoleculeEnergySimulator;