feat: setting bd when instantiating a quimb circuit

This commit is contained in:
MatteoRobbiati
2025-09-30 16:45:39 +02:00
parent f8439a5b92
commit a6d064c8f0

View File

@@ -1,4 +1,5 @@
from collections import Counter from collections import Counter
from typing import Optional
import numpy as np import numpy as np
import quimb as qu import quimb as qu
@@ -220,7 +221,9 @@ if not __name__ == "__main__":
The real part of the expectation value of the Hamiltonian on the given circuit state. The real part of the expectation value of the Hamiltonian on the given circuit state.
""" """
quimb_circuit = self._qibo_circuit_to_quimb( quimb_circuit = self._qibo_circuit_to_quimb(
circuit, quimb_circuit_type=qtn.Circuit circuit,
quimb_circuit_type=qtn.Circuit,
gate_opts={"max_bond": self.max_bond_dimension},
) )
expectation_value = 0.0 expectation_value = 0.0