TwoLocal.snapshot_density_matrix

TwoLocal.snapshot_density_matrix(label, qubits=None)

Take a density matrix snapshot of simulator state.

Parameters
  • label (str) – a snapshot label to report the result

  • qubits (list or None) – the qubits to apply snapshot to. If None all qubits will be snapshot [Default: None].

Returns

with attached instruction.

Return type

QuantumCircuit

Raises

ExtensionError – if snapshot is invalid.