33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
---
|
||
title: set_density_matrix (v0.29)
|
||
description: API reference for qiskit.providers.aer.library.set_density_matrix in qiskit v0.29
|
||
in_page_toc_min_heading_level: 1
|
||
python_api_type: function
|
||
python_api_name: qiskit.providers.aer.library.set_density_matrix
|
||
---
|
||
|
||
<span id="qiskit-providers-aer-library-set-density-matrix" />
|
||
|
||
# qiskit.providers.aer.library.set\_density\_matrix
|
||
|
||
<Function id="qiskit.providers.aer.library.set_density_matrix" isDedicatedPage={true} github="https://github.com/qiskit/qiskit-aer/tree/stable/0.8/qiskit/providers/aer/library/set_instructions/set_density_matrix.py" signature="set_density_matrix(self, state)">
|
||
Set the density matrix state of the simulator.
|
||
|
||
**Parameters**
|
||
|
||
**state** ([*DensityMatrix*](qiskit.quantum_info.DensityMatrix "qiskit.quantum_info.DensityMatrix")) – a density matrix.
|
||
|
||
**Returns**
|
||
|
||
with attached instruction.
|
||
|
||
**Return type**
|
||
|
||
[QuantumCircuit](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")
|
||
|
||
**Raises**
|
||
|
||
**ExtensionError** – If the density matrix is the incorrect size for the current circuit.
|
||
</Function>
|
||
|