File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
qiskit_ibm_runtime/circuit/library Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 10
10
# copyright notice, and modified files need to carry a notice indicating
11
11
# that they have been altered from the originals.
12
12
13
+ """MidCircuitMeasure gate."""
14
+
13
15
from qiskit .circuit import Instruction
14
16
15
17
16
18
class MidCircuitMeasure (Instruction ):
17
- def __init__ (self , name = "measure_2" , label = None ):
19
+ """
20
+ This instruction implements an alternative 'named' measurement definition
21
+ (1 classical bit, 1 quantum bit), whose name can be used to map to a corresponding
22
+ mid-circuit measurement instruction implementation on hardware.
23
+ """
24
+
25
+ def __init__ (self , name : str = "measure_2" , label : str = None ) -> None :
18
26
if not name .startswith ("measure_" ):
19
27
raise ValueError (
20
28
"Invalid name for mid-circuit measure instruction."
Original file line number Diff line number Diff line change
1
+ The `qiskit-ibm-runtime ` package has been extended with two new modules: :mod: `.circuit ` and
2
+ :mod: `.circuit.library `. These modules are designed to mirror the structure of the
3
+ corresponding `qiskit ` SDK modules, while providing vendor-specific implementations of
4
+ circuit objects and instructions.
5
+
6
+ The first addition to this new circuit library is the :class: `.MidCircuitMeasure ` class.
7
+ This class enables the creation of instructions that follow the naming convention
8
+ `measure_<identifier> `, which are mapped to specific mid-circuit measurement
9
+ hardware instructions matching that pattern.
You can’t perform that action at this time.
0 commit comments