qiskit-documentation/docs/api/qiskit/0.43/qiskit.pulse.builder.sample...

29 lines
1.0 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: samples_to_seconds
description: API reference for qiskit.pulse.builder.samples_to_seconds
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.pulse.builder.samples_to_seconds
---
<span id="qiskit-pulse-builder-samples-to-seconds" />
# qiskit.pulse.builder.samples\_to\_seconds
<Function id="qiskit.pulse.builder.samples_to_seconds" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.24/qiskit/pulse/builder.py" signature="samples_to_seconds(samples)">
Obtain the time in seconds that will elapse for the input number of samples on the active backend.
**Parameters**
**samples** (*int |* [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v1.25)")) Number of samples to convert to time in seconds.
**Returns**
The time that elapses in `samples`.
**Return type**
float | [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v1.25)")
</Function>