qiskit-documentation/docs/api/qiskit/0.40/qiskit_aer.library.save_uni...

32 lines
1.0 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_unitary
description: API reference for qiskit_aer.library.save_unitary
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit_aer.library.save_unitary
---
# qiskit\_aer.library.save\_unitary
<Function id="qiskit_aer.library.save_unitary" isDedicatedPage={true} github="https://github.com/qiskit/qiskit-aer/tree/stable/0.11/qiskit_aer/library/save_instructions/save_unitary.py" signature="save_unitary(self, label='unitary', pershot=False)">
Save the current state of the unitary simulator.
**Parameters**
* **label** (*str*) the key for retrieving saved data from results.
* **pershot** (*bool*) if True save a list of unitaries for each shot of the simulation \[Default: False].
**Returns**
with attached instruction.
**Return type**
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
<Admonition title="Note" type="note">
This instruction is always defined across all qubits in a circuit.
</Admonition>
</Function>