Skip to content

add the chemistry active space notebook course - #3568

Draft
Dhairya Patel (HABER7789) wants to merge 10 commits into
amcasey/PythonLearningfrom
HABER7789/chemistry-course
Draft

add the chemistry active space notebook course#3568
Dhairya Patel (HABER7789) wants to merge 10 commits into
amcasey/PythonLearningfrom
HABER7789/chemistry-course

Conversation

@HABER7789

Copy link
Copy Markdown
Contributor

Chemistry Course

Ports the ground-state QPE tutorial from Sphinx rst into a notebook course, placed beside circuit-diagrams-new in the learning test workspace. chemistry-course-tools has the converter script, plus the verifier used to validate them.

This branch targets the branch behind #3526 and GitHub will retarget to main once it merges.

Note: This is content only; no extension code.

Ports the ground-state QPE tutorial from Sphinx rst into a five-unit drop-in notebook course, placed beside circuit-diagrams-new in the learning test workspace. chemistry-course-tools holds the converter that generated four of the five units, plus the verifier used to validate them.

Content only; no extension code.
import textwrap
from pathlib import Path

DOCS = Path("/mnt/c/Users/dhaipatel/dhaipatel/html")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't include hardcoded paths from your personal machine in the repo

md(
"## Before you begin\n\n"
"This course requires a Python environment with the `qdk-chemistry[jupyter]` package.\n\n"
"`qdk-chemistry` ships compiled binaries and is not available for native Windows. "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qdk-chemistry 2.0 and later does include precompiled binaries for Windows - see https://pypi.org/project/qdk-chemistry/2.0.0/#files

Comment thread chemistry-course-tools/verify_course.py Outdated

import nbformat

COURSE = Path.home() / "qdk-chem/qdk-learning/courses/chemistry-active-space"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably take an argument or assume a relative location, rather than assume the content is in the user's home directory.

- Regenerates every unit from the 2.1.0 sources, adds the tutorial landing page as an overview unit, and embeds figures and diagrams as cell attachments.

- Refreshes the tutorial scripts each unit imports, which were still on 2.0.0 and were breaking two chapters.

- Converter paths now take arguments instead of assuming the user's home directory.
- Fixed one equation that was coming out as raw text
- Format fixes, center tables and text with captions
- Ch6 sample exercise had no checker registered
- Merges code cells so the learning tree stops repeating a name
- Fixed unit imports
"schemaVersion": 1,
"id": "chemistry-active-space",
"title": "Ground-State Molecular Energies with QPE",
"shortDescription": "Port of the QDK/Chemistry ground-state QPE tutorial to the QDK Learning notebook format.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intent is the QDK will be the location for this. I don't think we should call it a "port". It just is the QDK/Chemistry ground state QPE tutorial.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I will make the changes.

@@ -0,0 +1,2 @@
qdk-chemistry[jupyter]==2.1.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to make this >=2.1.0 so they can release minor versions without breaking the course.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I'll update it

…ER7789/chemistry-course

# Conflicts:
#	.gitignore
- Course now lives in resources/qdk-learning/courses/chemistry-qpe
- Authoring tools in resources/qdk-learning/utils/chemistry-qpe, kept out of the package by .vscodeignore
- Dropped the course id, the folder name is the id now
- requirements.txt uses >= so a minor release does not break the course
- Stopped calling the course a port in the manifest and README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants