Skip to content

Add Julia tutorial for simulating time evolution of the Ising model - #5254

Open
haimeng-zhang wants to merge 23 commits into
Qiskit:mainfrom
haimeng-zhang:julia-tutorial
Open

Add Julia tutorial for simulating time evolution of the Ising model#5254
haimeng-zhang wants to merge 23 commits into
Qiskit:mainfrom
haimeng-zhang:julia-tutorial

Conversation

@haimeng-zhang

@haimeng-zhang haimeng-zhang commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Julia is a dynamic language designed for high-performance numerical and scientific computing, making it a natural fit for quantum simulation workflows. The tutorial shows how Julia is used for both classical pre- and post-processing (e.g., building Hamiltonians, running ODE solvers, computing expectation values) and for orchestrating quantum hardware jobs, eliminating the need to switch between languages or environments. The example used in this tutorial is simulating time evolution of the transverse-field Ising model.

To interface with IBM Quantum hardware from Julia, this tutorial uses two packages from the Qiskit ecosystem: Qiskit.jl wraps the Qiskit C API and provides circuit construction and transpilation functionality in Julia; QiskitIBMRuntime.jl connects to IBM Quantum hardware through the Qiskit IBM Runtime service, enabling job submission and result retrieval directly from Julia.

Files

The PR adds the following files:

  • the notebook docs/tutorials/time-evolution/time-evolution.ipynb
  • the files docs/tutorials/time-evolution/Project.toml and docs/tutorials/time-evolution/Manifest.toml, which are needed to set up the Julia environment and install the dependencies to run the notebook.

@qiskit-bot

Copy link
Copy Markdown
Contributor

Thanks for contributing to Qiskit documentation!

Before your PR can be merged, it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. Thanks! 🙌

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@henryzou50
henryzou50 self-requested a review June 17, 2026 14:23
@garrison

Copy link
Copy Markdown
Member

Before I forget ... the runtime client has a pending rename, which will be complete once JuliaRegistries/General#158556 merges.

@@ -0,0 +1,10 @@
[deps]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is it possible to remove both the toml files? These files won't render on the site and readers won't be able to see their contents. I would say if it's not critical to have the exact package versions installed you could just list these as packages the user should install. If it is, I would add the contents of Project.toml into the notebook through an accordion object.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hi @kaelynj, Sorry for the late reply on this! I edited the Requirements section of the notebook. It now has a code cell that directly installs the tutorial dependencies; this way the installation experience is self-contained in the notebook. It also provide an alternative approach to install from the .toml files, by linking to the Qiskit documentation github repo for those files, for users who want exact reproducibility. Let me know if this looks good to you :)

Comment thread docs/tutorials/time-evolution/time-evolution.ipynb
Comment thread docs/tutorials/time-evolution/time-evolution.ipynb
"\n",
" # Neel state initialization\n",
" for i in 1:2:n\n",
" qc.x(i)\n",

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.

Here's an example of what a corresponding change would look like. Throughout, all mutating operations starting with qc. should be replaced with the corresponding method ending with a !.

Suggested change
" qc.x(i)\n",
" x!(qc, i)\n",

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sorry for coming to this late. I've made this change to the tutorial. @garrison, please take a look.

Comment on lines +610 to +612
" \"LinearAlgebra\",\n",
" \"Plots\",\n",
" \"SparseArrays\",\n",

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.

It's not necessary to include the standard library packages here.

Suggested change
" \"LinearAlgebra\",\n",
" \"Plots\",\n",
" \"SparseArrays\",\n",
" \"Plots\",\n",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

6 participants