-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cb91801
commit a76b39a
Showing
3 changed files
with
128 additions
and
2 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,126 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"id": "c3e9e3e8", | ||
"metadata": {}, | ||
"source": [ | ||
"# Assignment: Normalizing Wavefunctions with Jupyter and Colab\n", | ||
"\n", | ||
"## 🎯 Objective¶\n", | ||
"To practice Jupyter and Colab.\n", | ||
"\n", | ||
"## 📜 Instructions\n", | ||
"1. Presuming you already have a GitHub account, [connect to GitHub Classroom](https://classroom.github.com/a/KxJcE3PU). You'll see ![p1](../pics/2.png)\n", | ||
"1. Click `Accept the assignment` and then update the page ![p2](../pics/3.png). You will see a new repository with the task ![p3](../pics/4.png)\n", | ||
"1. To complete the assignment you need to complete the Jupyter notebook **`Normalizing_eigenfunctions.ipynb`**." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "4c6dc3fd", | ||
"metadata": {}, | ||
"source": [ | ||
"## Editing a Jupyter Notebook from GitHub\n", | ||
"\n", | ||
"As described in the [notes](https://qchem.qc-edu.org/jupyter.html#), there are several ways to edit `.ipynb` files.\n", | ||
"\n", | ||
"### Using Google Colab (direct download and upload)\n", | ||
"In this tutorial we will show how to work with Jupyter notebooks through Google Colab.\n", | ||
"1. Download the `.zip` archive of the GitHub repo. In order to download it click `code` and `Download Zip` ![p4](../pics/5.png)\n", | ||
"1. When the repo is downloaded, go to [Google Colab](https://colab.research.google.com/) and add the `.ipynb` file from the repo: `File` $\\rightarrow$ `Upload notebook` ![p5](../pics/6.png)\n", | ||
"You will see this window ![p6](../pics/7.png)\n", | ||
"1. Upload the `.ipynb` file \n", | ||
"\n", | ||
"Voila! ![p7](../pics/8.png)\n", | ||
"\n", | ||
"### Extension for Chromium Browsers.\n", | ||
"If you use a browser like Google Chrome or Microsoft Edge, then you can use the [Open in Colab](https://chrome.google.com/webstore/detail/open-in-colab/iogfkhleblhcpcekbiedikdehleodpjo) browser extension. Then, \n", | ||
"1. View the target Jupyter Notebook on Github\n", | ||
"2. Click the extension to open the notebook in Colab.\n", | ||
"3. When you do this, you may need to grant Google/Microsoft (Colab/GitHub) permission to interchange information." | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "7b4df3c2", | ||
"metadata": {}, | ||
"source": [ | ||
"### Understanding the assignment\n", | ||
"There is an instruction written in the notebook. All you need to do is to fill the code between \n", | ||
"```\n", | ||
"### START YOUR CODE HERE\n", | ||
"...\n", | ||
"### END YOUR CODE HERE\n", | ||
"```\n", | ||
"![p8](../pics/9.png)\n", | ||
"\n", | ||
"The purpose of this assignment is to compute the normalization constant for the particle-in-a-box. The particle-in-a-box is perhaps the simplest (bound) quantum system. You do not need to know much about the particle-in-a-box to complete this assignment however: referring to the relevant section of the [notes](https://qchem.qc-edu.org/ParticleIn1DBox.html#normalization-of-wavefunctions), one sees that one can choose $A_n = \\sqrt{\\frac{2}{a}}$.\n", | ||
"\n", | ||
"Once the code is completed, you can click the play button to evaluate the cell.\n", | ||
"When you are satisfied with a code just click `File` $\\rightarrow$ `Save` and then `Download` $\\rightarrow$ `Download .ipynb`\n", | ||
"![p9](../pics/10.png)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "89ae3117", | ||
"metadata": {}, | ||
"source": [ | ||
"## Submitting an assignment\n", | ||
"\n", | ||
"Submitting the assignment is breeze!\n", | ||
"When you downloaded the final version of the file just go to your repo and click `Add file` $\\rightarrow$ `Upload files`; then upload your newly created file ![p10](../pics/11.png)\n", | ||
"Now commit your changes and click `Commit changes` ![p11](../pics/12.png)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "51b6c1b1", | ||
"metadata": {}, | ||
"source": [ | ||
"## Check the result\n", | ||
"\n", | ||
"In order to check whether your code passed tests all you need to do is go to `Actions`$\\rightarrow$ `Your commit` $\\rightarrow$ `Test with pytest`. ![p12](../pics/13.png) ![p13](../pics/14.png) In most cases the tests will run automatically, and you do not need to explicitly invoke Pytest.\n", | ||
"\n", | ||
"If you see a green check mark: ***CONGRATULATIONS!*** you passed the assignment \n", | ||
"\n", | ||
"If there is a bug, then the following may occur:\n", | ||
"![p14](../pics/15.png) ![p15](../pics/16.png)\n", | ||
"\n", | ||
"Try to find your mistake but if you get stuck, contact me `@RichRick1`\n", | ||
"![p16](../pics/17.png) ![p17](../pics/18.png)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"id": "a15b3186", | ||
"metadata": {}, | ||
"source": [ | ||
"## Grading Scheme\n", | ||
"Completing the assignment earns you an **S**. To earn an **S+**, explore whether there are other choices for the normalization constant that also pass the tests. Can you find a (correct) choice for the normalization constant that nonetheless fails the tests? How is this possible!" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3 (ipykernel)", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.9.7" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 5 | ||
} |