Skip to content

Commit

Permalink
Merge pull request #1 from ICHEC/jb
Browse files Browse the repository at this point in the history
Jb
  • Loading branch information
rajarshitiwari authored Jun 7, 2024
2 parents 5db7cf5 + 146fff1 commit c943c4f
Show file tree
Hide file tree
Showing 23 changed files with 251 additions and 762 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: deploy-book

# Only run this when the master branch changes
on:
push:
branches:
- jb

# This job installs dependencies, build the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

# Install dependencies
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: 3.12

- name: Install dependencies
run: |
pip install -r requirements.txt
# Build the book
- name: Build the book
run: |
jupyter-book build .
# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html
enable_jekyll: false
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,11 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.DS_Store
scratch.md
_site/
_draft/
.jekyll-cache/
Gemfile.lock
_build/
_build/*
56 changes: 56 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Book settings
# Learn more at https://jupyterbook.org/customize/config.html

title: Lecture Notes from ICHEC
author: ICHEC Team
logo: logo.png

# Force re-execution of notebooks on each build.
# See https://jupyterbook.org/content/execute.html
execute:
execute_notebooks: force

# Define the name of the latex output file for PDF builds
latex:
latex_documents:
targetname: book.tex

# Add a bibtex file so that we can create citations
bibtex_bibfiles:
- references.bib

# Information about where the book exists on the web
repository:
url: https://github.com/ICHEC/qpcc # Online location of your book
path_to_book: ./ # Optional path to your book, relative to the repository root
branch: jb # Which branch of the repository should be used when creating links (optional)

# Add GitHub buttons to your book
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
html:
use_issues_button: true
use_repository_button: true

html:
extra_footer: "Copyright@2022"

# remove jupyterbooks copyright info
sphinx:
extra_extensions:
- sphinxcontrib.mermaid
config:
html_show_copyright: false

parse:
myst_enable_extensions:
- amsmath
- colon_fence
- deflist
- dollarmath
- html_admonition
- html_image
- linkify
- replacements
- smartquotes
- substitution
- tasklist
7 changes: 7 additions & 0 deletions _static/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
p {text-align: justify;}

.bd-main .bd-content .bd-article-container {
max-width: 81em; /* default is 60em */
}


13 changes: 13 additions & 0 deletions _toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Table of contents
# Learn more at https://jupyterbook.org/customize/toc.html

format: jb-book
root: index

chapters:
- file: pyqm-week1/README.md
- file: pyqm-week2/README.md
- file: pyqm-week3/README.md
- file: pyqm-week4/README.md
- file: pyqm-week5/README.md
- file: pyqm-week6/README.md
2 changes: 2 additions & 0 deletions README.md → index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Python For Quantum Mechanics
layout: home
---

# Python For Quantum Mechanics

## Description
Welcome to Python for Quantum Mechanics. This course was designed to give you a solid foundation in the Python programming language for your studies in quantum technology. The course is six sessions long in total, and builds from the ground up a working knowledge of Python, with emphasis on the NumPy, Matplotlib and SciPy libraries. The first three sessions entail the building of a foundation, where you will learn how to manipulate basic data types in the first session, all the way to object-oriented programming in the third session. The final three sessions involve a deep dive into the afore-mentioned libraries.

Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 24 additions & 7 deletions pyqm-week1/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,47 @@
# Week 1 Contents
# Week 1: Variables, data structures, and operations

## 1.1 - Variables - [[Notebook]](./notebooks/pyqm-1.1-variables.ipynb) - [[Video]](https://youtu.be/dU8NKvAxcnE)
## 1.1 - Variables - [Notebook](./notebooks/pyqm-1.1-variables.ipynb) - [Video](https://youtu.be/dU8NKvAxcnE)

- Integer and Float Variables
- Scientific Notation
- Comparison Operators and Boolean Variables
- Complex Numbers
- Strings
- Casting
- None Type
- Operator Precedence

