66 lines
2.3 KiB
Plaintext
66 lines
2.3 KiB
Plaintext
---
|
||
title: Command
|
||
description: API reference for qiskit.providers.models.Command
|
||
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.1/qiskit/providers/models/pulsedefaults.py#L94-L160" 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.12)")
|
||
|
||
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.12)")) – 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.1/qiskit/providers/models/pulsedefaults.py#L140-L160" 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.12)")) – 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.1/qiskit/providers/models/pulsedefaults.py#L126-L138" 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.12)")
|
||
</Function>
|
||
</Class>
|
||
|