QiskitAerSimulationSettings¶
- class QiskitAerSimulationSettings(simulator, callback=None)[source][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 forAerSimulator
.Attributes
- Parameters:
simulator (AerSimulator)
callback (Callable[[QuantumCircuit, Result], None] | None)
- callback: Callable[[QuantumCircuit, Result], None] | None = None¶
This callable, if provided, is called with
(circuit, result)
as arguments immediately after each MPS simulation.
- simulator: AerSimulator¶
Aer simulator, must be configured with method=’matrix_product_state’. Stores configuration like
max_bond_dimension
,truncation_threshold
, etc.