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

33 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: set_statevector (v0.29)
description: API reference for qiskit.providers.aer.library.set_statevector in qiskit v0.29
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.providers.aer.library.set_statevector
---
<span id="qiskit-providers-aer-library-set-statevector" />
# qiskit.providers.aer.library.set\_statevector
<Function id="qiskit.providers.aer.library.set_statevector" isDedicatedPage={true} github="https://github.com/qiskit/qiskit-aer/tree/stable/0.8/qiskit/providers/aer/library/set_instructions/set_statevector.py" signature="set_statevector(self, state)">
Set the statevector state of the simulator.
**Parameters**
**state** ([*Statevector*](qiskit.quantum_info.Statevector "qiskit.quantum_info.Statevector")) A state matrix.
**Returns**
with attached instruction.
**Return type**
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
**Raises**
**ExtensionError** If the state is the incorrect size for the current circuit.
</Function>