Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.

qiskit_aer.library.save_amplitudes

save_amplitudes(self, params, label='amplitudes', pershot=False, conditional=False)

GitHub

Save complex statevector amplitudes.

Parameters

  • params (List[int] or List[str]) – the basis states to return amplitudes for.
  • label (str) – the key for retrieving saved data from results.
  • pershot (bool) – if True save a list of amplitudes vectors for each shot of the simulation rather than the a single amplitude vector [Default: False].
  • conditional (bool) – if True save the amplitudes vector conditional on the current classical register values [Default: False].

Returns

with attached instruction.

Return type

QuantumCircuit

Raises

ExtensionError – if params is invalid for the specified number of qubits.

Was this page helpful?
Report a bug or request content on GitHub.