CQCL / qbm_benchmark_dataset

A simple python package to benchmark Quantum Boltzmann Machine models using Stochastic Gradient Descent. Based on the quantum many-body physics package `quimb`
Apache License 2.0
1 stars 0 forks source link

Can we make the geometrically local 2D Hamiltonian available on non-square lattices #19

Open erinaldiq opened 7 months ago

erinaldiq commented 7 months ago

At the moment the Hamiltonian with label 7 geometrically local 2D is only available on square lattices

        case 7:  # Geometrically local (2D lattice)
            assert (n**0.5).is_integer()
            sqrt_n = int(n**0.5)
            dims = (2,) * n
            for k in ["X", "Y", "Z"]:
                for i in range(n):
                    if i % sqrt_n != sqrt_n - 1:  # not the right end
                        h_ops.append(qu.ikron(qu.pauli(k), dims, [i, i + 1]))
                        h_names.append(f"{k}_{i}_{i+1}")
                    elif cyclic:
                        h_ops.append(qu.ikron(qu.pauli(k), dims, [i + 1 - sqrt_n, i]))
                        h_names.append(f"{k}_{i+1-sqrt_n}_{i}")
                    if i // sqrt_n != sqrt_n - 1:  # not the bottom end
                        h_ops.append(qu.ikron(qu.pauli(k), dims, [i, i + sqrt_n]))
                        h_names.append(f"{k}_{i}_{i+sqrt_n}")
                    elif cyclic:
                        h_ops.append(qu.ikron(qu.pauli(k), dims, [i % sqrt_n, i]))
                        h_names.append(f"{k}_{i % sqrt_n}_{i}")
                for i in range(n):
                    h_ops.append(qu.ikron(qu.pauli(k), dims, [i]))
                    h_names.append(f"{k}_{i}")

Is there a reason we can not use it on rectangular ones? If we do not make it rectangular, we can not run any test with this model on the target 2D Hubbard (because the minimum number of qubits then will be 16)

yutakikuchiQ commented 7 months ago

We could use the 2D geometrically local (GL) model on rectangular lattices. But, the 2D Hubbard model contains nonlocal and string-like operators after applying the Jordan-Wigner transformation. Therefore, I would still expect the model mismatch between the 2D GL model and the 2D Hubbard model.

erinaldiq commented 7 months ago

Good point. Concerning this issue, we can leave this 2D geometrically local Hamiltonian as it is, but we can add a better comment mentioning that it is only for square lattices. If not, we need a way to decide how to split the number of qubits into the two directions.