qiskit-documentation/docs/api/qiskit/0.24/qiskit.circuit.Clbit.mdx

68 lines
2.4 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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: Clbit
description: API reference for qiskit.circuit.Clbit
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit.circuit.Clbit
---
<span id="qiskit-circuit-clbit" />
# qiskit.circuit.Clbit
<Class id="qiskit.circuit.Clbit" isDedicatedPage={true} github="https://github.com/qiskit/qiskit/tree/stable/0.16/qiskit/circuit/classicalregister.py" signature="Clbit(register, index)" modifiers="class">
Implement a classical bit.
Creates a classical bit.
**Parameters**
* **register** ([*ClassicalRegister*](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister")) a classical register.
* **index** (*int*) the index to insert the bit
**Raises**
**CircuitError** if the provided register is not a valid [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister")
### \_\_init\_\_
<Function id="qiskit.circuit.Clbit.__init__" signature="__init__(register, index)">
Creates a classical bit.
**Parameters**
* **register** ([*ClassicalRegister*](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister")) a classical register.
* **index** (*int*) the index to insert the bit
**Raises**
**CircuitError** if the provided register is not a valid [`ClassicalRegister`](qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister")
</Function>
## Methods
| | |
| --------------------------------------------------------------------------------------------- | ------------------------ |
| [`__init__`](#qiskit.circuit.Clbit.__init__ "qiskit.circuit.Clbit.__init__")(register, index) | Creates a classical bit. |
## Attributes
| | |
| ---------------------------------------------------------------------------- | ------------------- |
| [`index`](#qiskit.circuit.Clbit.index "qiskit.circuit.Clbit.index") | Get bits index. |
| [`register`](#qiskit.circuit.Clbit.register "qiskit.circuit.Clbit.register") | Get bits register. |
### index
<Attribute id="qiskit.circuit.Clbit.index">
Get bits index.
</Attribute>
### register
<Attribute id="qiskit.circuit.Clbit.register">
Get bits register.
</Attribute>
</Class>