并行化支持完善
Some checks failed
Build wheels / build (ubuntu-latest, 3.11) (push) Has been cancelled
Build wheels / build (ubuntu-latest, 3.12) (push) Has been cancelled
Build wheels / build (ubuntu-latest, 3.13) (push) Has been cancelled
Tests / check (push) Has been cancelled
Tests / build (ubuntu-latest, 3.11) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.12) (push) Has been cancelled
Tests / build (ubuntu-latest, 3.13) (push) Has been cancelled

This commit is contained in:
2026-05-07 23:26:53 +08:00
parent fbae48eb3d
commit 2f5c863952
9 changed files with 195 additions and 93 deletions

View File

@@ -438,6 +438,7 @@ def _expectation_parallel(self, circuit, observable, method, opts):
search_workers = opts.get('search_workers', 48)
mpi_contract = opts.get('mpi_contract', False)
torch_threads = opts.get('torch_threads', None)
slicing_opts = opts.get('slicing_opts', None)
qc = self._qibo_circuit_to_quimb(
circuit,
@@ -469,7 +470,8 @@ def _expectation_parallel(self, circuit, observable, method, opts):
method=method,
total_repeats=max_repeats,
max_time=max_time,
n_workers=search_workers
n_workers=search_workers,
slicing_opts=slicing_opts,
)
if tree is None: