QiskitAerSimulationSettings
class QiskitAerSimulationSettings(simulator, callback=None)[source]
Bases: TensorNetworkSimulationSettings
Qiskit Aer simulator settings.
Example usage:
from qiskit_aer import AerSimulator
from qiskit_addon_aqc_tensor.simulation.aer import QiskitAerSimulationSettings
simulator = AerSimulator(
method="matrix_product_state",
matrix_product_state_max_bond_dimension=200,
matrix_product_state_truncation_threshold=1e-6,
mps_log_data=True,
)
def my_simulation_callback(circuit, result):
print(f"Simulated circuit of depth {circuit.depth()}")
metadata = result.results[0].metadata
print(metadata["MPS_log_data"])
settings = QiskitAerSimulationSettings(simulator, my_simulation_callback)
See additional options for when using the matrix_product_state
simulation method in the documentation for AerSimulator
.
Attributes
Parameters
- simulator (AerSimulator)
- callback (Callable[[QuantumCircuit, Result], None] | None)
callback
Type: Callable[[QuantumCircuit, Result], None] | None
Default value: None
This callable, if provided, is called with (circuit, result)
as arguments immediately after each MPS simulation.
simulator
Type: AerSimulator
Aer simulator, must be configured with method=’matrix_product_state’. Stores configuration like max_bond_dimension
, truncation_threshold
, etc.
Was this page helpful?
Report a bug or request content on GitHub.