qiskit-documentation/docs/api/qiskit/0.29/qiskit.pulse.builder.acquir...

46 lines
1.6 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: acquire
description: API reference for qiskit.pulse.builder.acquire
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.pulse.builder.acquire
---
# qiskit.pulse.builder.acquire
<Function id="qiskit.pulse.builder.acquire" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.18/qiskit/pulse/builder.py" signature="acquire(duration, qubit_or_channel, register, **metadata)">
Acquire for a `duration` on a `channel` and store the result in a `register`.
Examples:
```python
from qiskit import pulse
d0 = pulse.MeasureChannel(0)
mem0 = pulse.MemorySlot(0)
with pulse.build() as pulse_prog:
pulse.acquire(100, d0, mem0)
# measurement metadata
kernel = pulse.configuration.Kernel('linear_discriminator')
pulse.acquire(100, d0, mem0, kernel=kernel)
```
<Admonition title="Note" type="note">
The type of data acquire will depend on the execution `meas_level`.
</Admonition>
**Parameters**
* **duration** (`int`) Duration to acquire data for
* **qubit\_or\_channel** (`Union`\[`int`, `AcquireChannel`]) Either the qubit to acquire data for or the specific `AcquireChannel` to acquire on.
* **register** (`NewType()`(`StorageLocation`, `Union`\[`MemorySlot`, `RegisterSlot`])) Location to store measured result.
* **metadata** (`Union`\[`Kernel`, `Discriminator`]) Additional metadata for measurement. See [`Acquire`](qiskit.pulse.instructions.Acquire "qiskit.pulse.instructions.Acquire") for more information.
**Raises**
**exceptions.PulseError** If the register type is not supported.
</Function>