Skip to content
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
335239d
added first initial version to initialize a MPO from sum of operators…
thilomueller Apr 9, 2025
2b56979
improved function description
thilomueller Apr 9, 2025
7499c43
added option to truncate MPO at maximum bond dimension
thilomueller Apr 9, 2025
7abfddb
added test case for init_from_full_matrix
thilomueller Apr 9, 2025
731e186
added test case for init_from_sum_op
thilomueller Apr 9, 2025
6cffd1a
Merge remote-tracking branch 'origin/main' into MPO_generator
thilomueller Oct 15, 2025
1f2149e
implemented generic MPO construction following Hubig et al.
thilomueller Oct 16, 2025
445ddd3
removed redundant if-branch in bond-1 MPO helper function
thilomueller Oct 16, 2025
8caf79f
removed duplicate Hamiltonian matrix computation in init_from_terms t…
thilomueller Oct 16, 2025
1afc1aa
changed MPO product calculation to use tensordot and reshape instead …
thilomueller Oct 16, 2025
a1b7003
handle special case of single-site MPO in _mpo_sum helper function an…
thilomueller Oct 16, 2025
cc345de
🎨 pre-commit fixes
pre-commit-ci[bot] Oct 16, 2025
daee7c3
Merge branch 'munich-quantum-toolkit:main' into MPO_generator
thilomueller Oct 29, 2025
ccbc85a
added interface for sparse initialization of general MPO construction
thilomueller Oct 30, 2025
df6f8b3
added regex escape and type guards
thilomueller Oct 30, 2025
4c09173
Merge branch 'main' into MPO_generator
aaronleesander Nov 26, 2025
4bd7e62
Merge branch 'main' into MPO_generator
aaronleesander Jan 8, 2026
a4f8245
generic MPO construction using only Pauli strings
aaronleesander Jan 8, 2026
1976032
updated tests to match new ising and heisenberg forms
aaronleesander Jan 8, 2026
08a9aff
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 8, 2026
21c1401
Merge branch 'main' into MPO_generator
aaronleesander Jan 9, 2026
e80ce0d
renamed Hamiltonian initialization methods
aaronleesander Jan 9, 2026
cee5ebb
renamed identity initialization method
aaronleesander Jan 9, 2026
f6528fc
renamed custom params, re-ordered methods for readability
aaronleesander Jan 9, 2026
2783a0f
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 9, 2026
9869b6f
made ising and heisenberg classmethods, changed usage
aaronleesander Jan 9, 2026
edabf3b
Merge branch 'MPO_generator' of https://github.com/thilomueller/mqt-y…
aaronleesander Jan 9, 2026
50f6089
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 9, 2026
72bab33
coupled transmon now changed to class method, usage changed
aaronleesander Jan 9, 2026
1350f7b
updated MPO usage
aaronleesander Jan 9, 2026
6e0ee7b
Merge branch 'MPO_generator' of https://github.com/thilomueller/mqt-y…
aaronleesander Jan 9, 2026
0a57dcf
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 9, 2026
8a56571
ruff fixes and docstring updates
aaronleesander Jan 9, 2026
05f7098
mypy fixes
aaronleesander Jan 9, 2026
2788b7a
fixed missing variable assignment
aaronleesander Jan 9, 2026
05efc68
🎨 pre-commit fixes
pre-commit-ci[bot] Jan 9, 2026
b30d3a9
added check for OSError
aaronleesander Jan 9, 2026
ecd7cf9
added cpu count exception handling
aaronleesander Jan 9, 2026
067521d
updated changelog
aaronleesander Jan 9, 2026
3528220
updated example to include new Hamiltonian constructors
aaronleesander Jan 9, 2026
796d86e
fixed broken doc
aaronleesander Jan 9, 2026
a81565a
added new tests for coverage
aaronleesander Jan 12, 2026
0a24d72
Merge branch 'main' into MPO_generator
aaronleesander Jan 12, 2026
6689d0c
added more tests for coverage
aaronleesander Jan 12, 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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning], with the exception that minor rel

### Added

- updates MPO class to allow construction of arbitrary Pauli Hamiltonians ([#216]) ([**@aaronleesander**, **@thilomueller**])
- added faster paths for TDVP dense effective Hamiltonian ([#280]) ([**@aaronleesander**])
- added more stable and faster SVD and QR implementation ([#278]) ([**@aaronleesander**])
- TDVP now utilizes a dense Hamiltonian for small tensor sizes (adjusted by global variable DENSE_THRESHOLD) ([#261]) ([**@aaronleesander**])
Expand Down Expand Up @@ -51,6 +52,7 @@ _📚 Refer to the [GitHub Release Notes](https://github.com/munich-quantum-tool

<!-- PR links -->

[#216]: https://github.com/munich-quantum-toolkit/yaqs/pull/216
[#290]: https://github.com/munich-quantum-toolkit/yaqs/pull/290
[#280]: https://github.com/munich-quantum-toolkit/yaqs/pull/280
[#278]: https://github.com/munich-quantum-toolkit/yaqs/pull/278
Expand All @@ -65,6 +67,7 @@ _📚 Refer to the [GitHub Release Notes](https://github.com/munich-quantum-tool

[**@denialhaag**]: https://github.com/denialhaag
[**@aaronleesander**]: https://github.com/aaronleesander
[**@thilomueller**]: https://github.com/thilomueller

<!-- General links -->

Expand Down
27 changes: 25 additions & 2 deletions docs/examples/analog_simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,39 @@ In this example, an Ising Hamiltonian is initialized as an MPO, and an MPS state
A noise model is applied, and simulation parameters are defined for an analog simulation using the Tensor Jump Method (TJM).
After running the simulation, the expectation values of the $X$ observable are extracted and displayed as a heatmap.

Define the system Hamiltonian
Define the system Hamiltonian. We show 3 possible ways to define the Ising Hamiltonian as an example.

```{code-cell} ipython3
from mqt.yaqs.core.data_structures.networks import MPO

L = 3
J = 1
g = 0.5

# Method 1: Pre-implemented Hamiltonians
H_0 = MPO.ising(L, J, g)

# Method 2: Same Ising Hamiltonian built via the generic Pauli interaction interface
H_0 = MPO.hamiltonian(
length=L,
two_body=[(-J, "Z", "Z")],
one_body=[(-g, "X")],
bc="open",
)

# Method 3: Explicit Pauli-string expansion
terms = []

# -J Σ Z_i Z_{i+1}
for i in range(L - 1):
terms.append((-J, f"Z{i} Z{i+1}"))

# -g Σ X_i
for i in range(L):
terms.append((-g, f"X{i}"))

H_0 = MPO()
H_0.init_ising(L, J, g)
H_0.from_pauli_sum(terms=terms, length=L)
```

Define the initial state
Expand Down
7 changes: 2 additions & 5 deletions docs/examples/transmon_emulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,13 @@ w_r = 4/(2*np.pi)
alpha = 0
g = 2/(2*np.pi)

H_0 = MPO()
H_0.init_coupled_transmon(
length=length,
H_0 = MPO.coupled_transmon(length=length,
qubit_dim=qubit_dim,
resonator_dim=resonator_dim,
qubit_freq=w_q,
resonator_freq=w_r,
anharmonicity=alpha,
coupling=g # T_swap = pi/2g
)
coupling=g # T_swap = pi/2g)
```

## Define the initial state
Expand Down
Loading
Loading