Skip to content

Demo: X-ray Absorption Spectroscopy #1390

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

Open
wants to merge 106 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
106 commits
Select commit Hold shift + click to select a range
c7c374f
Initial commit, created blank ipynb in root
colinjdale May 30, 2025
95965d7
Began writing
colinjdale May 30, 2025
c13fea8
Made full demo outline
colinjdale May 30, 2025
7055697
Finished outline
colinjdale May 30, 2025
342dd1b
Used notebook converter to make .py, and created json
colinjdale May 30, 2025
856840c
Update .gitignore
colinjdale May 30, 2025
e966eee
Merge branch 'master' into demo_xas
colinjdale May 30, 2025
a5b6afa
Renamed json file
colinjdale Jun 2, 2025
854bda8
Removed all the blank lines
colinjdale Jun 2, 2025
624c593
Fixed more formatting
colinjdale Jun 2, 2025
e6602e4
Updated formatting again
colinjdale Jun 2, 2025
16bcc1e
Some formatting corrections
colinjdale Jun 2, 2025
876628a
Merge branch 'master' into demo_xas
colinjdale Jun 2, 2025
115fe5a
Some modifications
colinjdale Jun 2, 2025
6ed1ba1
Merge branch 'demo_xas' of https://github.com/PennyLaneAI/qml into de…
colinjdale Jun 2, 2025
a819910
Added temp figures
colinjdale Jun 2, 2025
13abb02
Added a block diagram
colinjdale Jun 2, 2025
72888e7
Figures moved to static
colinjdale Jun 2, 2025
ccbcb8e
Created .py file for deployment
colinjdale Jun 2, 2025
f491e1a
Whoops
colinjdale Jun 2, 2025
deef172
Edits
colinjdale Jun 2, 2025
b0cea86
Formatting changes
colinjdale Jun 2, 2025
174b99c
More formatting changes
colinjdale Jun 2, 2025
8240977
Merge branch 'master' into demo_xas
colinjdale Jun 2, 2025
9f7604f
Some updates
colinjdale Jun 3, 2025
5347601
Increased num_steps for factorization.
colinjdale Jun 3, 2025
ca38479
More description of algorithm intuition
colinjdale Jun 3, 2025
523972c
Slight updates to nb
colinjdale Jun 4, 2025
f2cc4ab
Modified Hamiltonian creation
colinjdale Jun 6, 2025
4e9b9c9
Pushing edits to nb
colinjdale Jun 9, 2025
2236127
more edits
colinjdale Jun 9, 2025
5712c97
Lots of details on Hamiltonian implementation
colinjdale Jun 10, 2025
1f44f24
Made .py file again and used black.
colinjdale Jun 10, 2025
821b285
Small edits
colinjdale Jun 10, 2025
c4ac7e6
Removed redundant figure folder
colinjdale Jun 10, 2025
7e9c3c2
Formatting edits
colinjdale Jun 10, 2025
586c6d0
Merge branch 'master' into demo_xas
colinjdale Jun 10, 2025
9d1ae6c
More formatting edits
colinjdale Jun 10, 2025
8677280
Merge branch 'demo_xas' of https://github.com/PennyLaneAI/qml into de…
colinjdale Jun 10, 2025
0faf7a0
Merge branch 'master' into demo_xas
colinjdale Jun 11, 2025
833e690
Some Edits
colinjdale Jun 11, 2025
6c6f1b5
Merge branch 'demo_xas' of https://github.com/PennyLaneAI/qml into de…
colinjdale Jun 11, 2025
56e3b63
updated figures
colinjdale Jun 12, 2025
8069f40
changed image name
colinjdale Jun 12, 2025
1923999
Added captions
colinjdale Jun 12, 2025
92017bc
Missed one
colinjdale Jun 12, 2025
98b0f87
Some edits, added measurement circuit figure
colinjdale Jun 12, 2025
46436ab
Put parameters after circuit definitions
colinjdale Jun 12, 2025
6582fee
Merge branch 'master' into demo_xas
colinjdale Jun 12, 2025
d123e80
Commit pre-Stepan comments changes
colinjdale Jun 12, 2025
f5187f2
Merge branch 'demo_xas' of https://github.com/PennyLaneAI/qml into de…
colinjdale Jun 12, 2025
50f5270
Merge branch 'master' into demo_xas
colinjdale Jun 13, 2025
76c68cf
Small edits
colinjdale Jun 13, 2025
e027784
Merge branch 'demo_xas' of https://github.com/PennyLaneAI/qml into de…
colinjdale Jun 13, 2025
6115f27
Merge branch 'master' into demo_xas
colinjdale Jun 27, 2025
e80da87
update
colinjdale Jul 2, 2025
2592d85
Merge branch 'demo_xas' of https://github.com/PennyLaneAI/qml into de…
colinjdale Jul 2, 2025
52bfb1c
Replaced figures with better font
colinjdale Jul 2, 2025
4e11768
Commit before changing script
colinjdale Jul 7, 2025
9356565
commit
colinjdale Jul 9, 2025
e68ec9e
Big H2 update!
colinjdale Jul 9, 2025
02be0c3
Merge branch 'master' into demo_xas
colinjdale Jul 9, 2025
b6e7460
moved files around
colinjdale Jul 9, 2025
3424aeb
fixed variable name issues
colinjdale Jul 9, 2025
1161868
Merge branch 'demo_xas' of https://github.com/PennyLaneAI/qml into de…
colinjdale Jul 9, 2025
189201d
Changed to N2.
colinjdale Jul 10, 2025
2694b2d
Test push
colinjdale Jul 10, 2025
987a8a4
Merge branch 'master' into demo_xas
colinjdale Jul 10, 2025
353aa0b
Some caption testing
colinjdale Jul 10, 2025
bbe24b5
Merge branch 'demo_xas' of https://github.com/PennyLaneAI/qml into de…
colinjdale Jul 10, 2025
2d70f8c
Added references
colinjdale Jul 10, 2025
2686551
Test version number and fixing random seed
colinjdale Jul 10, 2025
87a3c08
Merge branch 'master' into demo_xas
colinjdale Jul 10, 2025
17503af
Text edit and fixed figures.
colinjdale Jul 10, 2025
4f403c3
Merge branch 'demo_xas' of https://github.com/PennyLaneAI/qml into de…
colinjdale Jul 10, 2025
fd7d83e
grammar check
colinjdale Jul 10, 2025
8610f8e
small updates
colinjdale Jul 10, 2025
4ffad9d
Back to H2
colinjdale Jul 11, 2025
2a82aaf
Added many links, and Thouless reference
colinjdale Jul 11, 2025
306a596
to .py
colinjdale Jul 11, 2025
3a2718c
Removed ipynb files using gitignore
colinjdale Jul 14, 2025
8fd2ed3
Deleted pandoc file
colinjdale Jul 14, 2025
e79d7c2
More file cleaning
colinjdale Jul 14, 2025
7455c8a
Update demonstrations/tutorial_xas.py
colinjdale Jul 14, 2025
26198a5
Update demonstrations/tutorial_xas.py
colinjdale Jul 14, 2025
2a15ea5
Update demonstrations/tutorial_xas.py
colinjdale Jul 14, 2025
c9520d6
Update demonstrations/tutorial_xas.py
colinjdale Jul 14, 2025
8e6e9b4
Update demonstrations/tutorial_xas.py
colinjdale Jul 14, 2025
4e8b822
Update demonstrations/tutorial_xas.py
colinjdale Jul 14, 2025
2fdcae9
Update demonstrations/tutorial_xas.py
colinjdale Jul 14, 2025
2991e00
Update demonstrations/tutorial_xas.py
colinjdale Jul 14, 2025
a32fcbe
Apply suggestions from code review
colinjdale Jul 14, 2025
aaac93c
Added note, and made some alt text and figure label edits
colinjdale Jul 14, 2025
7ca4b0c
Some edits, and figure alignment
colinjdale Jul 14, 2025
4be3fa9
Grammar and spell check.
colinjdale Jul 14, 2025
90f0b30
Note issue
colinjdale Jul 14, 2025
1598d2d
alt text error
colinjdale Jul 14, 2025
6b42e4b
black + manual edits
colinjdale Jul 14, 2025
acc91fe
More edits
colinjdale Jul 14, 2025
1d57382
edits
colinjdale Jul 14, 2025
e10e2d1
More edits
colinjdale Jul 14, 2025
0a15398
Removed coord shift
colinjdale Jul 15, 2025
2963c23
Ooops
colinjdale Jul 15, 2025
9551bb9
small edits
colinjdale Jul 15, 2025
5b1b699
More edtis
colinjdale Jul 15, 2025
65f519c
Some edits
colinjdale Jul 15, 2025
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ backreferences
.DS_Store
demos_community.rst
.venv/
.venv_ubuntu/
.venv-build/
.test_figures/
demo_requirements.txt
**/*.egg-info/
*.msi
*.deb
*.ipynb
pandoc*.msi

# Generated after installation
.github/workflows/qml_pipeline_utils/build/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,086 changes: 1,086 additions & 0 deletions demonstrations/tutorial_xas.ipynb

Large diffs are not rendered by default.

133 changes: 133 additions & 0 deletions demonstrations/tutorial_xas.metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"title": "X-ray Absorption Spectroscopy Simulation in the Time-Domain",
"authors": [
{
"username": "colinjdale"
}
],
"dateOfPublication": "2025-07-30T09:00:00+00:00",
"dateOfLastModification": "2025-07-30T09:00:00+00:00",
"categories": [
"Quantum Chemistry",
"Algorithms"
],
"tags": [],
"previewImages": [
{
"type": "thumbnail",
"uri": "/_static/demo_thumbnails/regular_demo_thumbnails/thumbnail_how_to_build_cdf_hamiltonians.png"
},
{
"type": "large_thumbnail",
"uri": "/_static/demo_thumbnails/large_demo_thumbnails/thumbnail_large_how_to_build_cdf_hamiltonians.png"
}
],
"seoDescription": "Learn how to simulate X-ray absorption spectroscopy in PennyLane.",
"doi": "",
"references": [
{
"id": "Fomichev2025",
"type": "article",
"title": "Fast simulations of X-ray absorption spectroscopy for battery materials on a quantum computer",
"authors": "Stepan Fomichev, Pablo A. M. Casares, Jay Soni, Utkarsh Azad, Alexander Kunitsa, Arne-Christian Voigt, Jonathan E. Mueller, Juan Miguel Arrazola",
"year": "2025",
"journal": "arXiv",
"url": "https://arxiv.org/abs/2506.15784"
},
{
"id": "Fomichev2024",
"type": "article",
"title": "Simulating X-ray absorption spectroscopy of battery materials on a quantum computer",
"authors": "Stepan Fomichev, Kasra Hejazi, Ignacio Loaiza, Modjtaba Shokrian Zini, Alain Delgado, Arne-Christian Voigt, Jonathan E. Mueller, Juan Miguel Arrazola",
"year": "2024",
"journal": "arXiv",
"url": "https://arxiv.org/abs/2405.11015"
},
{
"id": "Loaiza2023",
"type": "article",
"title": "Block-invariant symmetry shift: Preprocessing technique for second-quantized Hamiltonians to improve their decompositions to linear combination of unitaries",
"authors": "Ignacio Loaiza, Artur F Izmaylov",
"year": "2023",
"journal": "J Chem Theory Comput.",
"url": "https://pubs.acs.org/doi/10.1021/acs.jctc.3c00912"
},
{
"id": "Yen2021",
"type": "article",
"title": "Cartan subalgebra approach to efficient measurements of quantum observables",
"authors": "Tzu-Ching Yen and Artur F. Izmaylov",
"year": "2021",
"journal": "PRX Quantum",
"url": "https://doi.org/10.1103/PRXQuantum.2.040320"
},
{
"id": "Cohn2021",
"type": "article",
"title": "Quantum filter diagonalization with compressed double-factorized Hamiltonians",
"authors": "Jeffrey Cohn, Mario Motta, and Robert M. Parrish",
"year": "2021",
"journal": "PRX Quantum",
"url": "https://doi.org/10.1103/PRXQuantum.2.040352"
},
{
"id": "Childs2019",
"type": "article",
"title": "Faster quantum simulation by randomization",
"authors": "Andrew M. Childs, Aaron Ostrander, Yuan Su",
"year": "2019",
"journal": "Quantum",
"url": "https://doi.org/10.22331/q-2019-09-02-182"
},
{
"id": "Sherrill2005",
"type": "article",
"title": "Permutational symmetries of one- and two-electron integrals",
"authors": "C. David Sherrill",
"year": "2005",
"journal": "",
"url": "https://vergil.chemistry.gatech.edu/static/content/permsymm.pdf"
},
{
"id": "Thouless1960",
"type": "article",
"title": "Stability conditions and nuclear rotations in the Hartree-Fock theory",
"authors": "David J. Thouless",
"year": "1960",
"journal": "Nuclear Physics",
"url": "https://doi.org/10.1016/0029-5582(60)90048-1"
}
],
"basedOnPapers": [
"10.48550/arXiv.2506.15784",
"10.48550/arXiv.2405.11015"
],
"referencedByPapers": [],
"relatedContent": [
{
"type": "demonstration",
"id": "tutorial_qchem_external",
"weight": 1.0
},
{
"type": "demonstration",
"id": "tutorial_initial_state_preparation",
"weight": 1.0
},
{
"type": "demonstration",
"id": "tutorial_how_to_build_compressed_double_factorized_hamiltonians",
"weight": 1.0
},
{
"type": "demonstration",
"id": "tutorial_quantum_chemistry",
"weight": 1.0
},
{
"type": "demonstration",
"id": "tutorial_fermionic_operators",
"weight": 1.0
}
]
}
Loading
Loading