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

66 lines
2.4 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 (v1.2)
description: API reference for qiskit.providers.models.Command in qiskit v1.2
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/1.2/qiskit/providers/models/pulsedefaults.py#L95-L161" signature="qiskit.providers.models.Command(name, qubits=None, sequence=None, **kwargs)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")
Class representing a Command.
### name
<Attribute id="qiskit.providers.models.Command.name">
Pulse command name.
</Attribute>
Initialize a Command object
**Parameters**
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) 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
### from\_dict
<Function id="qiskit.providers.models.Command.from_dict" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/models/pulsedefaults.py#L141-L161" signature="from_dict(data)" modifiers="classmethod">
Create a new Command object from a dictionary.
**Parameters**
**data** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) 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**
[Command](#qiskit.providers.models.Command "qiskit.providers.models.Command")
</Function>
### to\_dict
<Function id="qiskit.providers.models.Command.to_dict" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/providers/models/pulsedefaults.py#L127-L139" signature="to_dict()">
Return a dictionary format representation of the Command.
**Returns**
The dictionary form of the Command.
**Return type**
[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")
</Function>
</Class>