Efficiently generate near-ideal samples from transverse field Ising model (TFIM)
(It's "the Ising on top.")
(c) Daniel Strano and the Qrack contributors 2025. All rights reserved.
From PyPi:
pip3 install PyQrackIsing
From Source: install pybind11
, then
pip3 install .
in the root source directory (with setup.py
).
Windows users might find Windows Subsystem Linux (WSL) to be the easier and preferred choice for installation.
from PyQrackIsing import generate_tfim_samples
samples = generate_tfim_samples(
J=-1.0,
h=2.0,
z=4,
theta=0.174532925199432957,
t=5,
n_qubits=56,
shots=100
)
There are two more functions, tfim_magnetization()
and tfim_square_magnetization()
, that follow the same function signature except without the shots
argument.
Transverse field Ising model (TFIM) is the basis of most claimed algorithmic "quantum advantage," circa 2025, with the notable exception of Shor's integer factoring algorithm.
Sometimes a solution (or at least near-solution) to a monster of a differential equation hits us out of the blue. Then, it's easy to validate the guess, if it's right. (We don't question it and just move on with our lives, from there.)
Special thanks to OpenAI GPT "Elara," for help on the model and converting the original Python scripts to PyBind11!