vbartle /
MML-Companion
This is a companion to the ‘Mathematical Foundations’ section of the book, Mathematics for Machine Learning by Marc Deisenroth, Aldo Faisal and Cheng Ong, written in python for Jupyter Notebook.
Loading repository data…
AlainChance / repository
Companion Jupyter notebooks - Quantum Chemistry and Computing for the Curious, published by Packt - Updated for Qiskit SDK v2.1 and Qiskit Runtime Primitives V2
Updated, work-in-progress code repository for the book Quantum Chemistry and Computing for the Curious: Illustrated with Python and Qiskit® Code (Packt, 2022), derived from the original Packt Publishing repository: PacktPublishing/Quantum-Chemistry-and-Computing-for-the-Curious.
This repository contains companion Jupyter notebooks of the book that have been successfully run with Qiskit v1.3, Qiskit v2.0, Qiskit v2.1 and the Qiskit Runtime V2 primitives:
Chapter_03_Quantum_circuit_model_of_computation_V3.ipynbChapter_04_Molecular_Hamiltonians_V4.ipynbChapter_05_Variational_Quantum_Eigensolver_(VQE)_algorithm_V4.ipynb.We provide a work-in-progress version (V4) of the companion Jupyter notebooks for chapters 4 and 5.
Please refer to the following documentation:
V2 primitives do not perform layout, routing, and translation operations. See the transpilation documentation for instructions to transform circuits.
Qiskit Algorithms is no longer officially supported by IBM. Work is in progress to adapt the whole code base to support V2 primitives and ISA circuits:
Warning
Like any other Apache 2 licensed code, you are free to use qiskit_algorithms, qiskit_nature, qiskit/primitives, and qiskit/providers libraries or/and extend them, but please be aware that it is under your own risk.
See disclaimer in readme, 🔗 https://github.com/qiskit-community/qiskit-algorithms?tab=readme-ov-file#qiskit-algorithms
Temporary fix
In this GitHub repository you will find three TAR archive files containing a set of customized files that are needed/used in the Jupyter notebooks for Chapter 4 and Chapter 5.
Under your own risk, you can adapt and then run the Copy_V4.ipynb notebook which executes the Copy_V4.py script.
%run Copy_V4
The Copy_V4.py Python script sets a boolean qv1 to True if the version of Qiskit is less than 2.0:
import qiskit
qv = qiskit.__version__
print(f"Qiskit version: {qv}")
qv1 = int(qv[0]) < 2
The shared variable primitive_v2 is set in the file primitive_version.py as follows (customize according to your specific installation path):
#------------------------
# Get site_packages path
#------------------------
import site
sitepackages = site.getsitepackages()
#---------------------------------------------------
# Write primitive_version.py into qiskit_algorithms
#---------------------------------------------------
with open(sitepackages[0] + '/qiskit_algorithms/primitive_version.py', "w") as file:
# Write a single line to the file
if qv1:
file.write("primitive_v2 = False")
else:
file.write("primitive_v2 = True")
It then imports it in the code cell that follows Import various algorithms with the following commands:
from qiskit_algorithms.primitive_version import primitive_v2
The shared variable primitive_v2 is imported in a number of Python files, see below examples.
qiskit_algorithms/minimum_eigensolvers/vqe.py
from qiskit_algorithms.primitive_version import primitive_v2
# If version 2 of the Qiskit Runtime primitives
if primitive_v2:
from qiskit.primitives import BaseEstimatorV2 as BaseEstimator, StatevectorEstimator
print("\nvqe - Using Qiskit Runtime V2 primitives")
else:
from qiskit.primitives import BaseEstimatorV1 as BaseEstimator, EstimatorResult
from qiskit.primitives.estimator import Estimator
print("\nvqe - Using Qiskit Runtime V1 primitives")
Selected from shared topics, language and repository description—not editorial ratings.
vbartle /
This is a companion to the ‘Mathematical Foundations’ section of the book, Mathematics for Machine Learning by Marc Deisenroth, Aldo Faisal and Cheng Ong, written in python for Jupyter Notebook.
strath-sdr /
Companion Jupyter Notebooks for the RFSoC-Book.
HeyThatsViv /
Project using machine learning to predict depression using health care data from the CDC NHANES website. A companion dashboard for users to explore the data in this project was created using Streamlit. Written with python using jupyter notebook for the main project flow/analysis and visual studio code for writing custom functions and creating the dashboard.
gkunapuli /
A collection of companion Jupyter notebooks for Ensemble Methods for Machine Learning (Manning, 2023)
Startupsci /
Jupyter notebooks for learning Python and Data Science, companion to Data Science Solutions book.
integral-business-intelligence /
Jupyter notebooks for running DeepSeek-OCR batch PDF processing on Runpod