qiskit-documentation/docs/api/qiskit/0.31/qiskit.providers.models.Com...

72 lines
1.9 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: Command (v0.31)
description: API reference for qiskit.providers.models.Command in qiskit v0.31
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.providers.models.Command
---
# Command
<Class id="qiskit.providers.models.Command" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.18/qiskit/providers/models/pulsedefaults.py" signature="Command(name, qubits=None, sequence=None, **kwargs)" modifiers="class">
Bases: `object`
Class representing a Command.
### name
<Attribute id="qiskit.providers.models.Command.name">
Pulse command name.
</Attribute>
Initialize a Command object
**Parameters**
* **name** (*str*) The name of the command
* **qubits** The qubits for the command
* **sequence** ([*PulseQobjInstruction*](qiskit.qobj.PulseQobjInstruction "qiskit.qobj.PulseQobjInstruction")) The sequence for the Command
* **kwargs** Optional additional fields
## Methods
<span id="qiskit-providers-models-command-from-dict" />
### from\_dict
<Function id="qiskit.providers.models.Command.from_dict" signature="Command.from_dict(data)" modifiers="classmethod">
Create a new Command object from a dictionary.
**Parameters**
**data** (*dict*) A dictionary representing the `Command` to create. It will be in the same format as output by [`to_dict()`](qiskit.providers.models.Command#to_dict "qiskit.providers.models.Command.to_dict").
**Returns**
**The `Command` from the input**
dictionary.
**Return type**
qiskit.providers.model.Command
</Function>
<span id="qiskit-providers-models-command-to-dict" />
### to\_dict
<Function id="qiskit.providers.models.Command.to_dict" signature="Command.to_dict()">
Return a dictionary format representation of the Command.
**Returns**
The dictionary form of the Command.
**Return type**
dict
</Function>
</Class>