Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
7bd3e21
Add multigeometry utilities to base Amplitude Lattice
gcalin Nov 27, 2025
9fe4a19
Implement multi-geometry utilities for AB, MS, and OH lattices
gcalin Nov 27, 2025
ad3fe8a
Move MS lattice tests
gcalin Nov 27, 2025
0f58847
Add OH Lattice tests
gcalin Nov 27, 2025
3e911fd
Add multigeometry support for Amplitude Based QLBM
gcalin Nov 28, 2025
7f57200
Update lattices with multigeoemtry primitives
gcalin Nov 28, 2025
1820abe
Add multigeometry support in initial conditions of Amplitude Based QLBM
gcalin Nov 28, 2025
8006f84
Add multigeometry support in ABQLM loop and result
gcalin Nov 28, 2025
6952e19
Add citation
gcalin Nov 28, 2025
7826af2
Merge branch 'main' into dev
gcalin Nov 28, 2025
8d507c5
Remove debug print statements
gcalin Nov 28, 2025
62763bd
Refactor and parameterize incrementation utilities
gcalin Dec 10, 2025
20c7283
Add Binary to OH permutation class for ABQLBM
gcalin Dec 10, 2025
bbc8aff
Add arbitrary uniform discrete velocity initial conditions for ABQLBM
gcalin Dec 10, 2025
faa6542
Add AB initial conditions tests
gcalin Dec 10, 2025
e5f89b0
Add conversion addition test
gcalin Dec 11, 2025
ea158f6
Add AB test fixtures
gcalin Dec 11, 2025
e51356e
Fix imports in tests
gcalin Dec 11, 2025
a33e402
Add citations
gcalin Dec 11, 2025
945ec93
Update adders documentation
gcalin Dec 11, 2025
5e33f16
Add UniformStatePrep primitive
gcalin Dec 11, 2025
46d4f5c
Add documentation for AB initial conditions
gcalin Dec 11, 2025
d727abe
Add UniformStatePrep tests
gcalin Dec 11, 2025
be6556f
Add documentation to OHPermutation
gcalin Dec 11, 2025
063fb69
Add documentation to common primitives
gcalin Dec 11, 2025
1032e98
Fix documentation errors
gcalin Dec 12, 2025
69e70bd
Update ABQLBM web documentation
gcalin Dec 12, 2025
174fe01
Add state preparation citation
gcalin Dec 12, 2025
ee5f996
Add web docs for misc circuits
gcalin Dec 12, 2025
c77d531
Update web docs API
gcalin Dec 12, 2025
03e9e72
Fix configuration in MS simulation demo
gcalin Dec 12, 2025
c0daaa5
Update citation
gcalin Dec 22, 2025
b62fdf3
Add support for control qubits in UniformStatePrep
gcalin Jan 16, 2026
4d0cc47
Add ABQLBM parallel uniform discrete initial conditions
gcalin Jan 16, 2026
2d3505d
Add optional controls to AdditionConversion primitive
gcalin Jan 16, 2026
71597db
Add marker setter to ABLattice
gcalin Jan 16, 2026
12294e6
Add documentation and simplify parallel ICs interface
gcalin Jan 17, 2026
b248cf3
Include parallel ICs in module intercace
gcalin Jan 17, 2026
d3e9b6f
Add parallel ICs to documentation website
gcalin Jan 18, 2026
bf79e4b
Add ABQLBM zone agnostic reflection operator
gcalin Jan 29, 2026
cc20e7c
Fix bug in AB lattice marker register size inference
gcalin Jan 29, 2026
44b4131
Fix bugs in AB initial conditions and documentation
gcalin Jan 30, 2026
ce0fcca
Refactor AB reflection into separate module
gcalin Feb 12, 2026
0c5c368
Add dedicated rectangle oracel for AB agnostic BCs
gcalin Feb 13, 2026
c43749a
Sort imports
gcalin Feb 13, 2026
241ff3c
Add documentation and improve zone agnostic AB reflection oracle
gcalin Feb 13, 2026
ddb3ea9
Add zone agnosit AB reflection to documentation website
gcalin Feb 13, 2026
1c94e67
Make comparator modes parsable
gcalin Feb 18, 2026
b2a9b14
Refactor and document ComparatorMode class
gcalin Feb 19, 2026
3578e21
Add string export to comparator mode
gcalin Feb 19, 2026
903fe4d
Add draft implementation of ymonomial BCs for ABQLBM
gcalin Feb 19, 2026
3e5d022
Add parsing utilities for ymonomial shape
gcalin Feb 19, 2026
40a7592
Add monomial BC parsing to lattice
gcalin Feb 19, 2026
4d01080
Update lattice tests
gcalin Feb 19, 2026
3a1dd4c
Add two register comparator primitive
gcalin Feb 20, 2026
cb665cf
Add YMonomial oracle in AB zone agnostic BCs
gcalin Feb 20, 2026
9c6a1a7
Use zone agnostic operator by default in ABQLBM
gcalin Feb 20, 2026
e6b542d
Normalize segment width in YMonomial STL mesh
gcalin Feb 20, 2026
8d4242f
Update adaptive register functionality and clarify register names
gcalin Feb 20, 2026
bd2836c
Update AB lattice tests
gcalin Feb 20, 2026
f8f0d6e
Add tests for monomial and comparator components
gcalin Feb 20, 2026
4484e00
Move comparators to separate file, improve documentation
gcalin Feb 20, 2026
0652c07
Update website docs
gcalin Feb 20, 2026
d69dbbe
Add decomposition to APDIC class to avoid transpiler bug
gcalin Mar 5, 2026
d0b9bda
Ignore type
gcalin Mar 5, 2026
63f62bc
Run apt-get update before installing dependencies in tests workflow
gcalin Mar 5, 2026
d8240ab
Fix permissions in tests workflow
gcalin Mar 5, 2026
517dcc7
Set qiskit to stable version in pyproject.toml
gcalin Mar 5, 2026
c1a767a
Update exception inheritance and remove unused runner export
gcalin Mar 9, 2026
753bc6c
Update demo simulation notebooks
gcalin Mar 9, 2026
36e3fe3
Delegate result instantiation to lattice class
gcalin Mar 9, 2026
4713ef4
Add result delegation tests
gcalin Mar 9, 2026
ab6644a
Add parallel BC support to zone agnostic BC implementation
gcalin Mar 10, 2026
76b35a7
Add zone agnostic BC tests
gcalin Mar 10, 2026
9e2f026
Change test name
gcalin Mar 10, 2026
255facc
Add e2e tests for all quantum algorithms
gcalin Mar 10, 2026
dd9e8c3
Add demo simulation notebooks for parallel ICs and BCs in ABQLBM
gcalin Mar 10, 2026
a4d2b09
Fix imports and type annotations
gcalin Mar 10, 2026
e53f469
Fix dependency version for qiskit_ibm_runtime
gcalin Mar 10, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
cache: "pip" # caching pip dependencies
- name: Install dependencies
run: |
sudo apt-get install -y -qq libboost-all-dev cmake
sudo apt-get update && sudo apt-get install -y -qq libboost-all-dev cmake
- name: Install qlbm
run: |
pip install --upgrade pip
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ There are also Docker container images in the `Docker` directory that can be use

