Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,246 changes: 567 additions & 679 deletions poetry.lock

Large diffs are not rendered by default.

22 changes: 4 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,19 @@ packages = [{ include = "boostvqe", from = "src" }]
python = ">=3.9,<3.13"
numpy = "^1.26.4"
numba = "^0.59.0"
qibo = "^0.2.12"
tensorflow = "^2.17.0"
matplotlib = "^3.9.2"
seaborn = "^0.13.2"
hyperopt = "^0.2.7"
qibojit = "^0.1.6"
qiboml = {git = "https://github.com/qiboteam/qiboml"}
qibo_dbqa = {git = "https://github.com/qiboteam/qibo-dbqa.git", rev = "package2"}
qibo = "^0.2.14"

[tool.poetry.group.dev.dependencies]
ipython = "^7.34"
pdbpp = "^0.10.3"

[tool.poetry.group.benchmark.dependencies]
pytest = "^8.0.0"
pytest-benchmark = { version = "^4.0.0", extras = ["histogram"] }

[tool.poe.tasks]
bench = "pytest benchmarks/"

[tool.pytest.ini_options]
testpaths = ['tests/', 'benchmarks/']
python_files = ['test_*.py', 'bench_*.py']
python_classes = ['Test*', 'Benchmark*']
python_functions = ['test_*', 'bench_*']
addopts = [
"--benchmark-warmup=on",
"--benchmark-warmup-iterations=100000",
"--benchmark-disable-gc",
"--benchmark-histogram=bench-hists/bench",
]
lint = "pylint src --errors-only"
lint-warnings = "pylint src --exit-zero"
9 changes: 2 additions & 7 deletions src/boostvqe/boost.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@
from typing import Optional

import numpy as np

# qibo's
from qibo import Circuit, gates, hamiltonians, set_backend
from qibo.models.dbi.double_bracket import (
DoubleBracketGeneratorType,
DoubleBracketIteration,
)
from qibo_dbqa.double_bracket import DoubleBracketGeneratorType, DoubleBracketIteration

# boostvqe's
from boostvqe.plotscripts import plot_gradients, plot_loss
Expand Down Expand Up @@ -146,6 +141,7 @@ def dbqa_vqe(
)
ham = getattr(Model, hamiltonian)(nqubits) # TODO : use only Model and not str
target_energy = np.real(np.min(np.asarray(ham.eigenvalues())))
# target_energy = 12

# construct circuit from parsed ansatz name
circ0 = circuit
Expand Down Expand Up @@ -235,7 +231,6 @@ def dbqa_vqe(
ham.backend.cast(np.matrix(ham.backend.to_numpy(operator)))
for operator in dbi_operators
]

old_circ_matrix = circ.unitary()
# Remove measurement gates
# Add the DBI operators and the unitary circuit matrix to the circuit
Expand Down
164 changes: 0 additions & 164 deletions src/boostvqe/compiling_XXZ.py

This file was deleted.

Empty file.
Loading