## 1.2 - Data Structures - [[Notebook]](./notebooks/pyqm-1.2-data-structures.ipynb) - [[Video]](https://youtu.be/yCQQwTEaMvs)
## 1.2 - Data Structures - [Notebook](./notebooks/pyqm-1.2-data-structures.ipynb) - [Video](https://youtu.be/yCQQwTEaMvs)

- Lists
- Tuples
- Sets
- Dictionaries
- Operations With Data Structures:
- Operations with Data Structures
- Properties
- Changing, Adding, And Removing Elements
- Slicing And Reorganising
- Changing, Adding, and Removing Elements
- Slicing and Reorganising
- Combining Structures
- Copying

## 1.3 - Binary Operations - [[Notebook]](./notebooks/pyqm-1.3-binary-operations.ipynb) - [[Video]](https://youtu.be/dMw8E-8cQpc)
## 1.3 - Binary Operations - [Notebook](./notebooks/pyqm-1.3-binary-operations.ipynb) - [Video](https://youtu.be/dMw8E-8cQpc)

- Overview Of Binary
- Bitwise Operators
- Shift Operators

## 1.4 - Cheatsheet - [Notebook]

Week1_Supplementary_Material/PyQM_1.4_Cheatsheet.ipynb

## 1.5 - Tutorial [Tutorial 1](Week1_Exercises/PyQM_Tut.1_sol.ipynb)
1. Matrix Multiplication
2. Matrix Addition/Subtraction
3. Scalar Multiplication Of Matrix
4. Matrix Inverse & Determinant

## 1.6 Exercise [Exercises 1](Week1_Exercises/PyQM_Ex.1_sol.ipynb)
1. Python as a Calculator
2. Energy Levels of Hydrogen
3. Quantum Qubit Gates & Nested Lists
4. Periodic Function
117 changes: 0 additions & 117 deletions pyqm-week1/pyqm-1-overview.ipynb

This file was deleted.

42 changes: 30 additions & 12 deletions pyqm-week2/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Week 2 Contents
# Week 2: Flow control, comprehensions and file operations

## 2.1 - Flow Control - [[Notebook]](./notebooks/pyqm-2.1-flow-control.ipynb) - [[Video]](https://youtu.be/6IUQ12mOb1A)

- Conditional Statements(if,elif,else)
- Testing Code(try,except)
- Conditional Statements(if, elif, else)
- Testing Code (try, except)
- While loops
- Range
- Zip
Expand All @@ -13,14 +13,32 @@

## 2.2 - Compact Code - [[Notebook]](./notebooks/pyqm-2.2-compact-code.ipynb) - [[Video]](https://youtu.be/JBFc9V6BcNY)

- List Comprehensions
- Set Comprehensions
- Dictionary Comprehensions
- Generator Comprehensions
- One-line if and else
- Comprehensions
- list, set, dictionary and more
- Generators
- Maps

## 2.3 - External Data - [[Notebook]](./notebooks/pyqm-2.3-external-data.ipynb) - [[Video]](https://youtu.be/Pjl23pFmk_w)
- Inputting from the terminal/command line
- Copying files
- Reading files
- Writing files
- Creating files
- Basic user input
- Opening, closing and creating file
- Reading and writing files

## 2.4 - Cheatsheet

## 2.5 Tutorial [Tutorial 2](Week2_Exercises/PyQM_Tut.2.ipynb)
1. Convert Decimal To Ten Bit Binary String
2. For Loops, Sequence Sum
3. While Loops, Reverse A Number
4. List Comprehensions
5. DNA
6. Collatz Conjecture
7. Fizz Buzz

## 2.6 Exercise [Exercises 2](Week2_Exercises/PyQM_Ex.2.ipynb)
1. Decimal To/From Binary
2. Balmer Lines
3. Quantum Quibit Gates
4. How many days left do you have to live?
5. Rotating Vectors In 2-Dimensions
6. Quantum Quibit State Normalisation
Loading

0 comments on commit c943c4f

Please sign in to comment.