# Get the gates after fusion optimization in Qiskit statevector simulator

I tried to obtain the gates after fusion in Qiskit-aer statevector simulator. What I can find now is that it provides a backend option saying fusion_verbose (bool): Output gates generated in fusion optimization into metadata [Default: False]. While I set it, I couldn't figure out a way to get the "metadata".

 simulator = aer.StatevectorSimulator(max_parallel_threads=128,fusion_verbose=True)
result = execute(circuit,simulator).result()
statevector = result.get_statevector(circuit)
config = simulator.configuration()
print(config.to_dict())


That information is not in the configuration. I am wondering how I can get those gates.

Another related question is that if I set the highest optimization level in the qiskit transpile function, do I get the same circuits as I was running it in the statevector simulator?

print(result.results[0].metadata['fusion'])

Note: fusion optimization is enabled only if your circuit contains at least 14 qubits. To lower this value, use fusion_threshold option.