Currently, `qlbm` supports two algorithms:
- The Quantum Transport Method (Collisionless QLBM) described in [Efficient and fail-safe quantum algorithm for the transport equation](https://doi.org/10.1016/j.jcp.2024.112816) ([arXiv:2211.14269](https://arxiv.org/abs/2211.14269)) by M.A. Schalkers and M. Möller.
- The Space-Time QLBM/QLGA described in [On the importance of data encoding in quantum Boltzmann methods](https://link.springer.com/article/10.1007/s11128-023-04216-6) by M.A. Schalkers and M. Möller and expanded in [Fully Quantum Lattice Gas Automata Building Blocks for Computational Basis State Encodings](https://arxiv.org/abs/2506.12662).
- The Linear-encoding Quantum Lattice Gas Automata (LQLGA) described in [On quantum extensions of hydrodynamic lattice gas automata](https://www.mdpi.com/2410-3896/4/2/48) by P. Love and [Fully Quantum Lattice Gas Automata Building Blocks for Computational Basis State Encodings](https://arxiv.org/abs/2506.12662).
- The Space-Time QLBM/QLGA described in [On the importance of data encoding in quantum Boltzmann methods](https://link.springer.com/article/10.1007/s11128-023-04216-6) by M.A. Schalkers and M. Möller and expanded in [Fully Quantum Lattice Gas Automata Building Blocks for Computational Basis State Encodings](https://doi.org/10.1016/j.jcp.2025.114595).
- The Linear-encoding Quantum Lattice Gas Automata (LQLGA) described in [On quantum extensions of hydrodynamic lattice gas automata](https://www.mdpi.com/2410-3896/4/2/48) by P. Love and [Fully Quantum Lattice Gas Automata Building Blocks for Computational Basis State Encodings](https://doi.org/10.1016/j.jcp.2025.114595).

The `demos` directory contains several use cases for simulating and analyzing these algorithms. Each demo requires minimal setup once the virtual environment has been configured. Consult the `README.md` file in the `demos` directory for further details.

Expand Down
20 changes: 16 additions & 4 deletions demos/simulation/ab_simulation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
"\n",
"from qlbm.components import (\n",
" CQLBM,\n",
" ABDiscreteUniformInitialConditions,\n",
" ABGridMeasurement,\n",
" ABInitialConditions,\n",
" EmptyPrimitive,\n",
")\n",
"from qlbm.infra import QiskitRunner, SimulationConfig\n",
"from qlbm.lattice import ABLattice\n",
"from qlbm.tools.utils import create_directory_and_parents\n"
"from qlbm.tools.utils import create_directory_and_parents"
]
},
{
Expand Down Expand Up @@ -57,7 +57,11 @@
"outputs": [],
"source": [
"cfg = SimulationConfig(\n",
" initial_conditions=ABInitialConditions(lattice),\n",
" initial_conditions=ABDiscreteUniformInitialConditions(\n",
" lattice,\n",
" [1, 2, 5], # E, N, and NE\n",
" ([], list(range(5))), # Span the entire y axis, but nothing on the x axis\n",
" ),\n",
" algorithm=CQLBM(lattice),\n",
" postprocessing=EmptyPrimitive(lattice),\n",
" measurement=ABGridMeasurement(lattice),\n",
Expand All @@ -67,7 +71,7 @@
" statevector_sampling=True,\n",
" execution_backend=AerSimulator(method=\"statevector\"),\n",
" sampling_backend=AerSimulator(method=\"statevector\"),\n",
")\n"
")"
]
},
{
Expand Down Expand Up @@ -115,6 +119,14 @@
" statevector_snapshots=True,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "b61274d7",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
184 changes: 184 additions & 0 deletions demos/simulation/ab_simulation_parallel_bcs.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "348de144",
"metadata": {},
"source": [
"# Simulating the Amplitude-Based Collisionless QLBM"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "181af34e",
"metadata": {},
"outputs": [],
"source": [
"from qiskit_aer import AerSimulator\n",
"\n",
"from qlbm.components import (\n",
" CQLBM,\n",
" ABDiscreteUniformInitialConditions,\n",
" ABGridMeasurement,\n",
" EmptyPrimitive,\n",
")\n",
"from qlbm.infra import QiskitRunner, SimulationConfig\n",
"from qlbm.lattice import ABLattice\n",
"from qlbm.tools.utils import create_directory_and_parents"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "05e4915d",
"metadata": {},
"outputs": [],
"source": [
"lattice = ABLattice(\n",
" {\n",
" \"lattice\": {\"dim\": {\"x\": 16, \"y\": 16}, \"velocities\": \"d2q9\"},\n",
" \"geometry\": [],\n",
" }\n",
")\n",
"\n",
"output_dir = \"qlbm-output/ab-pbc-d2q9-16x16-1-obstacle-qiskit\"\n",
"create_directory_and_parents(output_dir)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5e274b50",
"metadata": {},
"outputs": [],
"source": [
"# Geometry of marker |0>: two \"stacked\" \"wide\" rectangles\n",
"# Geometry of the marker |1>: one \"tall\" rectangle under the first two\n",
"# These geometries will act fully in parallel, and we will observe the average behavior\n",
"lattice.set_geometries(\n",
" [\n",
" [\n",
" {\"shape\": \"cuboid\", \"x\": [6, 12], \"y\": [12, 14], \"boundary\": \"bounceback\"},\n",
" {\"shape\": \"cuboid\", \"x\": [6, 12], \"y\": [8, 10], \"boundary\": \"bounceback\"},\n",
" # {\"shape\": \"cuboid\", \"x\": [6, 8], \"y\": [0, 6], \"boundary\": \"bounceback\"},\n",
" ],\n",
" [{\"shape\": \"cuboid\", \"x\": [6, 8], \"y\": [0, 6], \"boundary\": \"bounceback\"}],\n",
" ]\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "89709eb9",
"metadata": {},
"outputs": [],
"source": [
"lattice.geometries"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "deb472a0",
"metadata": {},
"outputs": [],
"source": [
"from qlbm.components.ab.initial import ABParallelDiscreteUniformInitialConditions\n",
"\n",
"cfg = SimulationConfig(\n",
" initial_conditions=ABParallelDiscreteUniformInitialConditions(\n",
" lattice,\n",
" [[1], [1]],\n",
" [([0, 1], [0, 1, 2, 3]), ([0, 1], [0, 1, 2, 3])],\n",
" ),\n",
" algorithm=CQLBM(lattice),\n",
" postprocessing=EmptyPrimitive(lattice),\n",
" measurement=ABGridMeasurement(lattice),\n",
" target_platform=\"QISKIT\",\n",
" compiler_platform=\"QISKIT\",\n",
" optimization_level=0,\n",
" statevector_sampling=True,\n",
" execution_backend=AerSimulator(method=\"statevector\"),\n",
" sampling_backend=AerSimulator(method=\"statevector\"),\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "57240678",
"metadata": {},
"outputs": [],
"source": [
"cfg.prepare_for_simulation()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1da18eb8",
"metadata": {},
"outputs": [],
"source": [
"# Number of shots to simulate for each timestep when running the circuit\n",
"NUM_SHOTS = 2**12\n",
"\n",
"# Number of timesteps to simulate\n",
"NUM_STEPS = 20"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5c8c7d1e",
"metadata": {},
"outputs": [],
"source": [
"runner = QiskitRunner(\n",
" cfg,\n",
" lattice,\n",
")\n",
"\n",
"\n",
"# Simulate the circuits using both snapshots\n",
"runner.run(\n",
" NUM_STEPS, # Number of time steps\n",
" NUM_SHOTS, # Number of shots per time step\n",
" output_dir,\n",
" statevector_snapshots=True,\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "52a7ae28",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "qlbm-cpu-venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading