forked from Qiskit/qiskit-aer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add API docs for QuantumCircuit methods (Qiskit#1753)
* Add new doc for circuit method apis * Remove QuantumCircuit description --------- Co-authored-by: Hiroshi Horii <[email protected]>
- Loading branch information
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,5 @@ Qiskit Aer API Reference | |
aer_pulse | ||
aer_utils | ||
aer_quantum_info | ||
circuit | ||
parallel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.. _circuit: | ||
|
||
Additional circuit methods | ||
========================== | ||
|
||
.. currentmodule:: qiskit.circuit | ||
|
||
On import, Aer adds several simulation-specific methods to :class:`~qiskit.circuit.QuantumCircuit` for convenience. | ||
These methods are not available until Aer is imported (``import qiskit_aer``). | ||
|
||
Setting a custom simulator state | ||
-------------------------------- | ||
|
||
The set instructions can also be added to circuits by using the | ||
following ``QuantumCircuit`` methods which are patched when importing Aer. | ||
|
||
.. automethod:: QuantumCircuit.set_density_matrix | ||
.. automethod:: QuantumCircuit.set_stabilizer | ||
.. automethod:: QuantumCircuit.set_unitary | ||
.. automethod:: QuantumCircuit.set_superop | ||
.. automethod:: QuantumCircuit.set_matrix_product_state | ||
|
||
Saving Simulator Data | ||
-------------------------------- | ||
|
||
The save instructions can also be added to circuits by using the | ||
following ``QuantumCircuit`` methods which are patched when importing Aer. | ||
|
||
.. note :: | ||
Each save method has a default label for accessing from the | ||
circuit result data, however duplicate labels in results will result | ||
in an exception being raised. If you use more than 1 instance of a | ||
specific save instruction you must set a custom label for the | ||
additional instructions. | ||
.. automethod:: QuantumCircuit.save_amplitudes | ||
.. automethod:: QuantumCircuit.save_amplitudes_squared | ||
.. automethod:: QuantumCircuit.save_clifford | ||
.. automethod:: QuantumCircuit.save_density_matrix | ||
.. automethod:: QuantumCircuit.save_expectation_value | ||
.. automethod:: QuantumCircuit.save_expectation_value_variance | ||
.. automethod:: QuantumCircuit.save_matrix_product_state | ||
.. automethod:: QuantumCircuit.save_probabilities | ||
.. automethod:: QuantumCircuit.save_probabilities_dict | ||
.. automethod:: QuantumCircuit.save_stabilizer | ||
.. automethod:: QuantumCircuit.save_state | ||
.. automethod:: QuantumCircuit.save_statevector | ||
.. automethod:: QuantumCircuit.save_statevector_dict | ||
.. automethod:: QuantumCircuit.save_superop | ||
.. automethod:: QuantumCircuit.save_unitary |