qiskit-documentation/docs/api/qiskit/0.33/qiskit.providers.aer.librar...

29 lines
1.1 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: save_state
description: API reference for qiskit.providers.aer.library.save_state
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.providers.aer.library.save_state
---
# qiskit.providers.aer.library.save\_state
<Function id="qiskit.providers.aer.library.save_state" isDedicatedPage={true} github="https://github.com/qiskit/qiskit-aer/tree/stable/0.9/qiskit/providers/aer/library/save_instructions/save_state.py" signature="save_state(self, label=None, pershot=False, conditional=False)">
Save the current simulator quantum state.
**Parameters**
* **label** (*str or None*) Optional, the key for retrieving saved data from results. If None the key will be the state type of the simulator.
* **pershot** (*bool*) if True save a list of statevectors for each shot of the simulation \[Default: False].
* **conditional** (*bool*) if True save pershot data conditional on the current classical register values \[Default: False].
**Returns**
with attached instruction.
**Return type**
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
</Function>