Sync fix for bad GitHub links for decorators (#2093)

Syncs the fix for https://github.com/Qiskit/documentation/issues/2060.
This commit is contained in:
Eric Arellano 2024-10-08 05:25:44 -04:00 committed by GitHub
parent ac80ea3b60
commit 71dfb787a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1018 changed files with 8016 additions and 7589 deletions

View File

@ -258,7 +258,7 @@ python_api_name: qiskit_ibm_runtime.RuntimeJob
### interim\_results
<Function id="qiskit_ibm_runtime.RuntimeJob.interim_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/main/qiskit_ibm_runtime/utils/deprecation.py#L399-L418" signature="interim_results(decoder=None)">
<Function id="qiskit_ibm_runtime.RuntimeJob.interim_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/main/qiskit_ibm_runtime/runtime_job.py#L399-L418" signature="interim_results(decoder=None)">
Return the interim results of the job.
**Parameters**
@ -443,7 +443,7 @@ python_api_name: qiskit_ibm_runtime.RuntimeJob
### stream\_results
<Function id="qiskit_ibm_runtime.RuntimeJob.stream_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/main/qiskit_ibm_runtime/utils/deprecation.py#L368-L397" signature="stream_results(callback, decoder=None)">
<Function id="qiskit_ibm_runtime.RuntimeJob.stream_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/main/qiskit_ibm_runtime/runtime_job.py#L368-L397" signature="stream_results(callback, decoder=None)">
Start streaming job results.
**Parameters**

View File

@ -236,7 +236,7 @@ python_api_name: qiskit_ibm_runtime.RuntimeJobV2
### interim\_results
<Function id="qiskit_ibm_runtime.RuntimeJobV2.interim_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/main/qiskit_ibm_runtime/utils/deprecation.py#L306-L325" signature="interim_results(decoder=None)">
<Function id="qiskit_ibm_runtime.RuntimeJobV2.interim_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/main/qiskit_ibm_runtime/runtime_job_v2.py#L306-L325" signature="interim_results(decoder=None)">
Return the interim results of the job.
**Parameters**
@ -379,7 +379,7 @@ python_api_name: qiskit_ibm_runtime.RuntimeJobV2
### stream\_results
<Function id="qiskit_ibm_runtime.RuntimeJobV2.stream_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/main/qiskit_ibm_runtime/utils/deprecation.py#L275-L304" signature="stream_results(callback, decoder=None)">
<Function id="qiskit_ibm_runtime.RuntimeJobV2.stream_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/main/qiskit_ibm_runtime/runtime_job_v2.py#L275-L304" signature="stream_results(callback, decoder=None)">
Start streaming job results.
**Parameters**

View File

@ -258,7 +258,7 @@ python_api_name: qiskit_ibm_runtime.RuntimeJob
### interim\_results
<Function id="qiskit_ibm_runtime.RuntimeJob.interim_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.30/qiskit_ibm_runtime/utils/deprecation.py#L399-L418" signature="interim_results(decoder=None)">
<Function id="qiskit_ibm_runtime.RuntimeJob.interim_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.30/qiskit_ibm_runtime/runtime_job.py#L399-L418" signature="interim_results(decoder=None)">
Return the interim results of the job.
**Parameters**
@ -443,7 +443,7 @@ python_api_name: qiskit_ibm_runtime.RuntimeJob
### stream\_results
<Function id="qiskit_ibm_runtime.RuntimeJob.stream_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.30/qiskit_ibm_runtime/utils/deprecation.py#L368-L397" signature="stream_results(callback, decoder=None)">
<Function id="qiskit_ibm_runtime.RuntimeJob.stream_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.30/qiskit_ibm_runtime/runtime_job.py#L368-L397" signature="stream_results(callback, decoder=None)">
Start streaming job results.
**Parameters**

View File

@ -236,7 +236,7 @@ python_api_name: qiskit_ibm_runtime.RuntimeJobV2
### interim\_results
<Function id="qiskit_ibm_runtime.RuntimeJobV2.interim_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.30/qiskit_ibm_runtime/utils/deprecation.py#L306-L325" signature="interim_results(decoder=None)">
<Function id="qiskit_ibm_runtime.RuntimeJobV2.interim_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.30/qiskit_ibm_runtime/runtime_job_v2.py#L306-L325" signature="interim_results(decoder=None)">
Return the interim results of the job.
**Parameters**
@ -379,7 +379,7 @@ python_api_name: qiskit_ibm_runtime.RuntimeJobV2
### stream\_results
<Function id="qiskit_ibm_runtime.RuntimeJobV2.stream_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.30/qiskit_ibm_runtime/utils/deprecation.py#L275-L304" signature="stream_results(callback, decoder=None)">
<Function id="qiskit_ibm_runtime.RuntimeJobV2.stream_results" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.30/qiskit_ibm_runtime/runtime_job_v2.py#L275-L304" signature="stream_results(callback, decoder=None)">
Start streaming job results.
**Parameters**

View File

@ -37,7 +37,7 @@ python_api_name: qiskit_ibm_runtime.fake_provider.FakeProviderForBackendV2
### get\_backend
<Function id="qiskit_ibm_runtime.fake_provider.FakeProviderForBackendV2.get_backend" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.30/qiskit_ibm_runtime/utils/deprecation.py#L89-L92" signature="get_backend(name=None, **kwargs)">
<Function id="qiskit_ibm_runtime.fake_provider.FakeProviderForBackendV2.get_backend" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.30/qiskit_ibm_runtime/fake_provider/fake_provider.py#L89-L92" signature="get_backend(name=None, **kwargs)">
Return a single backend matching the specified filtering.
**Return type**

View File

@ -20,7 +20,7 @@ python_api_name: qiskit.assembler
### assemble\_circuits
<Function id="qiskit.assembler.assemble_circuits" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/utils/deprecation.py#L408-L451" signature="qiskit.assembler.assemble_circuits(circuits, run_config, qobj_id, qobj_header)">
<Function id="qiskit.assembler.assemble_circuits" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/assembler/assemble_circuits.py#L408-L451" signature="qiskit.assembler.assemble_circuits(circuits, run_config, qobj_id, qobj_header)">
Assembles a list of circuits into a qobj that can be run on the backend.
<Admonition title="Deprecated since version 1.2" type="danger">
@ -29,9 +29,9 @@ python_api_name: qiskit.assembler
**Parameters**
* **circuits** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) circuit(s) to assemble
* **circuits** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) circuit(s) to assemble
* **run\_config** ([*RunConfig*](qiskit.assembler.RunConfig "qiskit.assembler.run_config.RunConfig")) configuration of the runtime environment
* **qobj\_id** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) identifier for the generated qobj
* **qobj\_id** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) identifier for the generated qobj
* **qobj\_header** ([*QobjHeader*](qiskit.qobj.QobjHeader "qiskit.qobj.common.QobjHeader")) header to pass to the results
**Returns**
@ -70,8 +70,8 @@ python_api_name: qiskit.assembler
**Parameters**
* **schedules** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") *|*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](pulse#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction") *|*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*,* [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](pulse#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")*]]*) Schedules to assemble.
* **qobj\_id** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Identifier for the generated qobj.
* **schedules** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") *|*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](pulse#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction") *|*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*,* [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](pulse#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")*]]*) Schedules to assemble.
* **qobj\_id** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Identifier for the generated qobj.
* **qobj\_header** ([*QobjHeader*](qiskit.qobj.QobjHeader "qiskit.qobj.common.QobjHeader")) Header to pass to the results.
* **run\_config** ([*RunConfig*](qiskit.assembler.RunConfig "qiskit.assembler.run_config.RunConfig")) Configuration of the runtime environment.
@ -127,7 +127,7 @@ python_api_name: qiskit.assembler
### disassemble
<Function id="qiskit.assembler.disassemble" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/utils/deprecation.py#L41-L92" signature="qiskit.assembler.disassemble(qobj)">
<Function id="qiskit.assembler.disassemble" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/assembler/disassemble.py#L41-L92" signature="qiskit.assembler.disassemble(qobj)">
Disassemble a qobj and return the circuits or pulse schedules, run\_config, and user header.
<Admonition title="Note" type="note">

View File

@ -303,9 +303,9 @@ A collection bits of the same type can be encapsulated in a register of the matc
**Parameters**
* **size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Optional. The number of bits to include in the register.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Optional. The name of the register. If not provided, a unique name will be auto-generated from the register type.
* **bits** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*Bit*](#qiskit.circuit.Bit "qiskit.circuit.Bit")*]*) Optional. A list of Bit() instances to be used to populate the register.
* **size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Optional. The number of bits to include in the register.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Optional. The name of the register. If not provided, a unique name will be auto-generated from the register type.
* **bits** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*Bit*](#qiskit.circuit.Bit "qiskit.circuit.Bit")*]*) Optional. A list of Bit() instances to be used to populate the register.
**Raises**
@ -420,7 +420,7 @@ Subclassing [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"), Qiskit has a sp
| -------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate")(name, num\_qubits, params\[, ...]) | Controlled unitary gate. |
Each of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"), [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") and [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") has a corresponding singleton type, built using the machinery described in [`qiskit.circuit.singleton`](circuit_singleton#module-qiskit.circuit.singleton "qiskit.circuit.singleton"). The module-level documentation contains full details, along with descriptions of [`SingletonInstruction`](circuit_singleton#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction"), [`SingletonGate`](circuit_singleton#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") and [`SingletonControlledGate`](circuit_singleton#qiskit.circuit.singleton.SingletonControlledGate "qiskit.circuit.singleton.SingletonControlledGate"). From a users perspective, little changes based on whether the base class is a singleton or not; the intention always remains that you should call [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable") first if you need to get a safe-to-mutate owned copy of an instruction (you cannot assume that an arbitrary instruction is mutable), and while direct [`type`](https://docs.python.org/3/library/functions.html#type "(in Python v3.12)") inspection is discouraged, if you do need it, the reliable way to find the “base” type of a potentially singleton instruction is to use [`base_class`](qiskit.circuit.Instruction#base_class "qiskit.circuit.Instruction.base_class").
Each of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"), [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") and [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") has a corresponding singleton type, built using the machinery described in [`qiskit.circuit.singleton`](circuit_singleton#module-qiskit.circuit.singleton "qiskit.circuit.singleton"). The module-level documentation contains full details, along with descriptions of [`SingletonInstruction`](circuit_singleton#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction"), [`SingletonGate`](circuit_singleton#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") and [`SingletonControlledGate`](circuit_singleton#qiskit.circuit.singleton.SingletonControlledGate "qiskit.circuit.singleton.SingletonControlledGate"). From a users perspective, little changes based on whether the base class is a singleton or not; the intention always remains that you should call [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable") first if you need to get a safe-to-mutate owned copy of an instruction (you cannot assume that an arbitrary instruction is mutable), and while direct [`type`](https://docs.python.org/3/library/functions.html#type "(in Python v3.13)") inspection is discouraged, if you do need it, the reliable way to find the “base” type of a potentially singleton instruction is to use [`base_class`](qiskit.circuit.Instruction#base_class "qiskit.circuit.Instruction.base_class").
[`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") uses the same mechanisms as [subclassing gates](#circuit-custom-gates) to define a fixed, lazy synthesis for itself. This is naturally not hardware-aware, and harder to hook into the synthesis routines of the compiler, but works better as a concrete [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") that could potentially be run natively on hardware. For cases where synthesis and abstract optimization is more important, Qiskit offers a composable class called [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation"), which tracks “gate modifiers” (of which [`ControlModifier`](#qiskit.circuit.ControlModifier "qiskit.circuit.ControlModifier") is one) to apply to the inner [`base_op`](qiskit.circuit.AnnotatedOperation#base_op "qiskit.circuit.AnnotatedOperation.base_op").
@ -521,8 +521,8 @@ it is forbidden for the optimizer to cancel out the two $X$ instructions.
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) the number of qubits for the barrier.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) the optional label of this barrier.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the number of qubits for the barrier.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) the optional label of this barrier.
</Class>
The [`Store`](#qiskit.circuit.Store "qiskit.circuit.Store") instruction is particularly special, in that it allows writing the result of a [real-time classical computation expression](#circuit-repr-real-time-classical) (an [`expr.Expr`](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) in a local classical variable (a [`expr.Var`](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")). It takes *neither* [`Qubit`](#qiskit.circuit.Qubit "qiskit.circuit.Qubit") nor [`Clbit`](#qiskit.circuit.Clbit "qiskit.circuit.Clbit") operands, but has an explicit [`lvalue`](#qiskit.circuit.Store.lvalue "qiskit.circuit.Store.lvalue") and [`rvalue`](#qiskit.circuit.Store.rvalue "qiskit.circuit.Store.rvalue").
@ -706,7 +706,7 @@ Subclasses of [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") will also like
<Function id="object.__array__" signature="object.__array__(dtype=None, copy=None)">
Return a Numpy array representing the gate. This can use the gates [`params`](qiskit.circuit.Instruction#params "qiskit.circuit.Instruction.params") field, and may assume that these are numeric values (assuming the subclass expects that) and not [compile-time parameters](#circuit-compile-time-parameters).
For greatest efficiency, the returned array should default to a dtype of [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)").
For greatest efficiency, the returned array should default to a dtype of [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)").
</Function>
If your custom subclass has natural representations of its controlled or inverse forms, you may also wish to override the [`inverse()`](qiskit.circuit.Instruction#inverse "qiskit.circuit.Instruction.inverse") and [`control()`](qiskit.circuit.Gate#control "qiskit.circuit.Gate.control") methods.
@ -845,14 +845,14 @@ Qiskit also defines a shared global-state object, [`SessionEquivalenceLibrary`](
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of quantum wires
* **depth** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) layers of operations (i.e. critical path length)
* **max\_operands** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) maximum qubit operands of each gate (between 1 and 4)
* **measure** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if True, measure all qubits at the end
* **conditional** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if True, insert middle measurements and conditionals
* **reset** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if True, insert middle resets
* **seed** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) sets random seed (optional)
* **num\_operand\_distribution** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")) a distribution of gates that specifies the ratio
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of quantum wires
* **depth** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) layers of operations (i.e. critical path length)
* **max\_operands** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) maximum qubit operands of each gate (between 1 and 4)
* **measure** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if True, measure all qubits at the end
* **conditional** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if True, insert middle measurements and conditionals
* **reset** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if True, insert middle resets
* **seed** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) sets random seed (optional)
* **num\_operand\_distribution** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) a distribution of gates that specifies the ratio
* **1-qubit** (*of*)
* **2-qubit**
* **3-qubit**
@ -892,10 +892,10 @@ Qiskit also defines a shared global-state object, [`SessionEquivalenceLibrary`](
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of quantum wires.
* **num\_gates** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of gates in the circuit.
* **gates** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]*) optional list of Clifford gate names to randomly sample from. If `"all"` (default), use all Clifford gates in the standard library.
* **seed** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| np.random.Generator*) sets random seed/generator (optional).
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of quantum wires.
* **num\_gates** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of gates in the circuit.
* **gates** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]*) optional list of Clifford gate names to randomly sample from. If `"all"` (default), use all Clifford gates in the standard library.
* **seed** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| np.random.Generator*) sets random seed/generator (optional).
**Returns**

View File

@ -70,7 +70,7 @@ The base for dynamic variables is the [`Var`](#qiskit.circuit.classical.expr.Var
##### name
<Attribute id="qiskit.circuit.classical.expr.Var.name" attributeTypeHint="str | None">
The name of the variable. This is required to exist if the backing [`var`](#qiskit.circuit.classical.expr.Var.var "qiskit.circuit.classical.expr.Var.var") attribute is a [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.12)"), i.e. if it is a new-style variable, and must be `None` if it is an old-style variable.
The name of the variable. This is required to exist if the backing [`var`](#qiskit.circuit.classical.expr.Var.var "qiskit.circuit.classical.expr.Var.var") attribute is a [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.13)"), i.e. if it is a new-style variable, and must be `None` if it is an old-style variable.
</Attribute>
##### new
@ -80,13 +80,13 @@ The base for dynamic variables is the [`Var`](#qiskit.circuit.classical.expr.Var
**Return type**
[*Self*](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.12)")
[*Self*](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.13)")
</Function>
##### var
<Attribute id="qiskit.circuit.classical.expr.Var.var" attributeTypeHint="qiskit.circuit.Clbit | qiskit.circuit.ClassicalRegister | uuid.UUID">
A reference to the backing data storage of the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") instance. When lifting old-style [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") instances into a [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var"), this is exactly the [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister"). If the variable is a new-style classical variable (one that owns its own storage separate to the old [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit")/[`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") model), this field will be a [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.12)") to uniquely identify it.
A reference to the backing data storage of the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") instance. When lifting old-style [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") instances into a [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var"), this is exactly the [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister"). If the variable is a new-style classical variable (one that owns its own storage separate to the old [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit")/[`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") model), this field will be a [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.13)") to uniquely identify it.
</Attribute>
</Class>
@ -807,7 +807,7 @@ For the convenience of simple visitors that only need to inspect the variables i
**Return type**
[*Iterator*](https://docs.python.org/3/library/typing.html#typing.Iterator "(in Python v3.12)")\[[*Var*](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var")]
[*Iterator*](https://docs.python.org/3/library/typing.html#typing.Iterator "(in Python v3.13)")\[[*Var*](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var")]
</Function>
Two expressions can be compared for direct structural equality by using the built-in Python `==` operator. In general, though, one might want to compare two expressions slightly more semantically, allowing that the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") nodes inside them are bound to different memory-location descriptions between two different circuits. In this case, one can use [`structurally_equivalent()`](#qiskit.circuit.classical.expr.structurally_equivalent "qiskit.circuit.classical.expr.structurally_equivalent") with two suitable “key” functions to do the comparison.
@ -825,12 +825,12 @@ Two expressions can be compared for direct structural equality by using the buil
* **left** ([*expr.Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr")) one of the [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") nodes.
* **right** ([*expr.Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr")) the other [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") node.
* **left\_var\_key** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.12)")*\[\[*[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")*] | None*) a callable whose output should be used when comparing [`Var.var`](#qiskit.circuit.classical.expr.Var.var "qiskit.circuit.classical.expr.Var.var") attributes. If this argument is `None` or its output is `None` for a given variable in `left`, the variable will be used verbatim.
* **right\_var\_key** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.12)")*\[\[*[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")*] | None*) same as `left_var_key`, but used on the variables in `right` instead.
* **left\_var\_key** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.13)")*\[\[*[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)")*] | None*) a callable whose output should be used when comparing [`Var.var`](#qiskit.circuit.classical.expr.Var.var "qiskit.circuit.classical.expr.Var.var") attributes. If this argument is `None` or its output is `None` for a given variable in `left`, the variable will be used verbatim.
* **right\_var\_key** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.13)")*\[\[*[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)")*] | None*) same as `left_var_key`, but used on the variables in `right` instead.
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
**Examples**
@ -900,7 +900,7 @@ Some expressions have associated memory locations, and others may be purely temp
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
<span id="module-qiskit.circuit.classical.types" />
@ -1020,7 +1020,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
#### is\_supertype
@ -1049,7 +1049,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
#### greater
@ -1063,7 +1063,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis
**Raises**
[**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.12)") if there is no ordering relation between the two types.
[**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.13)") if there is no ordering relation between the two types.
**Return type**
@ -1082,7 +1082,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis
### Casting between types
It is common to need to cast values of one type to another type. The casting rules for this are embedded into the [`types`](https://docs.python.org/3/library/types.html#module-types "(in Python v3.12)") module. You can query the casting kinds using [`cast_kind()`](#qiskit.circuit.classical.types.cast_kind "qiskit.circuit.classical.types.cast_kind"):
It is common to need to cast values of one type to another type. The casting rules for this are embedded into the [`types`](https://docs.python.org/3/library/types.html#module-types "(in Python v3.13)") module. You can query the casting kinds using [`cast_kind()`](#qiskit.circuit.classical.types.cast_kind "qiskit.circuit.classical.types.cast_kind"):
#### cast\_kind

View File

@ -20,7 +20,7 @@ The machinery in this module is for defining subclasses of [`Instruction`](qiski
* There is a regular class called `XGate`, which derives from [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate").
* Doing something like `XGate(label="my_gate")` produces an object whose type is exactly `XGate`, and all the mutability works completely as expected; all the methods resolve to exactly those defined by [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate"), [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"), or parents.
* Doing `XGate()` produces a singleton object whose type is a synthetic `_SingletonXGate` class, which derives [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") but overrides [`__setattr__()`](https://docs.python.org/3/reference/datamodel.html#object.__setattr__ "(in Python v3.12)") to make itself immutable. The object itself has precisely the same instance attributes as `XGate()` would have if there was no singleton handling. This object will return itself under [`copy()`](https://docs.python.org/3/library/copy.html#copy.copy "(in Python v3.12)"), [`deepcopy()`](https://docs.python.org/3/library/copy.html#copy.deepcopy "(in Python v3.12)") and roundtrip through [`pickle`](https://docs.python.org/3/library/pickle.html#module-pickle "(in Python v3.12)").
* Doing `XGate()` produces a singleton object whose type is a synthetic `_SingletonXGate` class, which derives [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") but overrides [`__setattr__()`](https://docs.python.org/3/reference/datamodel.html#object.__setattr__ "(in Python v3.13)") to make itself immutable. The object itself has precisely the same instance attributes as `XGate()` would have if there was no singleton handling. This object will return itself under [`copy()`](https://docs.python.org/3/library/copy.html#copy.copy "(in Python v3.13)"), [`deepcopy()`](https://docs.python.org/3/library/copy.html#copy.deepcopy "(in Python v3.13)") and roundtrip through [`pickle`](https://docs.python.org/3/library/pickle.html#module-pickle "(in Python v3.13)").
The same can be true for, for example, [`Measure`](circuit#qiskit.circuit.Measure "qiskit.circuit.Measure"), except that its a subclass of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") only, and not [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate").
@ -68,7 +68,7 @@ The public classes correspond to the standard classes [`Instruction`](qiskit.cir
This class is very similar to [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction"), except implies unitary [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") semantics as well. The same caveats around setting attributes in that class apply here as well.
</Class>
When inheriting from one of these classes, the produced class will have an eagerly created singleton instance that will be returned whenever the class is constructed with arguments that have been defined to be singletons. Typically this will be the defaults. These instances are immutable; attempts to modify their properties will raise [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.12)").
When inheriting from one of these classes, the produced class will have an eagerly created singleton instance that will be returned whenever the class is constructed with arguments that have been defined to be singletons. Typically this will be the defaults. These instances are immutable; attempts to modify their properties will raise [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.13)").
*All* subclasses of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") have a [`mutable`](qiskit.circuit.Instruction#mutable "qiskit.circuit.Instruction.mutable") property. For most instructions this is `True`, while for the singleton instances it is `False`. One can use the [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable") method to get a version of the instruction that is owned and safe to mutate.
@ -78,11 +78,11 @@ The singleton instances are not exact instances of their base class; they are sp
type(XGate()) is not XGate
```
You should not rely on [`type`](https://docs.python.org/3/library/functions.html#type "(in Python v3.12)") having an exact value; use [`isinstance()`](https://docs.python.org/3/library/functions.html#isinstance "(in Python v3.12)") instead for type checking. If you need to reliably retrieve the base class from an [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"), see the [`Instruction.base_class`](qiskit.circuit.Instruction#base_class "qiskit.circuit.Instruction.base_class") attribute; singleton instances set this correctly. For most cases in using Qiskit, [`Instruction.name`](qiskit.circuit.Instruction#name "qiskit.circuit.Instruction.name") is a more suitable determiner of what an instruction “means” in a circuit.
You should not rely on [`type`](https://docs.python.org/3/library/functions.html#type "(in Python v3.13)") having an exact value; use [`isinstance()`](https://docs.python.org/3/library/functions.html#isinstance "(in Python v3.13)") instead for type checking. If you need to reliably retrieve the base class from an [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"), see the [`Instruction.base_class`](qiskit.circuit.Instruction#base_class "qiskit.circuit.Instruction.base_class") attribute; singleton instances set this correctly. For most cases in using Qiskit, [`Instruction.name`](qiskit.circuit.Instruction#name "qiskit.circuit.Instruction.name") is a more suitable determiner of what an instruction “means” in a circuit.
### Deriving new singletons
The simplest example of deriving a new singleton instruction is simply to inherit from the correct base and supply an [`__init__()`](https://docs.python.org/3/reference/datamodel.html#object.__init__ "(in Python v3.12)") method that has immutable defaults for any arguments. For example:
The simplest example of deriving a new singleton instruction is simply to inherit from the correct base and supply an [`__init__()`](https://docs.python.org/3/reference/datamodel.html#object.__init__ "(in Python v3.13)") method that has immutable defaults for any arguments. For example:
```python
from qiskit.circuit.singleton import SingletonInstruction
@ -177,7 +177,7 @@ The case of the class being instantiated with zero arguments is handled speciall
This section is primarily developer documentation for the code; none of the machinery described here is public, and it is not safe to inherit from any of it directly.
</Admonition>
There are several moving parts to tackle here. The behavior of having `XGate()` return some singleton object that is an (inexact) instance of [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") but *without* calling `__init__` requires us to override [`type.__call__`](https://docs.python.org/3/library/functions.html#type "(in Python v3.12)"). This means that [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") must have a metaclass that defines `__call__` to return the singleton instance.
There are several moving parts to tackle here. The behavior of having `XGate()` return some singleton object that is an (inexact) instance of [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") but *without* calling `__init__` requires us to override [`type.__call__`](https://docs.python.org/3/library/functions.html#type "(in Python v3.13)"). This means that [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") must have a metaclass that defines `__call__` to return the singleton instance.
Next, we need to ensure that there *is* a singleton instance for `XGate()` to return. This can be done dynamically on each call (i.e. check if the instance exists and create it if not), but since we also want that instance to be very special, its easier to hook in and create it during the definition of the `XGate` type object. This also has the advantage that we do not need to make the singleton object pickleable; we only need to specify where to retrieve it from during the unpickle, because the creation of the base type object will recreate the singleton.
@ -198,9 +198,9 @@ We could do this entirely within the metaclass machinery, but that would require
class XGate(Gate, metaclass=_SingletonMeta, overrides=_SingletonGateOverrides): ...
```
which is super inconvenient (or wed have to have `_SingletonMeta` do a bunch of fragile introspection). Instead, we use the [`abc.ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.12)")/[`abc.ABCMeta`](https://docs.python.org/3/library/abc.html#abc.ABCMeta "(in Python v3.12)") pattern of defining a concrete middle class ([`SingletonGate`](#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") in the [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") case) that sets the metaclass, selects the overrides to be applied, and has an [`__init_subclass__()`](https://docs.python.org/3/reference/datamodel.html#object.__init_subclass__ "(in Python v3.12)") that applies the singleton-subclass-creation steps above. The overrides are in separate classes so that *mutable* [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") instances do not have them in their own method-resolution orders; doing this is easier to implement, but requires all the setters and checkers to dance around at runtime trying to validate whether mutating the instance is allowed.
which is super inconvenient (or wed have to have `_SingletonMeta` do a bunch of fragile introspection). Instead, we use the [`abc.ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.13)")/[`abc.ABCMeta`](https://docs.python.org/3/library/abc.html#abc.ABCMeta "(in Python v3.13)") pattern of defining a concrete middle class ([`SingletonGate`](#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") in the [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") case) that sets the metaclass, selects the overrides to be applied, and has an [`__init_subclass__()`](https://docs.python.org/3/reference/datamodel.html#object.__init_subclass__ "(in Python v3.13)") that applies the singleton-subclass-creation steps above. The overrides are in separate classes so that *mutable* [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") instances do not have them in their own method-resolution orders; doing this is easier to implement, but requires all the setters and checkers to dance around at runtime trying to validate whether mutating the instance is allowed.
Finally, to actually build all this machinery up, the base is `_SingletonMeta`, which is a metaclass compatible with any metaclass of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"). This defines the [`__call__()`](https://docs.python.org/3/reference/datamodel.html#object.__call__ "(in Python v3.12)") machinery that overrides [`type.__call__`](https://docs.python.org/3/library/functions.html#type "(in Python v3.12)") to return the singleton instances. The other component of it is its [`__new__()`](https://docs.python.org/3/reference/datamodel.html#object.__new__ "(in Python v3.12)"), which is called (non-trivially) during the creation of [`SingletonGate`](#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") and [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") with its `overrides` keyword argument set to define the `__init_subclass__` of those classes with the above properties. We use the metaclass to add this method dynamically, because the [`__init_subclass__()`](https://docs.python.org/3/reference/datamodel.html#object.__init_subclass__ "(in Python v3.12)") machinery wants to be abstract, closing over the `overrides` and the base class, but still able to call [`super`](https://docs.python.org/3/library/functions.html#super "(in Python v3.12)"). Its more convenient to do this dynamically, closing over the desired class variable and using the two-argument form of [`super`](https://docs.python.org/3/library/functions.html#super "(in Python v3.12)"), since the zero-argument form does magic introspection based on where its containing function was defined.
Finally, to actually build all this machinery up, the base is `_SingletonMeta`, which is a metaclass compatible with any metaclass of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"). This defines the [`__call__()`](https://docs.python.org/3/reference/datamodel.html#object.__call__ "(in Python v3.13)") machinery that overrides [`type.__call__`](https://docs.python.org/3/library/functions.html#type "(in Python v3.13)") to return the singleton instances. The other component of it is its [`__new__()`](https://docs.python.org/3/reference/datamodel.html#object.__new__ "(in Python v3.13)"), which is called (non-trivially) during the creation of [`SingletonGate`](#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") and [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") with its `overrides` keyword argument set to define the `__init_subclass__` of those classes with the above properties. We use the metaclass to add this method dynamically, because the [`__init_subclass__()`](https://docs.python.org/3/reference/datamodel.html#object.__init_subclass__ "(in Python v3.13)") machinery wants to be abstract, closing over the `overrides` and the base class, but still able to call [`super`](https://docs.python.org/3/library/functions.html#super "(in Python v3.13)"). Its more convenient to do this dynamically, closing over the desired class variable and using the two-argument form of [`super`](https://docs.python.org/3/library/functions.html#super "(in Python v3.13)"), since the zero-argument form does magic introspection based on where its containing function was defined.
Handling multiple singletons requires storing the initialization arguments in some form, to allow the [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable") method and pickling to be defined. We do this as a lookup dictionary on the singleton *type object*. This is logically an instance attribute, but because we need to dynamically switch in the dynamic \_Singleton type onto an instance of the base type, that gets rather complex; either we have to require that the base already has an instance dictionary, or we risk breaking the `__slots__` layout during the switch. Since the singletons have lifetimes that last until garbage collection of their base classs type object, we can fake out this instance dictionary using a type-object dictionary that maps instance pointers to the data we want to store. An alternative would be to build a new type object for each individual singleton that closes over (or stores) the initializer arguments, but type objects are quite heavy and the principle is largely same anyway.

View File

@ -20,7 +20,7 @@ python_api_name: qiskit.compiler
### assemble
<Function id="qiskit.compiler.assemble" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/utils/deprecation.py#L44-L189" signature="qiskit.compiler.assemble(experiments, backend=None, qobj_id=None, qobj_header=None, shots=None, memory=False, seed_simulator=None, qubit_lo_freq=None, meas_lo_freq=None, qubit_lo_range=None, meas_lo_range=None, schedule_los=None, meas_level=MeasLevel.CLASSIFIED, meas_return=MeasReturnType.AVERAGE, meas_map=None, memory_slot_size=100, rep_time=None, rep_delay=None, parameter_binds=None, parametric_pulses=None, init_qubits=True, **run_config)">
<Function id="qiskit.compiler.assemble" github="https://github.com/Qiskit/qiskit/tree/stable/1.2/qiskit/compiler/assembler.py#L44-L189" signature="qiskit.compiler.assemble(experiments, backend=None, qobj_id=None, qobj_header=None, shots=None, memory=False, seed_simulator=None, qubit_lo_freq=None, meas_lo_freq=None, qubit_lo_range=None, meas_lo_range=None, schedule_los=None, meas_level=MeasLevel.CLASSIFIED, meas_return=MeasReturnType.AVERAGE, meas_map=None, memory_slot_size=100, rep_time=None, rep_delay=None, parameter_binds=None, parametric_pulses=None, init_qubits=True, **run_config)">
Assemble a list of circuits or pulse schedules into a `Qobj`.
This function serializes the payloads, which could be either circuits or schedules, to create `Qobj` “experiments”. It further annotates the experiment payload with header and configurations.
@ -33,33 +33,33 @@ python_api_name: qiskit.compiler
**Parameters**
* **experiments** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*] |* [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")*] |* [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock")*]*) Circuit(s) or pulse schedule(s) to execute
* **experiments** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*] |* [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")*] |* [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock")*]*) Circuit(s) or pulse schedule(s) to execute
* **backend** ([*Backend*](qiskit.providers.Backend "qiskit.providers.backend.Backend") *| None*) If set, some runtime options are automatically grabbed from `backend.configuration()` and `backend.defaults()`. If any other option is explicitly set (e.g., `rep_time`), it will override the backends. If any other options is set in the run\_config, it will also override the backends.
* **qobj\_id** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) String identifier to annotate the `Qobj`
* **qobj\_id** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) String identifier to annotate the `Qobj`
* **qobj\_header** ([*QobjHeader*](qiskit.qobj.QobjHeader "qiskit.qobj.common.QobjHeader") *|*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)") *| None*) User input that will be inserted in `Qobj` header, and will also be copied to the corresponding Result header. Headers do not affect the run.
* **qobj\_header** ([*QobjHeader*](qiskit.qobj.QobjHeader "qiskit.qobj.common.QobjHeader") *|*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)") *| None*) User input that will be inserted in `Qobj` header, and will also be copied to the corresponding Result header. Headers do not affect the run.
* **shots** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) Number of repetitions of each circuit, for sampling. Default: 1024 or `max_shots` from the backend configuration, whichever is smaller
* **shots** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) Number of repetitions of each circuit, for sampling. Default: 1024 or `max_shots` from the backend configuration, whichever is smaller
* **memory** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) If `True`, per-shot measurement bitstrings are returned as well (provided the backend supports it). For OpenPulse jobs, only measurement level 2 supports this option.
* **memory** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) If `True`, per-shot measurement bitstrings are returned as well (provided the backend supports it). For OpenPulse jobs, only measurement level 2 supports this option.
* **seed\_simulator** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) Random seed to control sampling, for when backend is a simulator
* **seed\_simulator** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) Random seed to control sampling, for when backend is a simulator
* **qubit\_lo\_freq** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None*) List of job level qubit drive LO frequencies in Hz. Overridden by `schedule_los` if specified. Must have length `n_qubits.`
* **qubit\_lo\_freq** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None*) List of job level qubit drive LO frequencies in Hz. Overridden by `schedule_los` if specified. Must have length `n_qubits.`
* **meas\_lo\_freq** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None*) List of measurement LO frequencies in Hz. Overridden by `schedule_los` if specified. Must have length `n_qubits.`
* **meas\_lo\_freq** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None*) List of measurement LO frequencies in Hz. Overridden by `schedule_los` if specified. Must have length `n_qubits.`
* **qubit\_lo\_range** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None*) List of job level drive LO ranges each of form `[range_min, range_max]` in Hz. Used to validate `qubit_lo_freq`. Must have length `n_qubits.`
* **qubit\_lo\_range** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None*) List of job level drive LO ranges each of form `[range_min, range_max]` in Hz. Used to validate `qubit_lo_freq`. Must have length `n_qubits.`
* **meas\_lo\_range** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None*) List of job level measurement LO ranges each of form `[range_min, range_max]` in Hz. Used to validate `meas_lo_freq`. Must have length `n_qubits.`
* **meas\_lo\_range** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None*) List of job level measurement LO ranges each of form `[range_min, range_max]` in Hz. Used to validate `meas_lo_freq`. Must have length `n_qubits.`
* **schedule\_los** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")*\[PulseChannel,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | LoConfig] |* [*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")*\[PulseChannel,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | LoConfig | None*) Experiment level (ie circuit or schedule) LO frequency configurations for qubit drive and measurement channels. These values override the job level values from `default_qubit_los` and `default_meas_los`. Frequencies are in Hz. Settable for OpenQASM 2 and pulse jobs.
* **schedule\_los** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)")*\[PulseChannel,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | LoConfig] |* [*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)")*\[PulseChannel,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | LoConfig | None*) Experiment level (ie circuit or schedule) LO frequency configurations for qubit drive and measurement channels. These values override the job level values from `default_qubit_los` and `default_meas_los`. Frequencies are in Hz. Settable for OpenQASM 2 and pulse jobs.
* **meas\_level** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| MeasLevel*) Set the appropriate level of the measurement output for pulse experiments.
* **meas\_level** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| MeasLevel*) Set the appropriate level of the measurement output for pulse experiments.
* **meas\_return** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| MeasReturnType*)
* **meas\_return** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| MeasReturnType*)
Level of measurement data for the backend to return.
@ -68,17 +68,17 @@ python_api_name: qiskit.compiler
* `single` returns information from every shot.
* `avg` returns average measurement output (averaged over number of shots).
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Qubit*](circuit#qiskit.circuit.Qubit "qiskit.circuit.quantumregister.Qubit")*]] | None*) List of lists, containing qubits that must be measured together.
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Qubit*](circuit#qiskit.circuit.Qubit "qiskit.circuit.quantumregister.Qubit")*]] | None*) List of lists, containing qubits that must be measured together.
* **memory\_slot\_size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Size of each memory slot if the output is Level 0.
* **memory\_slot\_size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Size of each memory slot if the output is Level 0.
* **rep\_time** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Time per program execution in seconds. Must be from the list provided by the backend (`backend.configuration().rep_times`). Defaults to the first entry.
* **rep\_time** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Time per program execution in seconds. Must be from the list provided by the backend (`backend.configuration().rep_times`). Defaults to the first entry.
* **rep\_delay** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Delay between programs in seconds. Only supported on certain backends (if `backend.configuration().dynamic_reprate_enabled=True`). If supported, `rep_delay` will be used instead of `rep_time` and must be from the range supplied by the backend (`backend.configuration().rep_delay_range`). Default is given by `backend.configuration().default_rep_delay`.
* **rep\_delay** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) Delay between programs in seconds. Only supported on certain backends (if `backend.configuration().dynamic_reprate_enabled=True`). If supported, `rep_delay` will be used instead of `rep_time` and must be from the range supplied by the backend (`backend.configuration().rep_delay_range`). Default is given by `backend.configuration().default_rep_delay`.
* **parameter\_binds** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")*\[*[*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.parameter.Parameter")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*]] | None*) List of Parameter bindings over which the set of experiments will be executed. Each list element (bind) should be of the form \{Parameter1: value1, Parameter2: value2, …}. All binds will be executed across all experiments; e.g., if parameter\_binds is a length-n list, and there are m experiments, a total of m x n experiments will be run (one for each experiment/bind pair).
* **parameter\_binds** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)")*\[*[*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.parameter.Parameter")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*]] | None*) List of Parameter bindings over which the set of experiments will be executed. Each list element (bind) should be of the form \{Parameter1: value1, Parameter2: value2, …}. All binds will be executed across all experiments; e.g., if parameter\_binds is a length-n list, and there are m experiments, a total of m x n experiments will be run (one for each experiment/bind pair).
* **parametric\_pulses** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*] | None*)
* **parametric\_pulses** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*] | None*)
A list of pulse shapes which are supported internally on the backend. Example:
@ -86,9 +86,9 @@ python_api_name: qiskit.compiler
['gaussian', 'constant']
```
* **init\_qubits** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Whether to reset the qubits to the ground state for each shot. Default: `True`.
* **init\_qubits** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Whether to reset the qubits to the ground state for each shot. Default: `True`.
* **\*\*run\_config** ([*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")) Extra arguments used to configure the run (e.g., for Aer configurable backends). Refer to the backend documentation for details on these arguments.
* **\*\*run\_config** ([*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)")) Extra arguments used to configure the run (e.g., for Aer configurable backends). Refer to the backend documentation for details on these arguments.
**Returns**
@ -110,12 +110,12 @@ python_api_name: qiskit.compiler
**Parameters**
* **circuits** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) The quantum circuit or circuits to translate
* **circuits** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) The quantum circuit or circuits to translate
* **backend** ([*Backend*](qiskit.providers.Backend "qiskit.providers.backend.Backend") *| None*) A backend instance, which contains hardware-specific data required for scheduling
* **inst\_map** ([*InstructionScheduleMap*](qiskit.pulse.InstructionScheduleMap "qiskit.pulse.instruction_schedule_map.InstructionScheduleMap") *| None*) Mapping of circuit operations to pulse schedules. If `None`, defaults to the `backend`s `instruction_schedule_map`
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]] | None*) List of sets of qubits that must be measured together. If `None`, defaults to the `backend`s `meas_map`
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") *| None*) The output sample rate of backend control electronics. For scheduled circuits which contain time information, dt is required. If not provided, it will be obtained from the backend configuration
* **method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*] | None*) Optionally specify a particular scheduling method
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]] | None*) List of sets of qubits that must be measured together. If `None`, defaults to the `backend`s `meas_map`
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *| None*) The output sample rate of backend control electronics. For scheduled circuits which contain time information, dt is required. If not provided, it will be obtained from the backend configuration
* **method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*] | None*) Optionally specify a particular scheduling method
**Returns**
@ -127,7 +127,7 @@ python_api_name: qiskit.compiler
**Return type**
[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") | [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")]
[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") | [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")]
</Function>
### transpile
@ -155,11 +155,11 @@ python_api_name: qiskit.compiler
* **backend** ([*Backend*](qiskit.providers.Backend "qiskit.providers.backend.Backend") *| None*) If set, the transpiler will compile the input circuit to this target device. If any other option is explicitly set (e.g., `coupling_map`), it will override the backends.
* **basis\_gates** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*] | None*) List of basis gate names to unroll to (e.g: `['u1', 'u2', 'u3', 'cx']`). If `None`, do not unroll.
* **basis\_gates** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*] | None*) List of basis gate names to unroll to (e.g: `['u1', 'u2', 'u3', 'cx']`). If `None`, do not unroll.
* **inst\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*InstructionScheduleMap*](qiskit.pulse.InstructionScheduleMap "qiskit.pulse.instruction_schedule_map.InstructionScheduleMap")*] | None*) Mapping of unrolled gates to pulse schedules. If this is not provided, transpiler tries to get from the backend. If any user defined calibration is found in the map and this is used in a circuit, transpiler attaches the custom gate definition to the circuit. This enables one to flexibly override the low-level instruction implementation. This feature is available iff the backend supports the pulse gate experiment.
* **inst\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*InstructionScheduleMap*](qiskit.pulse.InstructionScheduleMap "qiskit.pulse.instruction_schedule_map.InstructionScheduleMap")*] | None*) Mapping of unrolled gates to pulse schedules. If this is not provided, transpiler tries to get from the backend. If any user defined calibration is found in the map and this is used in a circuit, transpiler attaches the custom gate definition to the circuit. This enables one to flexibly override the low-level instruction implementation. This feature is available iff the backend supports the pulse gate experiment.
* **coupling\_map** ([*CouplingMap*](qiskit.transpiler.CouplingMap "qiskit.transpiler.coupling.CouplingMap") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]] | None*)
* **coupling\_map** ([*CouplingMap*](qiskit.transpiler.CouplingMap "qiskit.transpiler.coupling.CouplingMap") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]] | None*)
Directed coupling map (perhaps custom) to target in mapping. If the coupling map is symmetric, both directions need to be specified.
@ -170,7 +170,7 @@ python_api_name: qiskit.compiler
* **backend\_properties** ([*BackendProperties*](qiskit.providers.models.BackendProperties "qiskit.providers.models.backendproperties.BackendProperties") *| None*) properties returned by a backend, including information on gate errors, readout errors, qubit coherence times, etc. Find a backend that provides this information with: `backend.properties()`
* **initial\_layout** ([*Layout*](qiskit.transpiler.Layout "qiskit.transpiler.layout.Layout") *|*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)") *| None*)
* **initial\_layout** ([*Layout*](qiskit.transpiler.Layout "qiskit.transpiler.layout.Layout") *|*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)") *| None*)
Initial position of virtual qubits on physical qubits. If this layout makes the circuit compatible with the coupling\_map constraints, it will be used. The final layout is not guaranteed to be the same, as the transpiler may permute qubits through swaps or other means. Multiple formats are supported:
@ -206,21 +206,21 @@ python_api_name: qiskit.compiler
[qr[0], None, None, qr[1], None, qr[2]]
```
* **layout\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of layout selection pass (trivial, dense, sabre). This can also be the external plugin name to use for the `layout` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"layout"` for the `stage_name` argument.
* **layout\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of layout selection pass (trivial, dense, sabre). This can also be the external plugin name to use for the `layout` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"layout"` for the `stage_name` argument.
* **routing\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of routing pass (basic, lookahead, stochastic, sabre, none). Note This can also be the external plugin name to use for the `routing` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"routing"` for the `stage_name` argument.
* **routing\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of routing pass (basic, lookahead, stochastic, sabre, none). Note This can also be the external plugin name to use for the `routing` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"routing"` for the `stage_name` argument.
* **translation\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of translation pass (unroller, translator, synthesis) This can also be the external plugin name to use for the `translation` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"translation"` for the `stage_name` argument.
* **translation\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of translation pass (unroller, translator, synthesis) This can also be the external plugin name to use for the `translation` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"translation"` for the `stage_name` argument.
* **scheduling\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of scheduling pass. \* `'as_soon_as_possible'`: Schedule instructions greedily, as early as possible on a qubit resource. (alias: `'asap'`) \* `'as_late_as_possible'`: Schedule instructions late, i.e. keeping qubits in the ground state when possible. (alias: `'alap'`) If `None`, no scheduling will be done. This can also be the external plugin name to use for the `scheduling` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"scheduling"` for the `stage_name` argument.
* **scheduling\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of scheduling pass. \* `'as_soon_as_possible'`: Schedule instructions greedily, as early as possible on a qubit resource. (alias: `'asap'`) \* `'as_late_as_possible'`: Schedule instructions late, i.e. keeping qubits in the ground state when possible. (alias: `'alap'`) If `None`, no scheduling will be done. This can also be the external plugin name to use for the `scheduling` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"scheduling"` for the `stage_name` argument.
* **instruction\_durations** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None,* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*,* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*]] |* [*InstructionDurations*](qiskit.transpiler.InstructionDurations "qiskit.transpiler.instruction_durations.InstructionDurations") *| None*) Durations of instructions. Applicable only if scheduling\_method is specified. The gate lengths defined in `backend.properties` are used as default. They are overwritten if this `instruction_durations` is specified. The format of `instruction_durations` must be as follows. The instruction\_durations must be given as a list of tuples \[(instruction\_name, qubits, duration, unit), …]. | \[(cx, \[0, 1], 12.3, ns), (u3, \[0], 4.56, ns)] | \[(cx, \[0, 1], 1000), (u3, \[0], 300)] If unit is omitted, the default is dt, which is a sample time depending on backend. If the time unit is dt, the duration must be an integer.
* **instruction\_durations** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None,* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*,* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*]] |* [*InstructionDurations*](qiskit.transpiler.InstructionDurations "qiskit.transpiler.instruction_durations.InstructionDurations") *| None*) Durations of instructions. Applicable only if scheduling\_method is specified. The gate lengths defined in `backend.properties` are used as default. They are overwritten if this `instruction_durations` is specified. The format of `instruction_durations` must be as follows. The instruction\_durations must be given as a list of tuples \[(instruction\_name, qubits, duration, unit), …]. | \[(cx, \[0, 1], 12.3, ns), (u3, \[0], 4.56, ns)] | \[(cx, \[0, 1], 1000), (u3, \[0], 300)] If unit is omitted, the default is dt, which is a sample time depending on backend. If the time unit is dt, the duration must be an integer.
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") *| None*) Backend sample time (resolution) in seconds. If `None` (default), `backend.configuration().dt` is used.
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *| None*) Backend sample time (resolution) in seconds. If `None` (default), `backend.configuration().dt` is used.
* **approximation\_degree** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) heuristic dial used for circuit approximation (1.0=no approximation, 0.0=maximal approximation)
* **approximation\_degree** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) heuristic dial used for circuit approximation (1.0=no approximation, 0.0=maximal approximation)
* **timing\_constraints** ([*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] | None*)
* **timing\_constraints** ([*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] | None*)
An optional control hardware restriction on instruction time resolution. A quantum computer backend may report a set of restrictions, namely:
@ -231,9 +231,9 @@ python_api_name: qiskit.compiler
This information will be provided by the backend configuration. If the backend doesnt have any restriction on the instruction time allocation, then `timing_constraints` is None and no adjustment will be performed.
* **seed\_transpiler** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) Sets random seed for the stochastic parts of the transpiler
* **seed\_transpiler** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) Sets random seed for the stochastic parts of the transpiler
* **optimization\_level** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*)
* **optimization\_level** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*)
How much optimization to perform on the circuits. Higher levels generate more optimized circuits, at the expense of longer transpilation time.
@ -244,7 +244,7 @@ python_api_name: qiskit.compiler
If `None`, level 1 will be chosen as default.
* **callback** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.12)")*\[\[BasePass,* [*DAGCircuit*](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.dagcircuit.DAGCircuit")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*,* [*PropertySet*](qiskit.passmanager.PropertySet "qiskit.passmanager.compilation_status.PropertySet")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")*] | None*)
* **callback** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.13)")*\[\[BasePass,* [*DAGCircuit*](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.dagcircuit.DAGCircuit")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*,* [*PropertySet*](qiskit.passmanager.PropertySet "qiskit.passmanager.compilation_status.PropertySet")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)")*] | None*)
A callback function that will be called after each pass execution. The function will be called with 5 keyword arguments, | `pass_`: the pass being run. | `dag`: the dag output of the pass. | `time`: the time to execute the pass. | `property_set`: the property set. | `count`: the index for the pass execution. The exact arguments passed expose the internals of the pass manager, and are subject to change as the pass manager internals change. If you intend to reuse a callback function over multiple releases, be sure to check that the arguments being passed are the same. To use the callback feature, define a function that will take in kwargs dict and access the variables. For example:
@ -259,23 +259,23 @@ python_api_name: qiskit.compiler
transpile(circ, callback=callback_func)
```
* **output\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*] | None*) A list with strings to identify the output circuits. The length of the list should be exactly the length of the `circuits` parameter.
* **output\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*] | None*) A list with strings to identify the output circuits. The length of the list should be exactly the length of the `circuits` parameter.
* **unitary\_synthesis\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the unitary synthesis method to use. By default `'default'` is used. You can see a list of installed plugins with [`unitary_synthesis_plugin_names()`](qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names "qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names").
* **unitary\_synthesis\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the unitary synthesis method to use. By default `'default'` is used. You can see a list of installed plugins with [`unitary_synthesis_plugin_names()`](qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names "qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names").
* **unitary\_synthesis\_plugin\_config** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)") *| None*) An optional configuration dictionary that will be passed directly to the unitary synthesis plugin. By default this setting will have no effect as the default unitary synthesis method does not take custom configuration. This should only be necessary when a unitary synthesis plugin is specified with the `unitary_synthesis_method` argument. As this is custom for each unitary synthesis plugin refer to the plugin documentation for how to use this option.
* **unitary\_synthesis\_plugin\_config** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)") *| None*) An optional configuration dictionary that will be passed directly to the unitary synthesis plugin. By default this setting will have no effect as the default unitary synthesis method does not take custom configuration. This should only be necessary when a unitary synthesis plugin is specified with the `unitary_synthesis_method` argument. As this is custom for each unitary synthesis plugin refer to the plugin documentation for how to use this option.
* **target** ([*Target*](qiskit.transpiler.Target "qiskit.transpiler.target.Target") *| None*) A backend transpiler target. Normally this is specified as part of the `backend` argument, but if you have manually constructed a [`Target`](qiskit.transpiler.Target "qiskit.transpiler.Target") object you can specify it manually here. This will override the target from `backend`.
* **hls\_config** ([*HLSConfig*](qiskit.transpiler.passes.HLSConfig "qiskit.transpiler.passes.synthesis.high_level_synthesis.HLSConfig") *| None*) An optional configuration class `HLSConfig` that will be passed directly to `HighLevelSynthesis` transformation pass. This configuration class allows to specify for various high-level objects the lists of synthesis algorithms and their parameters.
* **init\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) The plugin name to use for the `init` stage. By default an external plugin is not used. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"init"` for the stage name argument.
* **init\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) The plugin name to use for the `init` stage. By default an external plugin is not used. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"init"` for the stage name argument.
* **optimization\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) The plugin name to use for the `optimization` stage. By default an external plugin is not used. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"optimization"` for the `stage_name` argument.
* **optimization\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) The plugin name to use for the `optimization` stage. By default an external plugin is not used. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"optimization"` for the `stage_name` argument.
* **ignore\_backend\_supplied\_default\_methods** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If set to `True` any default methods specified by a backend will be ignored. Some backends specify alternative default methods to support custom compilation target-specific passes/plugins which support backend-specific compilation techniques. If youd prefer that these defaults were not used this option is used to disable those backend-specific defaults.
* **ignore\_backend\_supplied\_default\_methods** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If set to `True` any default methods specified by a backend will be ignored. Some backends specify alternative default methods to support custom compilation target-specific passes/plugins which support backend-specific compilation techniques. If youd prefer that these defaults were not used this option is used to disable those backend-specific defaults.
* **num\_processes** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) The maximum number of parallel processes to launch for this call to transpile if parallel execution is enabled. This argument overrides `num_processes` in the user configuration file, and the `QISKIT_NUM_PROCS` environment variable. If set to `None` the system default or local user configuration will be used.
* **num\_processes** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) The maximum number of parallel processes to launch for this call to transpile if parallel execution is enabled. This argument overrides `num_processes` in the user configuration file, and the `QISKIT_NUM_PROCS` environment variable. If set to `None` the system default or local user configuration will be used.
**Returns**
@ -297,11 +297,11 @@ python_api_name: qiskit.compiler
**Parameters**
* **scheduled\_circuits** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) Scheduled circuit(s) to be translated
* **scheduled\_circuits** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) Scheduled circuit(s) to be translated
* **backend** ([*Backend*](qiskit.providers.Backend "qiskit.providers.backend.Backend") *| None*) A backend instance, which contains hardware-specific data required for scheduling
* **inst\_map** ([*InstructionScheduleMap*](qiskit.pulse.InstructionScheduleMap "qiskit.pulse.instruction_schedule_map.InstructionScheduleMap") *| None*) Mapping of circuit operations to pulse schedules. If `None`, defaults to the `backend`s `instruction_schedule_map`
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]] | None*) List of sets of qubits that must be measured together. If `None`, defaults to the `backend`s `meas_map`
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") *| None*) The output sample rate of backend control electronics. For scheduled circuits which contain time information, dt is required. If not provided, it will be obtained from the backend configuration
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]] | None*) List of sets of qubits that must be measured together. If `None`, defaults to the `backend`s `meas_map`
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *| None*) The output sample rate of backend control electronics. For scheduled circuits which contain time information, dt is required. If not provided, it will be obtained from the backend configuration
**Returns**
@ -313,6 +313,6 @@ python_api_name: qiskit.compiler
**Return type**
[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") | [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")]
[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") | [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")]
</Function>

View File

@ -30,9 +30,9 @@ python_api_name: qiskit.converters
**Parameters**
* **circuit** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) the input circuit.
* **parameter\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")) For parameterized circuits, a mapping from parameters in the circuit to parameters to be used in the instruction. If None, existing circuit parameters will also parameterize the instruction.
* **parameter\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) For parameterized circuits, a mapping from parameters in the circuit to parameters to be used in the instruction. If None, existing circuit parameters will also parameterize the instruction.
* **equivalence\_library** ([*EquivalenceLibrary*](qiskit.circuit.EquivalenceLibrary "qiskit.circuit.EquivalenceLibrary")) Optional equivalence library where the converted instruction will be registered.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Optional instruction label.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Optional instruction label.
**Raises**
@ -73,9 +73,9 @@ python_api_name: qiskit.converters
**Parameters**
* **circuit** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) the input circuit.
* **parameter\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")) For parameterized circuits, a mapping from parameters in the circuit to parameters to be used in the gate. If None, existing circuit parameters will also parameterize the Gate.
* **parameter\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) For parameterized circuits, a mapping from parameters in the circuit to parameters to be used in the gate. If None, existing circuit parameters will also parameterize the Gate.
* **equivalence\_library** ([*EquivalenceLibrary*](qiskit.circuit.EquivalenceLibrary "qiskit.circuit.EquivalenceLibrary")) Optional equivalence library where the converted gate will be registered.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Optional gate label.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Optional gate label.
**Raises**
@ -102,7 +102,7 @@ python_api_name: qiskit.converters
**Parameters**
* **circuit** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) the input circuit.
* **copy\_operations** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Deep copy the operation objects in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") for the output [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit"). This should only be set to `False` if the input [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") will not be used anymore as the operations in the output [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be shared instances and modifications to operations in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be reflected in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") (and vice versa).
* **copy\_operations** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Deep copy the operation objects in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") for the output [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit"). This should only be set to `False` if the input [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") will not be used anymore as the operations in the output [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be shared instances and modifications to operations in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be reflected in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") (and vice versa).
* **qubit\_order** (*Iterable\[*[*Qubit*](circuit#qiskit.circuit.Qubit "qiskit.circuit.Qubit")*] or None*) the order that the qubits should be indexed in the output DAG. Defaults to the same order as in the circuit.
* **clbit\_order** (*Iterable\[*[*Clbit*](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit")*] or None*) the order that the clbits should be indexed in the output DAG. Defaults to the same order as in the circuit.
@ -116,7 +116,7 @@ python_api_name: qiskit.converters
**Raises**
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") if the `qubit_order` or `clbit_order` parameters do not match the bits in the circuit.
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.13)") if the `qubit_order` or `clbit_order` parameters do not match the bits in the circuit.
**Example**
@ -144,7 +144,7 @@ python_api_name: qiskit.converters
**Parameters**
* **dag** ([*DAGCircuit*](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit")) the input dag.
* **copy\_operations** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Deep copy the operation objects in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") for the output [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). This should only be set to `False` if the input [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will not be used anymore as the operations in the output [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") will be shared instances and modifications to operations in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be reflected in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") (and vice versa).
* **copy\_operations** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Deep copy the operation objects in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") for the output [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). This should only be set to `False` if the input [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will not be used anymore as the operations in the output [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") will be shared instances and modifications to operations in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be reflected in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") (and vice versa).
**Returns**
@ -208,7 +208,7 @@ python_api_name: qiskit.converters
**Parameters**
* **circuit** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) the input circuit.
* **create\_preds\_and\_succs** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) whether to construct lists of predecessors and successors for every node.
* **create\_preds\_and\_succs** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) whether to construct lists of predecessors and successors for every node.
**Returns**
@ -231,7 +231,7 @@ python_api_name: qiskit.converters
**Parameters**
* **dag** ([*DAGCircuit*](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit")) the input dag.
* **create\_preds\_and\_succs** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) whether to construct lists of predecessors and successors for every node.
* **create\_preds\_and\_succs** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) whether to construct lists of predecessors and successors for every node.
**Returns**

View File

@ -353,6 +353,10 @@
"title": "MCMT",
"url": "/api/qiskit/dev/qiskit.circuit.library.MCMT"
},
{
"title": "MCMTGate",
"url": "/api/qiskit/dev/qiskit.circuit.library.MCMTGate"
},
{
"title": "MCMTVChain",
"url": "/api/qiskit/dev/qiskit.circuit.library.MCMTVChain"
@ -457,6 +461,10 @@
"title": "QuadraticForm",
"url": "/api/qiskit/dev/qiskit.circuit.library.QuadraticForm"
},
{
"title": "quantum_volume",
"url": "/api/qiskit/dev/qiskit.circuit.library.quantum_volume"
},
{
"title": "QuantumVolume",
"url": "/api/qiskit/dev/qiskit.circuit.library.QuantumVolume"
@ -1221,6 +1229,18 @@
"title": "LookaheadSwap",
"url": "/api/qiskit/dev/qiskit.transpiler.passes.LookaheadSwap"
},
{
"title": "MCMTSynthesisDefault",
"url": "/api/qiskit/dev/qiskit.transpiler.passes.synthesis.hls_plugins.MCMTSynthesisDefault"
},
{
"title": "MCMTSynthesisNoAux",
"url": "/api/qiskit/dev/qiskit.transpiler.passes.synthesis.hls_plugins.MCMTSynthesisNoAux"
},
{
"title": "MCMTSynthesisVChain",
"url": "/api/qiskit/dev/qiskit.transpiler.passes.synthesis.hls_plugins.MCMTSynthesisVChain"
},
{
"title": "MCXSynthesis1CleanB95",
"url": "/api/qiskit/dev/qiskit.transpiler.passes.synthesis.hls_plugins.MCXSynthesis1CleanB95"

View File

@ -20,7 +20,7 @@ python_api_name: qiskit.assembler
### assemble\_circuits
<Function id="qiskit.assembler.assemble_circuits" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L408-L451" signature="qiskit.assembler.assemble_circuits(circuits, run_config, qobj_id, qobj_header)">
<Function id="qiskit.assembler.assemble_circuits" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/assembler/assemble_circuits.py#L408-L451" signature="qiskit.assembler.assemble_circuits(circuits, run_config, qobj_id, qobj_header)">
Assembles a list of circuits into a qobj that can be run on the backend.
<Admonition title="Deprecated since version 1.2" type="danger">
@ -29,9 +29,9 @@ python_api_name: qiskit.assembler
**Parameters**
* **circuits** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) circuit(s) to assemble
* **circuits** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) circuit(s) to assemble
* **run\_config** ([*RunConfig*](qiskit.assembler.RunConfig "qiskit.assembler.run_config.RunConfig")) configuration of the runtime environment
* **qobj\_id** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) identifier for the generated qobj
* **qobj\_id** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) identifier for the generated qobj
* **qobj\_header** ([*QobjHeader*](qiskit.qobj.QobjHeader "qiskit.qobj.common.QobjHeader")) header to pass to the results
**Returns**
@ -70,8 +70,8 @@ python_api_name: qiskit.assembler
**Parameters**
* **schedules** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") *|*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](pulse#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction") *|*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*,* [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](pulse#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")*]]*) Schedules to assemble.
* **qobj\_id** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Identifier for the generated qobj.
* **schedules** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") *|*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](pulse#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction") *|*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*,* [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](pulse#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")*]]*) Schedules to assemble.
* **qobj\_id** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Identifier for the generated qobj.
* **qobj\_header** ([*QobjHeader*](qiskit.qobj.QobjHeader "qiskit.qobj.common.QobjHeader")) Header to pass to the results.
* **run\_config** ([*RunConfig*](qiskit.assembler.RunConfig "qiskit.assembler.run_config.RunConfig")) Configuration of the runtime environment.
@ -127,7 +127,7 @@ python_api_name: qiskit.assembler
### disassemble
<Function id="qiskit.assembler.disassemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L41-L92" signature="qiskit.assembler.disassemble(qobj)">
<Function id="qiskit.assembler.disassemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/assembler/disassemble.py#L41-L92" signature="qiskit.assembler.disassemble(qobj)">
Disassemble a qobj and return the circuits or pulse schedules, run\_config, and user header.
<Admonition title="Note" type="note">

View File

@ -302,9 +302,9 @@ A collection bits of the same type can be encapsulated in a register of the matc
**Parameters**
* **size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Optional. The number of bits to include in the register.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Optional. The name of the register. If not provided, a unique name will be auto-generated from the register type.
* **bits** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*Bit*](#qiskit.circuit.Bit "qiskit.circuit.Bit")*]*) Optional. A list of Bit() instances to be used to populate the register.
* **size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Optional. The number of bits to include in the register.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Optional. The name of the register. If not provided, a unique name will be auto-generated from the register type.
* **bits** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*Bit*](#qiskit.circuit.Bit "qiskit.circuit.Bit")*]*) Optional. A list of Bit() instances to be used to populate the register.
**Raises**
@ -419,7 +419,7 @@ Subclassing [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"), Qiskit has a sp
| -------------------------------------------------------------------------------------------------------------------- | ------------------------ |
| [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate")(name, num\_qubits, params\[, ...]) | Controlled unitary gate. |
Each of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"), [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") and [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") has a corresponding singleton type, built using the machinery described in [`qiskit.circuit.singleton`](circuit_singleton#module-qiskit.circuit.singleton "qiskit.circuit.singleton"). The module-level documentation contains full details, along with descriptions of [`SingletonInstruction`](circuit_singleton#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction"), [`SingletonGate`](circuit_singleton#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") and [`SingletonControlledGate`](circuit_singleton#qiskit.circuit.singleton.SingletonControlledGate "qiskit.circuit.singleton.SingletonControlledGate"). From a users perspective, little changes based on whether the base class is a singleton or not; the intention always remains that you should call [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable") first if you need to get a safe-to-mutate owned copy of an instruction (you cannot assume that an arbitrary instruction is mutable), and while direct [`type`](https://docs.python.org/3/library/functions.html#type "(in Python v3.12)") inspection is discouraged, if you do need it, the reliable way to find the “base” type of a potentially singleton instruction is to use [`base_class`](qiskit.circuit.Instruction#base_class "qiskit.circuit.Instruction.base_class").
Each of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"), [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") and [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") has a corresponding singleton type, built using the machinery described in [`qiskit.circuit.singleton`](circuit_singleton#module-qiskit.circuit.singleton "qiskit.circuit.singleton"). The module-level documentation contains full details, along with descriptions of [`SingletonInstruction`](circuit_singleton#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction"), [`SingletonGate`](circuit_singleton#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") and [`SingletonControlledGate`](circuit_singleton#qiskit.circuit.singleton.SingletonControlledGate "qiskit.circuit.singleton.SingletonControlledGate"). From a users perspective, little changes based on whether the base class is a singleton or not; the intention always remains that you should call [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable") first if you need to get a safe-to-mutate owned copy of an instruction (you cannot assume that an arbitrary instruction is mutable), and while direct [`type`](https://docs.python.org/3/library/functions.html#type "(in Python v3.13)") inspection is discouraged, if you do need it, the reliable way to find the “base” type of a potentially singleton instruction is to use [`base_class`](qiskit.circuit.Instruction#base_class "qiskit.circuit.Instruction.base_class").
[`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") uses the same mechanisms as [subclassing gates](#circuit-custom-gates) to define a fixed, lazy synthesis for itself. This is naturally not hardware-aware, and harder to hook into the synthesis routines of the compiler, but works better as a concrete [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") that could potentially be run natively on hardware. For cases where synthesis and abstract optimization is more important, Qiskit offers a composable class called [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation"), which tracks “gate modifiers” (of which [`ControlModifier`](#qiskit.circuit.ControlModifier "qiskit.circuit.ControlModifier") is one) to apply to the inner [`base_op`](qiskit.circuit.AnnotatedOperation#base_op "qiskit.circuit.AnnotatedOperation.base_op").
@ -520,8 +520,8 @@ it is forbidden for the optimizer to cancel out the two $X$ instructions.
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) the number of qubits for the barrier.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) the optional label of this barrier.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the number of qubits for the barrier.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) the optional label of this barrier.
</Class>
The [`Store`](#qiskit.circuit.Store "qiskit.circuit.Store") instruction is particularly special, in that it allows writing the result of a [real-time classical computation expression](#circuit-repr-real-time-classical) (an [`expr.Expr`](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) in a local classical variable (a [`expr.Var`](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")). It takes *neither* [`Qubit`](#qiskit.circuit.Qubit "qiskit.circuit.Qubit") nor [`Clbit`](#qiskit.circuit.Clbit "qiskit.circuit.Clbit") operands, but has an explicit [`lvalue`](#qiskit.circuit.Store.lvalue "qiskit.circuit.Store.lvalue") and [`rvalue`](#qiskit.circuit.Store.rvalue "qiskit.circuit.Store.rvalue").
@ -617,7 +617,7 @@ Within [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumC
| -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [`ControlFlowOp`](qiskit.circuit.ControlFlowOp "qiskit.circuit.ControlFlowOp")(\*args, \*\*kwargs) | Abstract class to encapsulate all control flow operations. |
For convenience, there is a [`frozenset`](https://docs.python.org/3/library/stdtypes.html#frozenset "(in Python v3.12)") instance containing the [`Instruction.name`](qiskit.circuit.Instruction#name "qiskit.circuit.Instruction.name") attributes of each of the control-flow operations.
For convenience, there is a [`frozenset`](https://docs.python.org/3/library/stdtypes.html#frozenset "(in Python v3.13)") instance containing the [`Instruction.name`](qiskit.circuit.Instruction#name "qiskit.circuit.Instruction.name") attributes of each of the control-flow operations.
#### qiskit.circuit.CONTROL\_FLOW\_OP\_NAMES
@ -713,7 +713,7 @@ Subclasses of [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate") will also like
<Function id="object.__array__" signature="object.__array__(dtype=None, copy=None)">
Return a Numpy array representing the gate. This can use the gates [`params`](qiskit.circuit.Instruction#params "qiskit.circuit.Instruction.params") field, and may assume that these are numeric values (assuming the subclass expects that) and not [compile-time parameters](#circuit-compile-time-parameters).
For greatest efficiency, the returned array should default to a dtype of [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)").
For greatest efficiency, the returned array should default to a dtype of [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)").
</Function>
If your custom subclass has natural representations of its controlled or inverse forms, you may also wish to override the [`inverse()`](qiskit.circuit.Instruction#inverse "qiskit.circuit.Instruction.inverse") and [`control()`](qiskit.circuit.Gate#control "qiskit.circuit.Gate.control") methods.
@ -852,14 +852,14 @@ Qiskit also defines a shared global-state object, [`SessionEquivalenceLibrary`](
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of quantum wires
* **depth** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) layers of operations (i.e. critical path length)
* **max\_operands** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) maximum qubit operands of each gate (between 1 and 4)
* **measure** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if True, measure all qubits at the end
* **conditional** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if True, insert middle measurements and conditionals
* **reset** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if True, insert middle resets
* **seed** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) sets random seed (optional)
* **num\_operand\_distribution** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")) a distribution of gates that specifies the ratio
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of quantum wires
* **depth** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) layers of operations (i.e. critical path length)
* **max\_operands** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) maximum qubit operands of each gate (between 1 and 4)
* **measure** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if True, measure all qubits at the end
* **conditional** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if True, insert middle measurements and conditionals
* **reset** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if True, insert middle resets
* **seed** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) sets random seed (optional)
* **num\_operand\_distribution** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) a distribution of gates that specifies the ratio
* **1-qubit** (*of*)
* **2-qubit**
* **3-qubit**

View File

@ -70,7 +70,7 @@ The base for dynamic variables is the [`Var`](#qiskit.circuit.classical.expr.Var
##### name
<Attribute id="qiskit.circuit.classical.expr.Var.name" attributeTypeHint="str | None">
The name of the variable. This is required to exist if the backing [`var`](#qiskit.circuit.classical.expr.Var.var "qiskit.circuit.classical.expr.Var.var") attribute is a [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.12)"), i.e. if it is a new-style variable, and must be `None` if it is an old-style variable.
The name of the variable. This is required to exist if the backing [`var`](#qiskit.circuit.classical.expr.Var.var "qiskit.circuit.classical.expr.Var.var") attribute is a [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.13)"), i.e. if it is a new-style variable, and must be `None` if it is an old-style variable.
</Attribute>
##### new
@ -80,13 +80,13 @@ The base for dynamic variables is the [`Var`](#qiskit.circuit.classical.expr.Var
**Return type**
[*Self*](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.12)")
[*Self*](https://docs.python.org/3/library/typing.html#typing.Self "(in Python v3.13)")
</Function>
##### var
<Attribute id="qiskit.circuit.classical.expr.Var.var" attributeTypeHint="qiskit.circuit.Clbit | qiskit.circuit.ClassicalRegister | uuid.UUID">
A reference to the backing data storage of the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") instance. When lifting old-style [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") instances into a [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var"), this is exactly the [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister"). If the variable is a new-style classical variable (one that owns its own storage separate to the old [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit")/[`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") model), this field will be a [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.12)") to uniquely identify it.
A reference to the backing data storage of the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") instance. When lifting old-style [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") instances into a [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var"), this is exactly the [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") or [`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister"). If the variable is a new-style classical variable (one that owns its own storage separate to the old [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit")/[`ClassicalRegister`](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") model), this field will be a [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.13)") to uniquely identify it.
</Attribute>
</Class>
@ -807,7 +807,7 @@ For the convenience of simple visitors that only need to inspect the variables i
**Return type**
[*Iterator*](https://docs.python.org/3/library/typing.html#typing.Iterator "(in Python v3.12)")\[[*Var*](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var")]
[*Iterator*](https://docs.python.org/3/library/typing.html#typing.Iterator "(in Python v3.13)")\[[*Var*](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.expr.Var")]
</Function>
Two expressions can be compared for direct structural equality by using the built-in Python `==` operator. In general, though, one might want to compare two expressions slightly more semantically, allowing that the [`Var`](#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var") nodes inside them are bound to different memory-location descriptions between two different circuits. In this case, one can use [`structurally_equivalent()`](#qiskit.circuit.classical.expr.structurally_equivalent "qiskit.circuit.classical.expr.structurally_equivalent") with two suitable “key” functions to do the comparison.
@ -825,12 +825,12 @@ Two expressions can be compared for direct structural equality by using the buil
* **left** ([*expr.Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr")) one of the [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") nodes.
* **right** ([*expr.Expr*](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr")) the other [`Expr`](#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.expr.Expr") node.
* **left\_var\_key** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.12)")*\[\[*[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")*] | None*) a callable whose output should be used when comparing [`Var.var`](#qiskit.circuit.classical.expr.Var.var "qiskit.circuit.classical.expr.Var.var") attributes. If this argument is `None` or its output is `None` for a given variable in `left`, the variable will be used verbatim.
* **right\_var\_key** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.12)")*\[\[*[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")*] | None*) same as `left_var_key`, but used on the variables in `right` instead.
* **left\_var\_key** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.13)")*\[\[*[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)")*] | None*) a callable whose output should be used when comparing [`Var.var`](#qiskit.circuit.classical.expr.Var.var "qiskit.circuit.classical.expr.Var.var") attributes. If this argument is `None` or its output is `None` for a given variable in `left`, the variable will be used verbatim.
* **right\_var\_key** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.13)")*\[\[*[*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)")*] | None*) same as `left_var_key`, but used on the variables in `right` instead.
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
**Examples**
@ -900,7 +900,7 @@ Some expressions have associated memory locations, and others may be purely temp
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
<span id="module-qiskit.circuit.classical.types" />
@ -1020,7 +1020,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
#### is\_supertype
@ -1049,7 +1049,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
#### greater
@ -1063,7 +1063,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis
**Raises**
[**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.12)") if there is no ordering relation between the two types.
[**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.13)") if there is no ordering relation between the two types.
**Return type**
@ -1082,7 +1082,7 @@ Some helper methods are then defined in terms of this low-level [`order()`](#qis
### Casting between types
It is common to need to cast values of one type to another type. The casting rules for this are embedded into the [`types`](https://docs.python.org/3/library/types.html#module-types "(in Python v3.12)") module. You can query the casting kinds using [`cast_kind()`](#qiskit.circuit.classical.types.cast_kind "qiskit.circuit.classical.types.cast_kind"):
It is common to need to cast values of one type to another type. The casting rules for this are embedded into the [`types`](https://docs.python.org/3/library/types.html#module-types "(in Python v3.13)") module. You can query the casting kinds using [`cast_kind()`](#qiskit.circuit.classical.types.cast_kind "qiskit.circuit.classical.types.cast_kind"):
#### cast\_kind

View File

@ -161,6 +161,7 @@ print(diagonal.num_qubits)
| [`GRX`](qiskit.circuit.library.GRX "qiskit.circuit.library.GRX")(num\_qubits, theta) | Global RX gate. |
| [`GRY`](qiskit.circuit.library.GRY "qiskit.circuit.library.GRY")(num\_qubits, theta) | Global RY gate. |
| [`GRZ`](qiskit.circuit.library.GRZ "qiskit.circuit.library.GRZ")(num\_qubits, phi) | Global RZ gate. |
| [`MCMTGate`](qiskit.circuit.library.MCMTGate "qiskit.circuit.library.MCMTGate")(gate, num\_ctrl\_qubits, ...\[, ...]) | The multi-controlled multi-target gate, for an arbitrary singly controlled target gate. |
| [`MCPhaseGate`](qiskit.circuit.library.MCPhaseGate "qiskit.circuit.library.MCPhaseGate")(lam, num\_ctrl\_qubits\[, label, ...]) | Multi-controlled-Phase gate. |
| [`MCXGate`](qiskit.circuit.library.MCXGate "qiskit.circuit.library.MCXGate")(\[num\_ctrl\_qubits, label, ...]) | The general, multi-controlled X gate. |
| [`MCXGrayCode`](qiskit.circuit.library.MCXGrayCode "qiskit.circuit.library.MCXGrayCode")(\[num\_ctrl\_qubits, label, ...]) | Implement the multi-controlled X gate using the Gray code. |
@ -261,6 +262,7 @@ These [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCi
| [`HiddenLinearFunction`](qiskit.circuit.library.HiddenLinearFunction "qiskit.circuit.library.HiddenLinearFunction")(adjacency\_matrix) | Circuit to solve the hidden linear function problem. |
| [`IQP`](qiskit.circuit.library.IQP "qiskit.circuit.library.IQP")(interactions) | Instantaneous quantum polynomial (IQP) circuit. |
| [`QuantumVolume`](qiskit.circuit.library.QuantumVolume "qiskit.circuit.library.QuantumVolume")(num\_qubits\[, depth, seed, ...]) | A quantum volume model circuit. |
| [`quantum_volume`](qiskit.circuit.library.quantum_volume "qiskit.circuit.library.quantum_volume")(num\_qubits\[, depth, seed]) | A quantum volume model circuit. |
| [`PhaseEstimation`](qiskit.circuit.library.PhaseEstimation "qiskit.circuit.library.PhaseEstimation")(num\_evaluation\_qubits, unitary) | Phase Estimation circuit. |
| [`GroverOperator`](qiskit.circuit.library.GroverOperator "qiskit.circuit.library.GroverOperator")(oracle\[, state\_preparation, ...]) | The Grover operator. |
| [`PhaseOracle`](qiskit.circuit.library.PhaseOracle "qiskit.circuit.library.PhaseOracle")(expression\[, synthesizer, var\_order]) | Phase Oracle. |

View File

@ -20,7 +20,7 @@ The machinery in this module is for defining subclasses of [`Instruction`](qiski
* There is a regular class called `XGate`, which derives from [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate").
* Doing something like `XGate(label="my_gate")` produces an object whose type is exactly `XGate`, and all the mutability works completely as expected; all the methods resolve to exactly those defined by [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate"), [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"), or parents.
* Doing `XGate()` produces a singleton object whose type is a synthetic `_SingletonXGate` class, which derives [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") but overrides [`__setattr__()`](https://docs.python.org/3/reference/datamodel.html#object.__setattr__ "(in Python v3.12)") to make itself immutable. The object itself has precisely the same instance attributes as `XGate()` would have if there was no singleton handling. This object will return itself under [`copy()`](https://docs.python.org/3/library/copy.html#copy.copy "(in Python v3.12)"), [`deepcopy()`](https://docs.python.org/3/library/copy.html#copy.deepcopy "(in Python v3.12)") and roundtrip through [`pickle`](https://docs.python.org/3/library/pickle.html#module-pickle "(in Python v3.12)").
* Doing `XGate()` produces a singleton object whose type is a synthetic `_SingletonXGate` class, which derives [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") but overrides [`__setattr__()`](https://docs.python.org/3/reference/datamodel.html#object.__setattr__ "(in Python v3.13)") to make itself immutable. The object itself has precisely the same instance attributes as `XGate()` would have if there was no singleton handling. This object will return itself under [`copy()`](https://docs.python.org/3/library/copy.html#copy.copy "(in Python v3.13)"), [`deepcopy()`](https://docs.python.org/3/library/copy.html#copy.deepcopy "(in Python v3.13)") and roundtrip through [`pickle`](https://docs.python.org/3/library/pickle.html#module-pickle "(in Python v3.13)").
The same can be true for, for example, [`Measure`](circuit#qiskit.circuit.Measure "qiskit.circuit.Measure"), except that its a subclass of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") only, and not [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate").
@ -68,7 +68,7 @@ The public classes correspond to the standard classes [`Instruction`](qiskit.cir
This class is very similar to [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction"), except implies unitary [`ControlledGate`](qiskit.circuit.ControlledGate "qiskit.circuit.ControlledGate") semantics as well. The same caveats around setting attributes in that class apply here as well.
</Class>
When inheriting from one of these classes, the produced class will have an eagerly created singleton instance that will be returned whenever the class is constructed with arguments that have been defined to be singletons. Typically this will be the defaults. These instances are immutable; attempts to modify their properties will raise [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.12)").
When inheriting from one of these classes, the produced class will have an eagerly created singleton instance that will be returned whenever the class is constructed with arguments that have been defined to be singletons. Typically this will be the defaults. These instances are immutable; attempts to modify their properties will raise [`TypeError`](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.13)").
*All* subclasses of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction") have a [`mutable`](qiskit.circuit.Instruction#mutable "qiskit.circuit.Instruction.mutable") property. For most instructions this is `True`, while for the singleton instances it is `False`. One can use the [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable") method to get a version of the instruction that is owned and safe to mutate.
@ -78,11 +78,11 @@ The singleton instances are not exact instances of their base class; they are sp
type(XGate()) is not XGate
```
You should not rely on [`type`](https://docs.python.org/3/library/functions.html#type "(in Python v3.12)") having an exact value; use [`isinstance()`](https://docs.python.org/3/library/functions.html#isinstance "(in Python v3.12)") instead for type checking. If you need to reliably retrieve the base class from an [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"), see the [`Instruction.base_class`](qiskit.circuit.Instruction#base_class "qiskit.circuit.Instruction.base_class") attribute; singleton instances set this correctly. For most cases in using Qiskit, [`Instruction.name`](qiskit.circuit.Instruction#name "qiskit.circuit.Instruction.name") is a more suitable determiner of what an instruction “means” in a circuit.
You should not rely on [`type`](https://docs.python.org/3/library/functions.html#type "(in Python v3.13)") having an exact value; use [`isinstance()`](https://docs.python.org/3/library/functions.html#isinstance "(in Python v3.13)") instead for type checking. If you need to reliably retrieve the base class from an [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"), see the [`Instruction.base_class`](qiskit.circuit.Instruction#base_class "qiskit.circuit.Instruction.base_class") attribute; singleton instances set this correctly. For most cases in using Qiskit, [`Instruction.name`](qiskit.circuit.Instruction#name "qiskit.circuit.Instruction.name") is a more suitable determiner of what an instruction “means” in a circuit.
### Deriving new singletons
The simplest example of deriving a new singleton instruction is simply to inherit from the correct base and supply an [`__init__()`](https://docs.python.org/3/reference/datamodel.html#object.__init__ "(in Python v3.12)") method that has immutable defaults for any arguments. For example:
The simplest example of deriving a new singleton instruction is simply to inherit from the correct base and supply an [`__init__()`](https://docs.python.org/3/reference/datamodel.html#object.__init__ "(in Python v3.13)") method that has immutable defaults for any arguments. For example:
```python
from qiskit.circuit.singleton import SingletonInstruction
@ -177,7 +177,7 @@ The case of the class being instantiated with zero arguments is handled speciall
This section is primarily developer documentation for the code; none of the machinery described here is public, and it is not safe to inherit from any of it directly.
</Admonition>
There are several moving parts to tackle here. The behavior of having `XGate()` return some singleton object that is an (inexact) instance of [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") but *without* calling `__init__` requires us to override [`type.__call__`](https://docs.python.org/3/library/functions.html#type "(in Python v3.12)"). This means that [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") must have a metaclass that defines `__call__` to return the singleton instance.
There are several moving parts to tackle here. The behavior of having `XGate()` return some singleton object that is an (inexact) instance of [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") but *without* calling `__init__` requires us to override [`type.__call__`](https://docs.python.org/3/library/functions.html#type "(in Python v3.13)"). This means that [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") must have a metaclass that defines `__call__` to return the singleton instance.
Next, we need to ensure that there *is* a singleton instance for `XGate()` to return. This can be done dynamically on each call (i.e. check if the instance exists and create it if not), but since we also want that instance to be very special, its easier to hook in and create it during the definition of the `XGate` type object. This also has the advantage that we do not need to make the singleton object pickleable; we only need to specify where to retrieve it from during the unpickle, because the creation of the base type object will recreate the singleton.
@ -198,9 +198,9 @@ We could do this entirely within the metaclass machinery, but that would require
class XGate(Gate, metaclass=_SingletonMeta, overrides=_SingletonGateOverrides): ...
```
which is super inconvenient (or wed have to have `_SingletonMeta` do a bunch of fragile introspection). Instead, we use the [`abc.ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.12)")/[`abc.ABCMeta`](https://docs.python.org/3/library/abc.html#abc.ABCMeta "(in Python v3.12)") pattern of defining a concrete middle class ([`SingletonGate`](#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") in the [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") case) that sets the metaclass, selects the overrides to be applied, and has an [`__init_subclass__()`](https://docs.python.org/3/reference/datamodel.html#object.__init_subclass__ "(in Python v3.12)") that applies the singleton-subclass-creation steps above. The overrides are in separate classes so that *mutable* [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") instances do not have them in their own method-resolution orders; doing this is easier to implement, but requires all the setters and checkers to dance around at runtime trying to validate whether mutating the instance is allowed.
which is super inconvenient (or wed have to have `_SingletonMeta` do a bunch of fragile introspection). Instead, we use the [`abc.ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.13)")/[`abc.ABCMeta`](https://docs.python.org/3/library/abc.html#abc.ABCMeta "(in Python v3.13)") pattern of defining a concrete middle class ([`SingletonGate`](#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") in the [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") case) that sets the metaclass, selects the overrides to be applied, and has an [`__init_subclass__()`](https://docs.python.org/3/reference/datamodel.html#object.__init_subclass__ "(in Python v3.13)") that applies the singleton-subclass-creation steps above. The overrides are in separate classes so that *mutable* [`XGate`](qiskit.circuit.library.XGate "qiskit.circuit.library.XGate") instances do not have them in their own method-resolution orders; doing this is easier to implement, but requires all the setters and checkers to dance around at runtime trying to validate whether mutating the instance is allowed.
Finally, to actually build all this machinery up, the base is `_SingletonMeta`, which is a metaclass compatible with any metaclass of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"). This defines the [`__call__()`](https://docs.python.org/3/reference/datamodel.html#object.__call__ "(in Python v3.12)") machinery that overrides [`type.__call__`](https://docs.python.org/3/library/functions.html#type "(in Python v3.12)") to return the singleton instances. The other component of it is its [`__new__()`](https://docs.python.org/3/reference/datamodel.html#object.__new__ "(in Python v3.12)"), which is called (non-trivially) during the creation of [`SingletonGate`](#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") and [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") with its `overrides` keyword argument set to define the `__init_subclass__` of those classes with the above properties. We use the metaclass to add this method dynamically, because the [`__init_subclass__()`](https://docs.python.org/3/reference/datamodel.html#object.__init_subclass__ "(in Python v3.12)") machinery wants to be abstract, closing over the `overrides` and the base class, but still able to call [`super`](https://docs.python.org/3/library/functions.html#super "(in Python v3.12)"). Its more convenient to do this dynamically, closing over the desired class variable and using the two-argument form of [`super`](https://docs.python.org/3/library/functions.html#super "(in Python v3.12)"), since the zero-argument form does magic introspection based on where its containing function was defined.
Finally, to actually build all this machinery up, the base is `_SingletonMeta`, which is a metaclass compatible with any metaclass of [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.Instruction"). This defines the [`__call__()`](https://docs.python.org/3/reference/datamodel.html#object.__call__ "(in Python v3.13)") machinery that overrides [`type.__call__`](https://docs.python.org/3/library/functions.html#type "(in Python v3.13)") to return the singleton instances. The other component of it is its [`__new__()`](https://docs.python.org/3/reference/datamodel.html#object.__new__ "(in Python v3.13)"), which is called (non-trivially) during the creation of [`SingletonGate`](#qiskit.circuit.singleton.SingletonGate "qiskit.circuit.singleton.SingletonGate") and [`SingletonInstruction`](#qiskit.circuit.singleton.SingletonInstruction "qiskit.circuit.singleton.SingletonInstruction") with its `overrides` keyword argument set to define the `__init_subclass__` of those classes with the above properties. We use the metaclass to add this method dynamically, because the [`__init_subclass__()`](https://docs.python.org/3/reference/datamodel.html#object.__init_subclass__ "(in Python v3.13)") machinery wants to be abstract, closing over the `overrides` and the base class, but still able to call [`super`](https://docs.python.org/3/library/functions.html#super "(in Python v3.13)"). Its more convenient to do this dynamically, closing over the desired class variable and using the two-argument form of [`super`](https://docs.python.org/3/library/functions.html#super "(in Python v3.13)"), since the zero-argument form does magic introspection based on where its containing function was defined.
Handling multiple singletons requires storing the initialization arguments in some form, to allow the [`to_mutable()`](qiskit.circuit.Instruction#to_mutable "qiskit.circuit.Instruction.to_mutable") method and pickling to be defined. We do this as a lookup dictionary on the singleton *type object*. This is logically an instance attribute, but because we need to dynamically switch in the dynamic \_Singleton type onto an instance of the base type, that gets rather complex; either we have to require that the base already has an instance dictionary, or we risk breaking the `__slots__` layout during the switch. Since the singletons have lifetimes that last until garbage collection of their base classs type object, we can fake out this instance dictionary using a type-object dictionary that maps instance pointers to the data we want to store. An alternative would be to build a new type object for each individual singleton that closes over (or stores) the initializer arguments, but type objects are quite heavy and the principle is largely same anyway.

View File

@ -20,7 +20,7 @@ python_api_name: qiskit.compiler
### assemble
<Function id="qiskit.compiler.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L44-L189" signature="qiskit.compiler.assemble(experiments, backend=None, qobj_id=None, qobj_header=None, shots=None, memory=False, seed_simulator=None, qubit_lo_freq=None, meas_lo_freq=None, qubit_lo_range=None, meas_lo_range=None, schedule_los=None, meas_level=MeasLevel.CLASSIFIED, meas_return=MeasReturnType.AVERAGE, meas_map=None, memory_slot_size=100, rep_time=None, rep_delay=None, parameter_binds=None, parametric_pulses=None, init_qubits=True, **run_config)">
<Function id="qiskit.compiler.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/compiler/assembler.py#L44-L189" signature="qiskit.compiler.assemble(experiments, backend=None, qobj_id=None, qobj_header=None, shots=None, memory=False, seed_simulator=None, qubit_lo_freq=None, meas_lo_freq=None, qubit_lo_range=None, meas_lo_range=None, schedule_los=None, meas_level=MeasLevel.CLASSIFIED, meas_return=MeasReturnType.AVERAGE, meas_map=None, memory_slot_size=100, rep_time=None, rep_delay=None, parameter_binds=None, parametric_pulses=None, init_qubits=True, **run_config)">
Assemble a list of circuits or pulse schedules into a `Qobj`.
This function serializes the payloads, which could be either circuits or schedules, to create `Qobj` “experiments”. It further annotates the experiment payload with header and configurations.
@ -33,33 +33,33 @@ python_api_name: qiskit.compiler
**Parameters**
* **experiments** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*] |* [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")*] |* [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock")*]*) Circuit(s) or pulse schedule(s) to execute
* **experiments** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*] |* [*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")*] |* [*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock")*]*) Circuit(s) or pulse schedule(s) to execute
* **backend** ([*Backend*](qiskit.providers.Backend "qiskit.providers.backend.Backend") *| None*) If set, some runtime options are automatically grabbed from `backend.configuration()` and `backend.defaults()`. If any other option is explicitly set (e.g., `rep_time`), it will override the backends. If any other options is set in the run\_config, it will also override the backends.
* **qobj\_id** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) String identifier to annotate the `Qobj`
* **qobj\_id** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) String identifier to annotate the `Qobj`
* **qobj\_header** ([*QobjHeader*](qiskit.qobj.QobjHeader "qiskit.qobj.common.QobjHeader") *|*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)") *| None*) User input that will be inserted in `Qobj` header, and will also be copied to the corresponding Result header. Headers do not affect the run.
* **qobj\_header** ([*QobjHeader*](qiskit.qobj.QobjHeader "qiskit.qobj.common.QobjHeader") *|*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)") *| None*) User input that will be inserted in `Qobj` header, and will also be copied to the corresponding Result header. Headers do not affect the run.
* **shots** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) Number of repetitions of each circuit, for sampling. Default: 1024 or `max_shots` from the backend configuration, whichever is smaller
* **shots** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) Number of repetitions of each circuit, for sampling. Default: 1024 or `max_shots` from the backend configuration, whichever is smaller
* **memory** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) If `True`, per-shot measurement bitstrings are returned as well (provided the backend supports it). For OpenPulse jobs, only measurement level 2 supports this option.
* **memory** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) If `True`, per-shot measurement bitstrings are returned as well (provided the backend supports it). For OpenPulse jobs, only measurement level 2 supports this option.
* **seed\_simulator** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) Random seed to control sampling, for when backend is a simulator
* **seed\_simulator** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) Random seed to control sampling, for when backend is a simulator
* **qubit\_lo\_freq** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None*) List of job level qubit drive LO frequencies in Hz. Overridden by `schedule_los` if specified. Must have length `n_qubits.`
* **qubit\_lo\_freq** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None*) List of job level qubit drive LO frequencies in Hz. Overridden by `schedule_los` if specified. Must have length `n_qubits.`
* **meas\_lo\_freq** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None*) List of measurement LO frequencies in Hz. Overridden by `schedule_los` if specified. Must have length `n_qubits.`
* **meas\_lo\_freq** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None*) List of measurement LO frequencies in Hz. Overridden by `schedule_los` if specified. Must have length `n_qubits.`
* **qubit\_lo\_range** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None*) List of job level drive LO ranges each of form `[range_min, range_max]` in Hz. Used to validate `qubit_lo_freq`. Must have length `n_qubits.`
* **qubit\_lo\_range** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None*) List of job level drive LO ranges each of form `[range_min, range_max]` in Hz. Used to validate `qubit_lo_freq`. Must have length `n_qubits.`
* **meas\_lo\_range** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None*) List of job level measurement LO ranges each of form `[range_min, range_max]` in Hz. Used to validate `meas_lo_freq`. Must have length `n_qubits.`
* **meas\_lo\_range** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None*) List of job level measurement LO ranges each of form `[range_min, range_max]` in Hz. Used to validate `meas_lo_freq`. Must have length `n_qubits.`
* **schedule\_los** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")*\[PulseChannel,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | LoConfig] |* [*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")*\[PulseChannel,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | LoConfig | None*) Experiment level (ie circuit or schedule) LO frequency configurations for qubit drive and measurement channels. These values override the job level values from `default_qubit_los` and `default_meas_los`. Frequencies are in Hz. Settable for OpenQASM 2 and pulse jobs.
* **schedule\_los** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)")*\[PulseChannel,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | LoConfig] |* [*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)")*\[PulseChannel,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | LoConfig | None*) Experiment level (ie circuit or schedule) LO frequency configurations for qubit drive and measurement channels. These values override the job level values from `default_qubit_los` and `default_meas_los`. Frequencies are in Hz. Settable for OpenQASM 2 and pulse jobs.
* **meas\_level** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| MeasLevel*) Set the appropriate level of the measurement output for pulse experiments.
* **meas\_level** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| MeasLevel*) Set the appropriate level of the measurement output for pulse experiments.
* **meas\_return** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| MeasReturnType*)
* **meas\_return** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| MeasReturnType*)
Level of measurement data for the backend to return.
@ -68,17 +68,17 @@ python_api_name: qiskit.compiler
* `single` returns information from every shot.
* `avg` returns average measurement output (averaged over number of shots).
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Qubit*](circuit#qiskit.circuit.Qubit "qiskit.circuit.quantumregister.Qubit")*]] | None*) List of lists, containing qubits that must be measured together.
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Qubit*](circuit#qiskit.circuit.Qubit "qiskit.circuit.quantumregister.Qubit")*]] | None*) List of lists, containing qubits that must be measured together.
* **memory\_slot\_size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Size of each memory slot if the output is Level 0.
* **memory\_slot\_size** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Size of each memory slot if the output is Level 0.
* **rep\_time** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Time per program execution in seconds. Must be from the list provided by the backend (`backend.configuration().rep_times`). Defaults to the first entry.
* **rep\_time** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Time per program execution in seconds. Must be from the list provided by the backend (`backend.configuration().rep_times`). Defaults to the first entry.
* **rep\_delay** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Delay between programs in seconds. Only supported on certain backends (if `backend.configuration().dynamic_reprate_enabled=True`). If supported, `rep_delay` will be used instead of `rep_time` and must be from the range supplied by the backend (`backend.configuration().rep_delay_range`). Default is given by `backend.configuration().default_rep_delay`.
* **rep\_delay** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) Delay between programs in seconds. Only supported on certain backends (if `backend.configuration().dynamic_reprate_enabled=True`). If supported, `rep_delay` will be used instead of `rep_time` and must be from the range supplied by the backend (`backend.configuration().rep_delay_range`). Default is given by `backend.configuration().default_rep_delay`.
* **parameter\_binds** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")*\[*[*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.parameter.Parameter")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*]] | None*) List of Parameter bindings over which the set of experiments will be executed. Each list element (bind) should be of the form \{Parameter1: value1, Parameter2: value2, …}. All binds will be executed across all experiments; e.g., if parameter\_binds is a length-n list, and there are m experiments, a total of m x n experiments will be run (one for each experiment/bind pair).
* **parameter\_binds** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)")*\[*[*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.parameter.Parameter")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*]] | None*) List of Parameter bindings over which the set of experiments will be executed. Each list element (bind) should be of the form \{Parameter1: value1, Parameter2: value2, …}. All binds will be executed across all experiments; e.g., if parameter\_binds is a length-n list, and there are m experiments, a total of m x n experiments will be run (one for each experiment/bind pair).
* **parametric\_pulses** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*] | None*)
* **parametric\_pulses** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*] | None*)
A list of pulse shapes which are supported internally on the backend. Example:
@ -86,9 +86,9 @@ python_api_name: qiskit.compiler
['gaussian', 'constant']
```
* **init\_qubits** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Whether to reset the qubits to the ground state for each shot. Default: `True`.
* **init\_qubits** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Whether to reset the qubits to the ground state for each shot. Default: `True`.
* **\*\*run\_config** ([*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")) Extra arguments used to configure the run (e.g., for Aer configurable backends). Refer to the backend documentation for details on these arguments.
* **\*\*run\_config** ([*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)")) Extra arguments used to configure the run (e.g., for Aer configurable backends). Refer to the backend documentation for details on these arguments.
**Returns**
@ -110,12 +110,12 @@ python_api_name: qiskit.compiler
**Parameters**
* **circuits** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) The quantum circuit or circuits to translate
* **circuits** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) The quantum circuit or circuits to translate
* **backend** ([*Backend*](qiskit.providers.Backend "qiskit.providers.backend.Backend") *| None*) A backend instance, which contains hardware-specific data required for scheduling
* **inst\_map** ([*InstructionScheduleMap*](qiskit.pulse.InstructionScheduleMap "qiskit.pulse.instruction_schedule_map.InstructionScheduleMap") *| None*) Mapping of circuit operations to pulse schedules. If `None`, defaults to the `backend`s `instruction_schedule_map`
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]] | None*) List of sets of qubits that must be measured together. If `None`, defaults to the `backend`s `meas_map`
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") *| None*) The output sample rate of backend control electronics. For scheduled circuits which contain time information, dt is required. If not provided, it will be obtained from the backend configuration
* **method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*] | None*) Optionally specify a particular scheduling method
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]] | None*) List of sets of qubits that must be measured together. If `None`, defaults to the `backend`s `meas_map`
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *| None*) The output sample rate of backend control electronics. For scheduled circuits which contain time information, dt is required. If not provided, it will be obtained from the backend configuration
* **method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*] | None*) Optionally specify a particular scheduling method
**Returns**
@ -127,7 +127,7 @@ python_api_name: qiskit.compiler
**Return type**
[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") | [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")]
[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") | [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")]
</Function>
### transpile
@ -155,11 +155,11 @@ python_api_name: qiskit.compiler
* **backend** ([*Backend*](qiskit.providers.Backend "qiskit.providers.backend.Backend") *| None*) If set, the transpiler will compile the input circuit to this target device. If any other option is explicitly set (e.g., `coupling_map`), it will override the backends.
* **basis\_gates** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*] | None*) List of basis gate names to unroll to (e.g: `['u1', 'u2', 'u3', 'cx']`). If `None`, do not unroll.
* **basis\_gates** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*] | None*) List of basis gate names to unroll to (e.g: `['u1', 'u2', 'u3', 'cx']`). If `None`, do not unroll.
* **inst\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*InstructionScheduleMap*](qiskit.pulse.InstructionScheduleMap "qiskit.pulse.instruction_schedule_map.InstructionScheduleMap")*] | None*) Mapping of unrolled gates to pulse schedules. If this is not provided, transpiler tries to get from the backend. If any user defined calibration is found in the map and this is used in a circuit, transpiler attaches the custom gate definition to the circuit. This enables one to flexibly override the low-level instruction implementation. This feature is available iff the backend supports the pulse gate experiment.
* **inst\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*InstructionScheduleMap*](qiskit.pulse.InstructionScheduleMap "qiskit.pulse.instruction_schedule_map.InstructionScheduleMap")*] | None*) Mapping of unrolled gates to pulse schedules. If this is not provided, transpiler tries to get from the backend. If any user defined calibration is found in the map and this is used in a circuit, transpiler attaches the custom gate definition to the circuit. This enables one to flexibly override the low-level instruction implementation. This feature is available iff the backend supports the pulse gate experiment.
* **coupling\_map** ([*CouplingMap*](qiskit.transpiler.CouplingMap "qiskit.transpiler.coupling.CouplingMap") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]] | None*)
* **coupling\_map** ([*CouplingMap*](qiskit.transpiler.CouplingMap "qiskit.transpiler.coupling.CouplingMap") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]] | None*)
Directed coupling map (perhaps custom) to target in mapping. If the coupling map is symmetric, both directions need to be specified.
@ -170,7 +170,7 @@ python_api_name: qiskit.compiler
* **backend\_properties** ([*BackendProperties*](qiskit.providers.models.BackendProperties "qiskit.providers.models.backendproperties.BackendProperties") *| None*) properties returned by a backend, including information on gate errors, readout errors, qubit coherence times, etc. Find a backend that provides this information with: `backend.properties()`
* **initial\_layout** ([*Layout*](qiskit.transpiler.Layout "qiskit.transpiler.layout.Layout") *|*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)") *| None*)
* **initial\_layout** ([*Layout*](qiskit.transpiler.Layout "qiskit.transpiler.layout.Layout") *|*[*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)") *| None*)
Initial position of virtual qubits on physical qubits. If this layout makes the circuit compatible with the coupling\_map constraints, it will be used. The final layout is not guaranteed to be the same, as the transpiler may permute qubits through swaps or other means. Multiple formats are supported:
@ -206,21 +206,21 @@ python_api_name: qiskit.compiler
[qr[0], None, None, qr[1], None, qr[2]]
```
* **layout\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of layout selection pass (trivial, dense, sabre). This can also be the external plugin name to use for the `layout` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"layout"` for the `stage_name` argument.
* **layout\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of layout selection pass (trivial, dense, sabre). This can also be the external plugin name to use for the `layout` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"layout"` for the `stage_name` argument.
* **routing\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of routing pass (basic, lookahead, stochastic, sabre, none). Note This can also be the external plugin name to use for the `routing` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"routing"` for the `stage_name` argument.
* **routing\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of routing pass (basic, lookahead, stochastic, sabre, none). Note This can also be the external plugin name to use for the `routing` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"routing"` for the `stage_name` argument.
* **translation\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of translation pass (unroller, translator, synthesis) This can also be the external plugin name to use for the `translation` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"translation"` for the `stage_name` argument.
* **translation\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of translation pass (unroller, translator, synthesis) This can also be the external plugin name to use for the `translation` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"translation"` for the `stage_name` argument.
* **scheduling\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of scheduling pass. \* `'as_soon_as_possible'`: Schedule instructions greedily, as early as possible on a qubit resource. (alias: `'asap'`) \* `'as_late_as_possible'`: Schedule instructions late, i.e. keeping qubits in the ground state when possible. (alias: `'alap'`) If `None`, no scheduling will be done. This can also be the external plugin name to use for the `scheduling` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"scheduling"` for the `stage_name` argument.
* **scheduling\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of scheduling pass. \* `'as_soon_as_possible'`: Schedule instructions greedily, as early as possible on a qubit resource. (alias: `'asap'`) \* `'as_late_as_possible'`: Schedule instructions late, i.e. keeping qubits in the ground state when possible. (alias: `'alap'`) If `None`, no scheduling will be done. This can also be the external plugin name to use for the `scheduling` stage. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"scheduling"` for the `stage_name` argument.
* **instruction\_durations** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None,* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*,* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*]] |* [*InstructionDurations*](qiskit.transpiler.InstructionDurations "qiskit.transpiler.instruction_durations.InstructionDurations") *| None*) Durations of instructions. Applicable only if scheduling\_method is specified. The gate lengths defined in `backend.properties` are used as default. They are overwritten if this `instruction_durations` is specified. The format of `instruction_durations` must be as follows. The instruction\_durations must be given as a list of tuples \[(instruction\_name, qubits, duration, unit), …]. | \[(cx, \[0, 1], 12.3, ns), (u3, \[0], 4.56, ns)] | \[(cx, \[0, 1], 1000), (u3, \[0], 300)] If unit is omitted, the default is dt, which is a sample time depending on backend. If the time unit is dt, the duration must be an integer.
* **instruction\_durations** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None,* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*,* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]] |* [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*,* [*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] | None,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*]] |* [*InstructionDurations*](qiskit.transpiler.InstructionDurations "qiskit.transpiler.instruction_durations.InstructionDurations") *| None*) Durations of instructions. Applicable only if scheduling\_method is specified. The gate lengths defined in `backend.properties` are used as default. They are overwritten if this `instruction_durations` is specified. The format of `instruction_durations` must be as follows. The instruction\_durations must be given as a list of tuples \[(instruction\_name, qubits, duration, unit), …]. | \[(cx, \[0, 1], 12.3, ns), (u3, \[0], 4.56, ns)] | \[(cx, \[0, 1], 1000), (u3, \[0], 300)] If unit is omitted, the default is dt, which is a sample time depending on backend. If the time unit is dt, the duration must be an integer.
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") *| None*) Backend sample time (resolution) in seconds. If `None` (default), `backend.configuration().dt` is used.
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *| None*) Backend sample time (resolution) in seconds. If `None` (default), `backend.configuration().dt` is used.
* **approximation\_degree** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) heuristic dial used for circuit approximation (1.0=no approximation, 0.0=maximal approximation)
* **approximation\_degree** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) heuristic dial used for circuit approximation (1.0=no approximation, 0.0=maximal approximation)
* **timing\_constraints** ([*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] | None*)
* **timing\_constraints** ([*Dict*](https://docs.python.org/3/library/typing.html#typing.Dict "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] | None*)
An optional control hardware restriction on instruction time resolution. A quantum computer backend may report a set of restrictions, namely:
@ -231,9 +231,9 @@ python_api_name: qiskit.compiler
This information will be provided by the backend configuration. If the backend doesnt have any restriction on the instruction time allocation, then `timing_constraints` is None and no adjustment will be performed.
* **seed\_transpiler** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) Sets random seed for the stochastic parts of the transpiler
* **seed\_transpiler** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) Sets random seed for the stochastic parts of the transpiler
* **optimization\_level** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*)
* **optimization\_level** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*)
How much optimization to perform on the circuits. Higher levels generate more optimized circuits, at the expense of longer transpilation time.
@ -244,7 +244,7 @@ python_api_name: qiskit.compiler
If `None`, level 2 will be chosen as default.
* **callback** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.12)")*\[\[BasePass,* [*DAGCircuit*](qiskit.dagcircuit.DAGCircuit "qiskit._accelerate.circuit.DAGCircuit")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*,* [*PropertySet*](qiskit.passmanager.PropertySet "qiskit.passmanager.compilation_status.PropertySet")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.12)")*] | None*)
* **callback** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.13)")*\[\[BasePass,* [*DAGCircuit*](qiskit.dagcircuit.DAGCircuit "qiskit._accelerate.circuit.DAGCircuit")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*,* [*PropertySet*](qiskit.passmanager.PropertySet "qiskit.passmanager.compilation_status.PropertySet")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*],* [*Any*](https://docs.python.org/3/library/typing.html#typing.Any "(in Python v3.13)")*] | None*)
A callback function that will be called after each pass execution. The function will be called with 5 keyword arguments, | `pass_`: the pass being run. | `dag`: the dag output of the pass. | `time`: the time to execute the pass. | `property_set`: the property set. | `count`: the index for the pass execution. The exact arguments passed expose the internals of the pass manager, and are subject to change as the pass manager internals change. If you intend to reuse a callback function over multiple releases, be sure to check that the arguments being passed are the same. To use the callback feature, define a function that will take in kwargs dict and access the variables. For example:
@ -259,25 +259,25 @@ python_api_name: qiskit.compiler
transpile(circ, callback=callback_func)
```
* **output\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*] | None*) A list with strings to identify the output circuits. The length of the list should be exactly the length of the `circuits` parameter.
* **output\_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*] | None*) A list with strings to identify the output circuits. The length of the list should be exactly the length of the `circuits` parameter.
* **unitary\_synthesis\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the unitary synthesis method to use. By default `'default'` is used. You can see a list of installed plugins with [`unitary_synthesis_plugin_names()`](qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names "qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names").
* **unitary\_synthesis\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the unitary synthesis method to use. By default `'default'` is used. You can see a list of installed plugins with [`unitary_synthesis_plugin_names()`](qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names "qiskit.transpiler.passes.synthesis.plugin.unitary_synthesis_plugin_names").
* **unitary\_synthesis\_plugin\_config** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)") *| None*) An optional configuration dictionary that will be passed directly to the unitary synthesis plugin. By default this setting will have no effect as the default unitary synthesis method does not take custom configuration. This should only be necessary when a unitary synthesis plugin is specified with the `unitary_synthesis_method` argument. As this is custom for each unitary synthesis plugin refer to the plugin documentation for how to use this option.
* **unitary\_synthesis\_plugin\_config** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)") *| None*) An optional configuration dictionary that will be passed directly to the unitary synthesis plugin. By default this setting will have no effect as the default unitary synthesis method does not take custom configuration. This should only be necessary when a unitary synthesis plugin is specified with the `unitary_synthesis_method` argument. As this is custom for each unitary synthesis plugin refer to the plugin documentation for how to use this option.
* **target** ([*Target*](qiskit.transpiler.Target "qiskit.transpiler.target.Target") *| None*) A backend transpiler target. Normally this is specified as part of the `backend` argument, but if you have manually constructed a [`Target`](qiskit.transpiler.Target "qiskit.transpiler.Target") object you can specify it manually here. This will override the target from `backend`.
* **hls\_config** ([*HLSConfig*](qiskit.transpiler.passes.HLSConfig "qiskit.transpiler.passes.synthesis.high_level_synthesis.HLSConfig") *| None*) An optional configuration class `HLSConfig` that will be passed directly to `HighLevelSynthesis` transformation pass. This configuration class allows to specify for various high-level objects the lists of synthesis algorithms and their parameters.
* **init\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) The plugin name to use for the `init` stage. By default an external plugin is not used. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"init"` for the stage name argument.
* **init\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) The plugin name to use for the `init` stage. By default an external plugin is not used. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"init"` for the stage name argument.
* **optimization\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) The plugin name to use for the `optimization` stage. By default an external plugin is not used. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"optimization"` for the `stage_name` argument.
* **optimization\_method** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) The plugin name to use for the `optimization` stage. By default an external plugin is not used. You can see a list of installed plugins by using [`list_stage_plugins()`](transpiler_plugins#qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins "qiskit.transpiler.preset_passmanagers.plugin.list_stage_plugins") with `"optimization"` for the `stage_name` argument.
* **ignore\_backend\_supplied\_default\_methods** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If set to `True` any default methods specified by a backend will be ignored. Some backends specify alternative default methods to support custom compilation target-specific passes/plugins which support backend-specific compilation techniques. If youd prefer that these defaults were not used this option is used to disable those backend-specific defaults.
* **ignore\_backend\_supplied\_default\_methods** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If set to `True` any default methods specified by a backend will be ignored. Some backends specify alternative default methods to support custom compilation target-specific passes/plugins which support backend-specific compilation techniques. If youd prefer that these defaults were not used this option is used to disable those backend-specific defaults.
* **num\_processes** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) The maximum number of parallel processes to launch for this call to transpile if parallel execution is enabled. This argument overrides `num_processes` in the user configuration file, and the `QISKIT_NUM_PROCS` environment variable. If set to `None` the system default or local user configuration will be used.
* **num\_processes** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) The maximum number of parallel processes to launch for this call to transpile if parallel execution is enabled. This argument overrides `num_processes` in the user configuration file, and the `QISKIT_NUM_PROCS` environment variable. If set to `None` the system default or local user configuration will be used.
* **qubits\_initially\_zero** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Indicates whether the input circuit is zero-initialized.
* **qubits\_initially\_zero** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Indicates whether the input circuit is zero-initialized.
**Returns**
@ -299,11 +299,11 @@ python_api_name: qiskit.compiler
**Parameters**
* **scheduled\_circuits** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) Scheduled circuit(s) to be translated
* **scheduled\_circuits** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *|*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*]*) Scheduled circuit(s) to be translated
* **backend** ([*Backend*](qiskit.providers.Backend "qiskit.providers.backend.Backend") *| None*) A backend instance, which contains hardware-specific data required for scheduling
* **inst\_map** ([*InstructionScheduleMap*](qiskit.pulse.InstructionScheduleMap "qiskit.pulse.instruction_schedule_map.InstructionScheduleMap") *| None*) Mapping of circuit operations to pulse schedules. If `None`, defaults to the `backend`s `instruction_schedule_map`
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]] | None*) List of sets of qubits that must be measured together. If `None`, defaults to the `backend`s `meas_map`
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") *| None*) The output sample rate of backend control electronics. For scheduled circuits which contain time information, dt is required. If not provided, it will be obtained from the backend configuration
* **meas\_map** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]] | None*) List of sets of qubits that must be measured together. If `None`, defaults to the `backend`s `meas_map`
* **dt** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *| None*) The output sample rate of backend control electronics. For scheduled circuits which contain time information, dt is required. If not provided, it will be obtained from the backend configuration
**Returns**
@ -315,6 +315,6 @@ python_api_name: qiskit.compiler
**Return type**
[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") | [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")]
[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") | [*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")\[[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")]
</Function>

View File

@ -30,9 +30,9 @@ python_api_name: qiskit.converters
**Parameters**
* **circuit** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) the input circuit.
* **parameter\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")) For parameterized circuits, a mapping from parameters in the circuit to parameters to be used in the instruction. If None, existing circuit parameters will also parameterize the instruction.
* **parameter\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) For parameterized circuits, a mapping from parameters in the circuit to parameters to be used in the instruction. If None, existing circuit parameters will also parameterize the instruction.
* **equivalence\_library** ([*EquivalenceLibrary*](qiskit.circuit.EquivalenceLibrary "qiskit.circuit.EquivalenceLibrary")) Optional equivalence library where the converted instruction will be registered.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Optional instruction label.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Optional instruction label.
**Raises**
@ -73,9 +73,9 @@ python_api_name: qiskit.converters
**Parameters**
* **circuit** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) the input circuit.
* **parameter\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")) For parameterized circuits, a mapping from parameters in the circuit to parameters to be used in the gate. If None, existing circuit parameters will also parameterize the Gate.
* **parameter\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) For parameterized circuits, a mapping from parameters in the circuit to parameters to be used in the gate. If None, existing circuit parameters will also parameterize the Gate.
* **equivalence\_library** ([*EquivalenceLibrary*](qiskit.circuit.EquivalenceLibrary "qiskit.circuit.EquivalenceLibrary")) Optional equivalence library where the converted gate will be registered.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Optional gate label.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Optional gate label.
**Raises**
@ -102,7 +102,7 @@ python_api_name: qiskit.converters
**Parameters**
* **circuit** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) the input circuit.
* **copy\_operations** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Deep copy the operation objects in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") for the output [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit"). This should only be set to `False` if the input [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") will not be used anymore as the operations in the output [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be shared instances and modifications to operations in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be reflected in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") (and vice versa).
* **copy\_operations** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Deep copy the operation objects in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") for the output [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit"). This should only be set to `False` if the input [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") will not be used anymore as the operations in the output [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be shared instances and modifications to operations in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be reflected in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") (and vice versa).
* **qubit\_order** (*Iterable\[*[*Qubit*](circuit#qiskit.circuit.Qubit "qiskit.circuit.Qubit")*] or None*) the order that the qubits should be indexed in the output DAG. Defaults to the same order as in the circuit.
* **clbit\_order** (*Iterable\[*[*Clbit*](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit")*] or None*) the order that the clbits should be indexed in the output DAG. Defaults to the same order as in the circuit.
@ -116,7 +116,7 @@ python_api_name: qiskit.converters
**Raises**
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") if the `qubit_order` or `clbit_order` parameters do not match the bits in the circuit.
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.13)") if the `qubit_order` or `clbit_order` parameters do not match the bits in the circuit.
**Example**
@ -144,7 +144,7 @@ python_api_name: qiskit.converters
**Parameters**
* **dag** ([*DAGCircuit*](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit")) the input dag.
* **copy\_operations** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Deep copy the operation objects in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") for the output [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). This should only be set to `False` if the input [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will not be used anymore as the operations in the output [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") will be shared instances and modifications to operations in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be reflected in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") (and vice versa).
* **copy\_operations** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Deep copy the operation objects in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") for the output [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"). This should only be set to `False` if the input [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will not be used anymore as the operations in the output [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") will be shared instances and modifications to operations in the [`DAGCircuit`](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit") will be reflected in the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") (and vice versa).
**Returns**
@ -208,7 +208,7 @@ python_api_name: qiskit.converters
**Parameters**
* **circuit** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) the input circuit.
* **create\_preds\_and\_succs** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) whether to construct lists of predecessors and successors for every node.
* **create\_preds\_and\_succs** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) whether to construct lists of predecessors and successors for every node.
**Returns**
@ -231,7 +231,7 @@ python_api_name: qiskit.converters
**Parameters**
* **dag** ([*DAGCircuit*](qiskit.dagcircuit.DAGCircuit "qiskit.dagcircuit.DAGCircuit")) the input dag.
* **create\_preds\_and\_succs** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) whether to construct lists of predecessors and successors for every node.
* **create\_preds\_and\_succs** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) whether to construct lists of predecessors and successors for every node.
**Returns**

View File

@ -64,7 +64,7 @@ Two more uncommon errors relate to failures in reading user-configuration files,
## Warnings
Some particular features of Qiskit may raise custom warnings. In general, Qiskit will use built-in Python warnings (such as [`DeprecationWarning`](https://docs.python.org/3/library/exceptions.html#DeprecationWarning "(in Python v3.12)")) when appropriate, but warnings related to Qiskit-specific functionality will be subtypes of [`QiskitWarning`](#qiskit.exceptions.QiskitWarning "qiskit.exceptions.QiskitWarning").
Some particular features of Qiskit may raise custom warnings. In general, Qiskit will use built-in Python warnings (such as [`DeprecationWarning`](https://docs.python.org/3/library/exceptions.html#DeprecationWarning "(in Python v3.13)")) when appropriate, but warnings related to Qiskit-specific functionality will be subtypes of [`QiskitWarning`](#qiskit.exceptions.QiskitWarning "qiskit.exceptions.QiskitWarning").
### QiskitWarning
@ -94,7 +94,7 @@ When experimental features are being used, Qiskit will raise [`ExperimentalWarni
### Filtering warnings
Python has built-in mechanisms to filter warnings, described in the documentation of the [`warnings`](https://docs.python.org/3/library/warnings.html#module-warnings "(in Python v3.12)") module. You can use these subclasses in your warning filters from within Python to silence warnings you are not interested in. For example, if you are knowingly using experimental features and are comfortable that they make break in later versions, you can silence [`ExperimentalWarning`](#qiskit.exceptions.ExperimentalWarning "qiskit.exceptions.ExperimentalWarning") like this:
Python has built-in mechanisms to filter warnings, described in the documentation of the [`warnings`](https://docs.python.org/3/library/warnings.html#module-warnings "(in Python v3.13)") module. You can use these subclasses in your warning filters from within Python to silence warnings you are not interested in. For example, if you are knowingly using experimental features and are comfortable that they make break in later versions, you can silence [`ExperimentalWarning`](#qiskit.exceptions.ExperimentalWarning "qiskit.exceptions.ExperimentalWarning") like this:
```python
import warnings

View File

@ -93,7 +93,7 @@ The V1 fake backends are based on a set of base classes:
**Parameters**
* **configuration** ([*BackendConfiguration*](qiskit.providers.models.BackendConfiguration "qiskit.providers.models.BackendConfiguration")) backend configuration
* **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) time to wait before returning result
* **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) time to wait before returning result
</Class>
### FakeQasmBackend
@ -110,7 +110,7 @@ The V1 fake backends are based on a set of base classes:
**Parameters**
* **configuration** ([*BackendConfiguration*](qiskit.providers.models.BackendConfiguration "qiskit.providers.models.BackendConfiguration")) backend configuration
* **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) time to wait before returning result
* **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) time to wait before returning result
</Class>
### FakePulseBackend
@ -127,6 +127,6 @@ The V1 fake backends are based on a set of base classes:
**Parameters**
* **configuration** ([*BackendConfiguration*](qiskit.providers.models.BackendConfiguration "qiskit.providers.models.BackendConfiguration")) backend configuration
* **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) time to wait before returning result
* **time\_alive** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) time to wait before returning result
</Class>

View File

@ -75,8 +75,8 @@ These are all instances of the same base class:
**Parameters**
* **operands** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")) The argument list.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Optional display name for this instruction.
* **operands** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")) The argument list.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Optional display name for this instruction.
</Class>
<span id="module-qiskit.pulse.library" />
@ -234,7 +234,7 @@ The canonicalization transforms convert schedules to a form amenable for executi
**Parameters**
* **schedule** ([*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Instruction*](#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")) Schedule to be aligned.
* **meas\_map** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]]*) List of lists of qubits that are measured together.
* **meas\_map** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]]*) List of lists of qubits that are measured together.
**Returns**
@ -294,10 +294,10 @@ The canonicalization transforms convert schedules to a form amenable for executi
* **schedules** (*Iterable\[ScheduleComponent]*) Collection of schedules to be aligned together
* **inst\_map** ([*InstructionScheduleMap*](qiskit.pulse.InstructionScheduleMap "qiskit.pulse.InstructionScheduleMap") *| None*) Mapping of circuit operations to pulse schedules
* **cal\_gate** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the gate to inspect for the calibration time
* **max\_calibration\_duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) If provided, inst\_map and cal\_gate will be ignored
* **align\_time** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) If provided, this will be used as final align time.
* **align\_all** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) Shift all instructions in the schedule such that they maintain their relative alignment with the shifted acquisition instruction. If `False` only the acquisition and measurement pulse instructions will be shifted.
* **cal\_gate** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the gate to inspect for the calibration time
* **max\_calibration\_duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) If provided, inst\_map and cal\_gate will be ignored
* **align\_time** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) If provided, this will be used as final align time.
* **align\_all** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) Shift all instructions in the schedule such that they maintain their relative alignment with the shifted acquisition instruction. If `False` only the acquisition and measurement pulse instructions will be shifted.
**Returns**
@ -309,7 +309,7 @@ The canonicalization transforms convert schedules to a form amenable for executi
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[Schedule](qiskit.pulse.Schedule "qiskit.pulse.Schedule")]
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")\[[Schedule](qiskit.pulse.Schedule "qiskit.pulse.Schedule")]
</Function>
#### block\_to\_schedule
@ -346,7 +346,7 @@ The canonicalization transforms convert schedules to a form amenable for executi
**Parameters**
**schedules** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*qiskit.pulse.schedule.Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")*]*) Schedules to compress.
**schedules** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*qiskit.pulse.schedule.Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")*]*) Schedules to compress.
**Returns**
@ -354,7 +354,7 @@ The canonicalization transforms convert schedules to a form amenable for executi
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.schedule.Schedule](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")]
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")\[[qiskit.pulse.schedule.Schedule](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule")]
</Function>
#### flatten
@ -412,8 +412,8 @@ The canonicalization transforms convert schedules to a form amenable for executi
* **schedule** ([*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.Schedule")) Schedule to pad.
* **channels** (*Iterable\[chans.Channel] | None*) Channels to pad. Defaults to all channels in `schedule` if not provided. If the supplied channel is not a member of `schedule` it will be added.
* **until** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) Time to pad until. Defaults to `schedule.duration` if not provided.
* **inplace** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Pad this schedule by mutating rather than returning a new schedule.
* **until** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) Time to pad until. Defaults to `schedule.duration` if not provided.
* **inplace** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Pad this schedule by mutating rather than returning a new schedule.
* **pad\_with** ([*Type*](circuit_classical#qiskit.circuit.classical.types.Type "qiskit.circuit.classical.types.Type")*\[*[*instructions.Instruction*](#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.Instruction")*] | None*) Pulse `Instruction` subclass to be used for padding. Default to [`Delay`](qiskit.pulse.instructions.Delay "qiskit.pulse.instructions.Delay") instruction.
**Returns**
@ -543,8 +543,8 @@ A sequence of transformations to generate a target code.
**Parameters**
* **sched** ([*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") *|*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*,* [*Instruction*](#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")*] |* [*Instruction*](#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction") *|*[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*,* [*Instruction*](#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")*] |* [*Instruction*](#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")*]*) Input program to transform.
* **remove\_directives** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Set True to remove compiler directives.
* **sched** ([*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.schedule.ScheduleBlock") *|*[*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.schedule.Schedule") *|*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*,* [*Instruction*](#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")*] |* [*Instruction*](#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction") *|*[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*Tuple*](https://docs.python.org/3/library/typing.html#typing.Tuple "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*,* [*Instruction*](#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")*] |* [*Instruction*](#qiskit.pulse.instructions.Instruction "qiskit.pulse.instructions.instruction.Instruction")*]*) Input program to transform.
* **remove\_directives** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Set True to remove compiler directives.
**Returns**
@ -781,8 +781,8 @@ The above is just a small taste of what is possible with the builder. See the re
* **backend** ([*Backend*](qiskit.providers.Backend "qiskit.providers.Backend")) A Qiskit backend. If not supplied certain builder functionality will be unavailable.
* **schedule** ([*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.ScheduleBlock") *| None*) A pulse `ScheduleBlock` in which your pulse program will be built.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of pulse program to be built.
* **default\_alignment** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*AlignmentKind*](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind") *| None*) Default scheduling alignment for builder. One of `left`, `right`, `sequential` or an alignment context.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of pulse program to be built.
* **default\_alignment** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*AlignmentKind*](#qiskit.pulse.transforms.AlignmentKind "qiskit.pulse.transforms.AlignmentKind") *| None*) Default scheduling alignment for builder. One of `left`, `right`, `sequential` or an alignment context.
**Returns**
@ -862,7 +862,7 @@ DriveChannel(0)
**Parameters**
**qubits** ([*Iterable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]*) Tuple or list of ordered qubits of the form (control\_qubit, target\_qubit).
**qubits** ([*Iterable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Iterable "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]*) Tuple or list of ordered qubits of the form (control\_qubit, target\_qubit).
**Returns**
@ -870,7 +870,7 @@ DriveChannel(0)
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.channels.ControlChannel](qiskit.pulse.channels.ControlChannel "qiskit.pulse.channels.ControlChannel")]
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")\[[qiskit.pulse.channels.ControlChannel](qiskit.pulse.channels.ControlChannel "qiskit.pulse.channels.ControlChannel")]
</Function>
#### drive\_channel
@ -985,8 +985,8 @@ drive_sched.draw()
**Parameters**
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Duration to acquire data for
* **qubit\_or\_channel** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| chans.AcquireChannel*) Either the qubit to acquire data for or the specific [`AcquireChannel`](qiskit.pulse.channels.AcquireChannel "qiskit.pulse.channels.AcquireChannel") to acquire on.
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Duration to acquire data for
* **qubit\_or\_channel** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| chans.AcquireChannel*) Either the qubit to acquire data for or the specific [`AcquireChannel`](qiskit.pulse.channels.AcquireChannel "qiskit.pulse.channels.AcquireChannel") to acquire on.
* **register** (*StorageLocation*) Location to store measured result.
* **metadata** (*Unpack\[\_MetaDataType]*) Additional metadata for measurement. See [`Acquire`](qiskit.pulse.instructions.Acquire "qiskit.pulse.instructions.Acquire") for more information.
@ -1062,8 +1062,8 @@ drive_sched.draw()
**Parameters**
* **channels\_or\_qubits** (*chans.Channel |* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Channels or qubits to barrier.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name for the barrier
* **channels\_or\_qubits** (*chans.Channel |* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Channels or qubits to barrier.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name for the barrier
</Function>
#### call
@ -1230,8 +1230,8 @@ drive_sched.draw()
**Parameters**
* **target** ([*Schedule*](qiskit.pulse.Schedule "qiskit.pulse.Schedule") *|*[*ScheduleBlock*](qiskit.pulse.ScheduleBlock "qiskit.pulse.ScheduleBlock") *| None*) Target circuit or pulse schedule to call.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Optional. A unique name of subroutine if defined. When the name is explicitly provided, one cannot call different schedule blocks with the same name.
* **value\_dict** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")*\[ParameterValueType, ParameterValueType] | None*) Optional. Parameters assigned to the `target` program. If this dictionary is provided, the `target` program is copied and then stored in the main built schedule and its parameters are assigned to the given values. This dictionary is keyed on [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects, allowing parameter name collision to be avoided.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Optional. A unique name of subroutine if defined. When the name is explicitly provided, one cannot call different schedule blocks with the same name.
* **value\_dict** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")*\[ParameterValueType, ParameterValueType] | None*) Optional. Parameters assigned to the `target` program. If this dictionary is provided, the `target` program is copied and then stored in the main built schedule and its parameters are assigned to the given values. This dictionary is keyed on [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects, allowing parameter name collision to be avoided.
* **kw\_params** (*ParameterValueType*) Alternative way to provide parameters. Since this is keyed on the string parameter name, the parameters having the same name are all updated together. If you want to avoid name collision, use `value_dict` with [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") objects instead.
</Function>
@ -1253,9 +1253,9 @@ drive_sched.draw()
**Parameters**
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of cycles to delay for on `channel`.
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of cycles to delay for on `channel`.
* **channel** (*chans.Channel*) Channel to delay on.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of the instruction.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of the instruction.
</Function>
#### play
@ -1278,7 +1278,7 @@ drive_sched.draw()
* **pulse** (*library.Pulse | np.ndarray*) Pulse to play.
* **channel** (*chans.PulseChannel*) Channel to play pulse on.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of the pulse.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of the pulse.
</Function>
#### reference
@ -1302,8 +1302,8 @@ drive_sched.draw()
**Parameters**
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Name of subroutine.
* **extra\_keys** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Helper keys to uniquely specify the subroutine.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Name of subroutine.
* **extra\_keys** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Helper keys to uniquely specify the subroutine.
</Function>
#### set\_frequency
@ -1324,9 +1324,9 @@ drive_sched.draw()
**Parameters**
* **frequency** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Frequency in Hz to set channel to.
* **frequency** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) Frequency in Hz to set channel to.
* **channel** (*chans.PulseChannel*) Channel to set frequency of.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of the instruction.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of the instruction.
</Function>
#### set\_phase
@ -1349,9 +1349,9 @@ drive_sched.draw()
**Parameters**
* **phase** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Phase in radians to set channel carrier signal to.
* **phase** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) Phase in radians to set channel carrier signal to.
* **channel** (*chans.PulseChannel*) Channel to set phase of.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of the instruction.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of the instruction.
</Function>
#### shift\_frequency
@ -1372,9 +1372,9 @@ drive_sched.draw()
**Parameters**
* **frequency** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Frequency in Hz to shift channel frequency by.
* **frequency** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) Frequency in Hz to shift channel frequency by.
* **channel** (*chans.PulseChannel*) Channel to shift frequency of.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of the instruction.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of the instruction.
</Function>
#### shift\_phase
@ -1397,9 +1397,9 @@ drive_sched.draw()
**Parameters**
* **phase** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Phase in radians to shift channel carrier signal by.
* **phase** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) Phase in radians to shift channel carrier signal by.
* **channel** (*chans.PulseChannel*) Channel to shift phase of.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Name of the instruction.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Name of the instruction.
</Function>
#### snapshot
@ -1418,8 +1418,8 @@ drive_sched.draw()
**Parameters**
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Label for snapshot.
* **snapshot\_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Type of snapshot.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Label for snapshot.
* **snapshot\_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Type of snapshot.
</Function>
### Contexts
@ -1446,7 +1446,7 @@ pulse_prog.draw()
#### align\_equispaced
<Function id="qiskit.pulse.builder.align_equispaced" signature="qiskit.pulse.builder.align_equispaced(duration)">
<Function id="qiskit.pulse.builder.align_equispaced" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/pulse/builder.py#L1141-L1190" signature="qiskit.pulse.builder.align_equispaced(duration)">
Equispaced alignment pulse scheduling context.
Pulse instructions within this context are scheduled with the same interval spacing such that the total length of the context block is `duration`. If the total free `duration` cannot be evenly divided by the number of instructions within the context, the modulo is split and then prepended and appended to the returned schedule. Delay instructions are automatically inserted in between pulses.
@ -1475,7 +1475,7 @@ pulse_prog.draw()
**Parameters**
**duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) Duration of this context. This should be larger than the schedule duration.
**duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) Duration of this context. This should be larger than the schedule duration.
**Yields**
@ -1492,7 +1492,7 @@ pulse_prog.draw()
#### align\_func
<Function id="qiskit.pulse.builder.align_func" signature="qiskit.pulse.builder.align_func(duration, func)">
<Function id="qiskit.pulse.builder.align_func" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/pulse/builder.py#L1193-L1252" signature="qiskit.pulse.builder.align_func(duration, func)">
Callback defined alignment pulse scheduling context.
Pulse instructions within this context are scheduled at the location specified by arbitrary callback function position that takes integer index and returns the associated fractional location within \[0, 1]. Delay instruction is automatically inserted in between pulses.
@ -1526,8 +1526,8 @@ pulse_prog.draw()
**Parameters**
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) Duration of context. This should be larger than the schedule duration.
* **func** (*Callable\[\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*],* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*]*) A function that takes an index of sub-schedule and returns the fractional coordinate of of that sub-schedule. The returned value should be defined within \[0, 1]. The pulse index starts from 1.
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) Duration of context. This should be larger than the schedule duration.
* **func** (*Callable\[\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*],* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*]*) A function that takes an index of sub-schedule and returns the fractional coordinate of of that sub-schedule. The returned value should be defined within \[0, 1]. The pulse index starts from 1.
**Yields**
@ -1544,7 +1544,7 @@ pulse_prog.draw()
#### align\_left
<Function id="qiskit.pulse.builder.align_left" signature="qiskit.pulse.builder.align_left()">
<Function id="qiskit.pulse.builder.align_left" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/pulse/builder.py#L1027-L1062" signature="qiskit.pulse.builder.align_left()">
Left alignment pulse scheduling context.
Pulse instructions within this context are scheduled as early as possible by shifting them left to the earliest available time.
@ -1574,12 +1574,12 @@ pulse_prog.draw()
**Return type**
[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None]
[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.13)")\[None, None, None]
</Function>
#### align\_right
<Function id="qiskit.pulse.builder.align_right" signature="qiskit.pulse.builder.align_right()">
<Function id="qiskit.pulse.builder.align_right" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/pulse/builder.py#L1065-L1100" signature="qiskit.pulse.builder.align_right()">
Right alignment pulse scheduling context.
Pulse instructions within this context are scheduled as late as possible by shifting them right to the latest available time.
@ -1609,12 +1609,12 @@ pulse_prog.draw()
**Return type**
[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None]
[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.13)")\[None, None, None]
</Function>
#### align\_sequential
<Function id="qiskit.pulse.builder.align_sequential" signature="qiskit.pulse.builder.align_sequential()">
<Function id="qiskit.pulse.builder.align_sequential" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/pulse/builder.py#L1103-L1138" signature="qiskit.pulse.builder.align_sequential()">
Sequential alignment pulse scheduling context.
Pulse instructions within this context are scheduled sequentially in time such that no two instructions will be played at the same time.
@ -1644,12 +1644,12 @@ pulse_prog.draw()
**Return type**
[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None]
[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.13)")\[None, None, None]
</Function>
#### frequency\_offset
<Function id="qiskit.pulse.builder.frequency_offset" signature="qiskit.pulse.builder.frequency_offset(frequency, *channels, compensate_phase=False)">
<Function id="qiskit.pulse.builder.frequency_offset" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/pulse/builder.py#L1317-L1379" signature="qiskit.pulse.builder.frequency_offset(frequency, *channels, compensate_phase=False)">
Shift the frequency of inputs channels on entry into context and undo on exit.
Examples:
@ -1680,9 +1680,9 @@ pulse_prog.draw()
**Parameters**
* **frequency** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Amount of frequency offset in Hz.
* **frequency** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) Amount of frequency offset in Hz.
* **channels** (*PulseChannel*) Channels to offset frequency of.
* **compensate\_phase** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Compensate for accumulated phase accumulated with respect to the channels frame at its initial frequency.
* **compensate\_phase** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Compensate for accumulated phase accumulated with respect to the channels frame at its initial frequency.
**Yields**
@ -1690,12 +1690,12 @@ pulse_prog.draw()
**Return type**
[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None]
[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.13)")\[None, None, None]
</Function>
#### phase\_offset
<Function id="qiskit.pulse.builder.phase_offset" signature="qiskit.pulse.builder.phase_offset(phase, *channels)">
<Function id="qiskit.pulse.builder.phase_offset" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/pulse/builder.py#L1281-L1314" signature="qiskit.pulse.builder.phase_offset(phase, *channels)">
Shift the phase of input channels on entry into context and undo on exit.
Examples:
@ -1716,7 +1716,7 @@ pulse_prog.draw()
**Parameters**
* **phase** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Amount of phase offset in radians.
* **phase** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) Amount of phase offset in radians.
* **channels** (*PulseChannel*) Channels to offset phase of.
**Yields**
@ -1725,7 +1725,7 @@ pulse_prog.draw()
**Return type**
[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.12)")\[None, None, None]
[*Generator*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Generator "(in Python v3.13)")\[None, None, None]
</Function>
### Macros
@ -1790,8 +1790,8 @@ MemorySlot(0)
**Parameters**
* **qubits** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] |* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Physical qubit to measure.
* **registers** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[StorageLocation] | StorageLocation*) Register to store result in. If not selected the current behavior is to return the `MemorySlot` with the same index as `qubit`. This register will be returned.
* **qubits** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] |* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Physical qubit to measure.
* **registers** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[StorageLocation] | StorageLocation*) Register to store result in. If not selected the current behavior is to return the `MemorySlot` with the same index as `qubit`. This register will be returned.
**Returns**
@ -1799,7 +1799,7 @@ MemorySlot(0)
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[StorageLocation] | StorageLocation
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")\[StorageLocation] | StorageLocation
</Function>
#### measure\_all
@ -1832,7 +1832,7 @@ MemorySlot(0)
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[qiskit.pulse.channels.MemorySlot](qiskit.pulse.channels.MemorySlot "qiskit.pulse.channels.MemorySlot")]
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")\[[qiskit.pulse.channels.MemorySlot](qiskit.pulse.channels.MemorySlot "qiskit.pulse.channels.MemorySlot")]
</Function>
#### delay\_qubits
@ -1859,8 +1859,8 @@ MemorySlot(0)
**Parameters**
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Duration to delay for.
* **qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Physical qubits to delay on. Delays will be inserted based on the channels returned by `pulse.qubit_channels()`.
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Duration to delay for.
* **qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Physical qubits to delay on. Delays will be inserted based on the channels returned by `pulse.qubit_channels()`.
</Function>
### Utilities
@ -1939,7 +1939,7 @@ There are 1e-06 seconds in 4500 samples.
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Function>
#### qubit\_channels
@ -1973,7 +1973,7 @@ There are 1e-06 seconds in 4500 samples.
**Return type**
[set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.12)")\[[qiskit.pulse.channels.Channel](#qiskit.pulse.channels.Channel "qiskit.pulse.channels.Channel")]
[set](https://docs.python.org/3/library/stdtypes.html#set "(in Python v3.13)")\[[qiskit.pulse.channels.Channel](#qiskit.pulse.channels.Channel "qiskit.pulse.channels.Channel")]
</Function>
#### samples\_to\_seconds
@ -1983,7 +1983,7 @@ There are 1e-06 seconds in 4500 samples.
**Parameters**
**samples** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| np.ndarray*) Number of samples to convert to time in seconds.
**samples** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| np.ndarray*) Number of samples to convert to time in seconds.
**Returns**
@ -1991,7 +1991,7 @@ There are 1e-06 seconds in 4500 samples.
**Return type**
[float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") | np.ndarray
[float](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") | np.ndarray
</Function>
#### seconds\_to\_samples
@ -2003,7 +2003,7 @@ There are 1e-06 seconds in 4500 samples.
**Parameters**
**seconds** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") *| np.ndarray*) Time in seconds to convert to samples.
**seconds** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *| np.ndarray*) Time in seconds to convert to samples.
**Returns**
@ -2011,7 +2011,7 @@ There are 1e-06 seconds in 4500 samples.
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") | np.ndarray
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") | np.ndarray
</Function>
## Configuration

View File

@ -35,12 +35,12 @@ This module contains two public functions, both of which create a [`QuantumCircu
**Parameters**
* **filename** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*PathLike*](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.12)")) The OpenQASM 2 program in a string.
* **include\_path** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*PathLike*](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.12)")*]*) order of directories to search when evaluating `include` statements.
* **include\_input\_directory** ([*Literal*](https://docs.python.org/3/library/typing.html#typing.Literal "(in Python v3.12)")*\['append', 'prepend'] | None*) Whether to add the directory of the input file to the `include_path`, and if so, whether to *append* it to search last, or *prepend* it to search first. Pass `None` to suppress adding this directory entirely.
* **custom\_instructions** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*CustomInstruction*](#qiskit.qasm2.CustomInstruction "qiskit.qasm2.parse.CustomInstruction")*]*) any custom constructors that should be used for specific gates or opaque instructions during circuit construction. See [Specifying custom instructions](#qasm2-custom-instructions) for more.
* **custom\_classical** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*CustomClassical*](#qiskit.qasm2.CustomClassical "qiskit.qasm2.CustomClassical")*]*) any custom classical functions that should be used during the parsing of classical expressions. See [Specifying custom classical functions](#qasm2-custom-classical) for more.
* **strict** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) whether to run in [strict mode](#qasm2-strict-mode).
* **filename** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*PathLike*](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.13)")) The OpenQASM 2 program in a string.
* **include\_path** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*PathLike*](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.13)")*]*) order of directories to search when evaluating `include` statements.
* **include\_input\_directory** ([*Literal*](https://docs.python.org/3/library/typing.html#typing.Literal "(in Python v3.13)")*\['append', 'prepend'] | None*) Whether to add the directory of the input file to the `include_path`, and if so, whether to *append* it to search last, or *prepend* it to search first. Pass `None` to suppress adding this directory entirely.
* **custom\_instructions** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*CustomInstruction*](#qiskit.qasm2.CustomInstruction "qiskit.qasm2.parse.CustomInstruction")*]*) any custom constructors that should be used for specific gates or opaque instructions during circuit construction. See [Specifying custom instructions](#qasm2-custom-instructions) for more.
* **custom\_classical** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*CustomClassical*](#qiskit.qasm2.CustomClassical "qiskit.qasm2.CustomClassical")*]*) any custom classical functions that should be used during the parsing of classical expressions. See [Specifying custom classical functions](#qasm2-custom-classical) for more.
* **strict** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) whether to run in [strict mode](#qasm2-strict-mode).
**Returns**
@ -58,11 +58,11 @@ This module contains two public functions, both of which create a [`QuantumCircu
**Parameters**
* **string** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The OpenQASM 2 program in a string.
* **include\_path** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*PathLike*](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.12)")*]*) order of directories to search when evaluating `include` statements.
* **custom\_instructions** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*CustomInstruction*](#qiskit.qasm2.CustomInstruction "qiskit.qasm2.parse.CustomInstruction")*]*) any custom constructors that should be used for specific gates or opaque instructions during circuit construction. See [Specifying custom instructions](#qasm2-custom-instructions) for more.
* **custom\_classical** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*CustomClassical*](#qiskit.qasm2.CustomClassical "qiskit.qasm2.CustomClassical")*]*) any custom classical functions that should be used during the parsing of classical expressions. See [Specifying custom classical functions](#qasm2-custom-classical) for more.
* **strict** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) whether to run in [strict mode](#qasm2-strict-mode).
* **string** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The OpenQASM 2 program in a string.
* **include\_path** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*PathLike*](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.13)")*]*) order of directories to search when evaluating `include` statements.
* **custom\_instructions** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*CustomInstruction*](#qiskit.qasm2.CustomInstruction "qiskit.qasm2.parse.CustomInstruction")*]*) any custom constructors that should be used for specific gates or opaque instructions during circuit construction. See [Specifying custom instructions](#qasm2-custom-instructions) for more.
* **custom\_classical** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*CustomClassical*](#qiskit.qasm2.CustomClassical "qiskit.qasm2.CustomClassical")*]*) any custom classical functions that should be used during the parsing of classical expressions. See [Specifying custom classical functions](#qasm2-custom-classical) for more.
* **strict** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) whether to run in [strict mode](#qasm2-strict-mode).
**Returns**
@ -156,7 +156,7 @@ Similar to other serialization modules in Python, this module offers two public
**Parameters**
* **circuit** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) the [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") to be exported.
* **filename\_or\_stream** ([*os.PathLike*](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.12)") *|*[*io.TextIOBase*](https://docs.python.org/3/library/io.html#io.TextIOBase "(in Python v3.12)")) either a path-like object (likely a [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") or [`pathlib.Path`](https://docs.python.org/3/library/pathlib.html#pathlib.Path "(in Python v3.12)")), or an already opened text-mode stream.
* **filename\_or\_stream** ([*os.PathLike*](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.13)") *|*[*io.TextIOBase*](https://docs.python.org/3/library/io.html#io.TextIOBase "(in Python v3.13)")) either a path-like object (likely a [`str`](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") or [`pathlib.Path`](https://docs.python.org/3/library/pathlib.html#pathlib.Path "(in Python v3.13)")), or an already opened text-mode stream.
**Raises**
@ -182,7 +182,7 @@ Similar to other serialization modules in Python, this module offers two public
**Return type**
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")
</Function>
## Errors
@ -253,7 +253,7 @@ Write out the same [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circ
qiskit.qasm2.dump(qc, "myfile.qasm")
```
Similarly, one can use general [`os.PathLike`](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.12)") instances as the filename:
Similarly, one can use general [`os.PathLike`](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.13)") instances as the filename:
```python
import pathlib

View File

@ -50,7 +50,7 @@ The high-level functions are simply [`dump()`](#qiskit.qasm3.dump "qiskit.qasm3.
**Return type**
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")
</Function>
Both of these exporter functions are single-use wrappers around the main [`Exporter`](#qiskit.qasm3.Exporter "qiskit.qasm3.Exporter") class. For more complex exporting needs, including dumping multiple circuits in a single session, it may be more convenient or faster to use the complete interface.
@ -62,7 +62,7 @@ Both of these exporter functions are single-use wrappers around the main [`Expor
**Parameters**
* **includes** (*Sequence\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]*)
* **includes** (*Sequence\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]*)
the filenames that should be emitted as includes.
@ -70,11 +70,11 @@ Both of these exporter functions are single-use wrappers around the main [`Expor
At present, only the standard-library file `stdgates.inc` is properly understood by the exporter, in the sense that it knows the gates it defines. You can specify other includes, but you will need to pass the names of the gates they define in the `basis_gates` argument to avoid the exporter outputting a separate `gate` definition.
</Admonition>
* **basis\_gates** (*Sequence\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]*) the basic defined gate set of the backend.
* **basis\_gates** (*Sequence\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]*) the basic defined gate set of the backend.
* **disable\_constants** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if `True`, always emit floating-point constants for numeric parameter values. If `False` (the default), then values close to multiples of OpenQASM 3 constants (`pi`, `euler`, and `tau`) will be emitted in terms of those constants instead, potentially improving accuracy in the output.
* **disable\_constants** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if `True`, always emit floating-point constants for numeric parameter values. If `False` (the default), then values close to multiples of OpenQASM 3 constants (`pi`, `euler`, and `tau`) will be emitted in terms of those constants instead, potentially improving accuracy in the output.
* **alias\_classical\_registers** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)"))
* **alias\_classical\_registers** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)"))
If `True`, then bits may be contained in more than one register. If so, the registers will be emitted using “alias” definitions, which might not be well supported by consumers of OpenQASM 3.
@ -84,13 +84,13 @@ Both of these exporter functions are single-use wrappers around the main [`Expor
A value for `allow_aliasing` overrides any value given here, and supersedes this parameter.
</Admonition>
* **allow\_aliasing** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)"))
* **allow\_aliasing** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)"))
If `True`, then bits may be contained in more than one register. If so, the registers will be emitted using “alias” definitions, which might not be well supported by consumers of OpenQASM 3. Defaults to `False` or the value of `alias_classical_registers`.
New in version 0.25.0.
* **indent** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) the indentation string to use for each level within an indented block. Can be set to the empty string to disable indentation.
* **indent** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) the indentation string to use for each level within an indented block. Can be set to the empty string to disable indentation.
* **experimental** ([*ExperimentalFeatures*](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.ExperimentalFeatures")) any experimental features to enable during the export. See [`ExperimentalFeatures`](#qiskit.qasm3.ExperimentalFeatures "qiskit.qasm3.ExperimentalFeatures") for more details.
@ -217,12 +217,12 @@ Currently only two high-level functions are offered, as Qiskit support for impor
### load
<Function id="qiskit.qasm3.load" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/lazy_tester.py#L300-L322" signature="qiskit.qasm3.load(filename)">
<Function id="qiskit.qasm3.load" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/qasm3/__init__.py#L300-L322" signature="qiskit.qasm3.load(filename)">
Load an OpenQASM 3 program from the file `filename`.
**Parameters**
**filename** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) the filename to load the program from.
**filename** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) the filename to load the program from.
**Returns**
@ -239,12 +239,12 @@ Currently only two high-level functions are offered, as Qiskit support for impor
### loads
<Function id="qiskit.qasm3.loads" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/lazy_tester.py#L325-L345" signature="qiskit.qasm3.loads(program)">
<Function id="qiskit.qasm3.loads" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/qasm3/__init__.py#L325-L345" signature="qiskit.qasm3.loads(program)">
Load an OpenQASM 3 program from the given string.
**Parameters**
**program** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) the OpenQASM 3 program.
**program** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) the OpenQASM 3 program.
**Returns**
@ -330,7 +330,7 @@ You can use the experimental interface immediately, with similar functions to th
#### load\_experimental
<Function id="qiskit.qasm3.load_experimental" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/qasm3/__init__.py" signature="qiskit.qasm3.load_experimental(pathlike_or_filelike, /, *, custom_gates=None, include_path=None)">
<Function id="qiskit.qasm3.load_experimental" signature="qiskit.qasm3.load_experimental(pathlike_or_filelike, /, *, custom_gates=None, include_path=None)">
Load an OpenQASM 3 program from a source file into a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit").
<Admonition title="Warning" type="caution">
@ -339,9 +339,9 @@ You can use the experimental interface immediately, with similar functions to th
**Parameters**
* **pathlike\_or\_filelike** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*os.PathLike*](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.12)") *|*[*io.TextIOBase*](https://docs.python.org/3/library/io.html#io.TextIOBase "(in Python v3.12)")) the program source. This can either be given as a filepath, or an open text stream object. If the stream is already opened it is consumed in Python space, whereas filenames are opened and consumed in Rust space; there might be slightly different performance characteristics, depending on your system and how the streams are buffered by default.
* **pathlike\_or\_filelike** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*os.PathLike*](https://docs.python.org/3/library/os.html#os.PathLike "(in Python v3.13)") *|*[*io.TextIOBase*](https://docs.python.org/3/library/io.html#io.TextIOBase "(in Python v3.13)")) the program source. This can either be given as a filepath, or an open text stream object. If the stream is already opened it is consumed in Python space, whereas filenames are opened and consumed in Rust space; there might be slightly different performance characteristics, depending on your system and how the streams are buffered by default.
* **custom\_gates** (*Iterable\[*[*CustomGate*](#qiskit.qasm3.CustomGate "qiskit.qasm3.CustomGate")*]*) Python constructors to use for particular named gates. If not supplied, Qiskit will use its own standard-library constructors for gates defined in the OpenQASM 3.0 standard-library file `stdgates.inc`.
* **include\_path** (*Iterable\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]*) the path to search when resolving `include` statements. If not given, Qiskit will arrange for this to point to a location containing `stdgates.inc` only. Paths are tried in the sequence order.
* **include\_path** (*Iterable\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]*) the path to search when resolving `include` statements. If not given, Qiskit will arrange for this to point to a location containing `stdgates.inc` only. Paths are tried in the sequence order.
**Returns**
@ -358,7 +358,7 @@ You can use the experimental interface immediately, with similar functions to th
#### loads\_experimental
<Function id="qiskit.qasm3.loads_experimental" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/qasm3/__init__.py" signature="qiskit.qasm3.loads_experimental(source, /, *, custom_gates=None, include_path=None)">
<Function id="qiskit.qasm3.loads_experimental" signature="qiskit.qasm3.loads_experimental(source, /, *, custom_gates=None, include_path=None)">
Load an OpenQASM 3 program from a string into a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit").
<Admonition title="Warning" type="caution">
@ -367,9 +367,9 @@ You can use the experimental interface immediately, with similar functions to th
**Parameters**
* **source** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) the program source in a Python string.
* **source** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) the program source in a Python string.
* **custom\_gates** (*Iterable\[*[*CustomGate*](#qiskit.qasm3.CustomGate "qiskit.qasm3.CustomGate")*]*) Python constructors to use for particular named gates. If not supplied, Qiskit will use its own standard-library constructors for gates defined in the OpenQASM 3.0 standard-library file `stdgates.inc`.
* **include\_path** (*Iterable\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]*) the path to search when resolving `include` statements. If not given, Qiskit will arrange for this to point to a location containing `stdgates.inc` only. Paths are tried in the sequence order.
* **include\_path** (*Iterable\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]*) the path to search when resolving `include` statements. If not given, Qiskit will arrange for this to point to a location containing `stdgates.inc` only. Paths are tried in the sequence order.
**Returns**

View File

@ -9,7 +9,7 @@ python_api_name: qiskit.assembler.RunConfig
# RunConfig
<Class id="qiskit.assembler.RunConfig" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/main/qiskit/assembler/run_config.py#L18-L77" signature="qiskit.assembler.RunConfig(shots=None, seed_simulator=None, memory=None, parameter_binds=None, **kwargs)" modifiers="class">
Bases: [`SimpleNamespace`](https://docs.python.org/3/library/types.html#types.SimpleNamespace "(in Python v3.12)")
Bases: [`SimpleNamespace`](https://docs.python.org/3/library/types.html#types.SimpleNamespace "(in Python v3.13)")
Class for Run Configuration.
@ -20,7 +20,7 @@ python_api_name: qiskit.assembler.RunConfig
**Type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### seed\_simulator
@ -30,7 +30,7 @@ python_api_name: qiskit.assembler.RunConfig
**Type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### memory
@ -40,7 +40,7 @@ python_api_name: qiskit.assembler.RunConfig
**Type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Attribute>
### parameter\_binds
@ -50,17 +50,17 @@ python_api_name: qiskit.assembler.RunConfig
**Type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")\[[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")]
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")\[[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")]
</Attribute>
Initialize a RunConfig object
**Parameters**
* **shots** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) the number of shots
* **seed\_simulator** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) the seed to use in the simulator
* **memory** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) whether to request memory from backend (per-shot readouts)
* **parameter\_binds** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")*]*) List of parameter bindings
* **shots** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the number of shots
* **seed\_simulator** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the seed to use in the simulator
* **memory** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) whether to request memory from backend (per-shot readouts)
* **parameter\_binds** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")*]*) List of parameter bindings
* **\*\*kwargs** optional fields
## Methods
@ -72,7 +72,7 @@ python_api_name: qiskit.assembler.RunConfig
**Parameters**
**data** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")) A dictionary representing the RunConfig to create. It will be in the same format as output by [`to_dict()`](#qiskit.assembler.RunConfig.to_dict "qiskit.assembler.RunConfig.to_dict").
**data** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) A dictionary representing the RunConfig to create. It will be in the same format as output by [`to_dict()`](#qiskit.assembler.RunConfig.to_dict "qiskit.assembler.RunConfig.to_dict").
**Returns**
@ -94,7 +94,7 @@ python_api_name: qiskit.assembler.RunConfig
**Return type**
[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")
[dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")
</Function>
</Class>

View File

@ -86,10 +86,10 @@ python_api_name: qiskit.circuit.AnnotatedOperation
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of controls to add to gate (default: `1`)
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) ignored (used for consistency with other control methods)
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) The control state in decimal or as a bitstring (e.g. `'111'`). If `None`, use `2**num_ctrl_qubits-1`.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) ignored (used for consistency with other control methods)
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of controls to add to gate (default: `1`)
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) ignored (used for consistency with other control methods)
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) The control state in decimal or as a bitstring (e.g. `'111'`). If `None`, use `2**num_ctrl_qubits-1`.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) ignored (used for consistency with other control methods)
**Returns**
@ -119,7 +119,7 @@ python_api_name: qiskit.circuit.AnnotatedOperation
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) ignored (used for consistency with other inverse methods)
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) ignored (used for consistency with other inverse methods)
**Returns**
@ -135,8 +135,8 @@ python_api_name: qiskit.circuit.AnnotatedOperation
**Parameters**
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) ignored (used for consistency with other power methods)
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) ignored (used for consistency with other power methods)
**Returns**
@ -156,7 +156,7 @@ python_api_name: qiskit.circuit.AnnotatedOperation
**Return type**
[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") | [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")
[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") | [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")
</Function>
</Class>

View File

@ -15,9 +15,9 @@ python_api_name: qiskit.circuit.BreakLoopOp
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) the number of qubits this affects.
* **num\_clbits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) the number of qubits this affects.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) an optional string label for the instruction.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the number of qubits this affects.
* **num\_clbits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the number of qubits this affects.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) an optional string label for the instruction.
## Attributes
@ -134,7 +134,7 @@ python_api_name: qiskit.circuit.BreakLoopOp
### assemble
<Function id="qiskit.circuit.BreakLoopOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.BreakLoopOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -178,7 +178,7 @@ python_api_name: qiskit.circuit.BreakLoopOp
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -202,7 +202,7 @@ python_api_name: qiskit.circuit.BreakLoopOp
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**
@ -228,7 +228,7 @@ python_api_name: qiskit.circuit.BreakLoopOp
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -276,7 +276,7 @@ python_api_name: qiskit.circuit.BreakLoopOp
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### to\_mutable

View File

@ -9,7 +9,7 @@ python_api_name: qiskit.circuit.CircuitInstruction
# CircuitInstruction
<Class id="qiskit.circuit.CircuitInstruction" isDedicatedPage={true} signature="qiskit.circuit.CircuitInstruction" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.12)")
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")
A single instruction in a [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit"), comprised of the [`operation`](#qiskit.circuit.CircuitInstruction.operation "qiskit.circuit.CircuitInstruction.operation") and various operands.

View File

@ -15,9 +15,9 @@ python_api_name: qiskit.circuit.ContinueLoopOp
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) the number of qubits this affects.
* **num\_clbits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) the number of qubits this affects.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) an optional string label for the instruction.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the number of qubits this affects.
* **num\_clbits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the number of qubits this affects.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) an optional string label for the instruction.
## Attributes
@ -134,7 +134,7 @@ python_api_name: qiskit.circuit.ContinueLoopOp
### assemble
<Function id="qiskit.circuit.ContinueLoopOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.ContinueLoopOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -178,7 +178,7 @@ python_api_name: qiskit.circuit.ContinueLoopOp
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -202,7 +202,7 @@ python_api_name: qiskit.circuit.ContinueLoopOp
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**
@ -228,7 +228,7 @@ python_api_name: qiskit.circuit.ContinueLoopOp
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -276,7 +276,7 @@ python_api_name: qiskit.circuit.ContinueLoopOp
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### to\_mutable

View File

@ -9,7 +9,7 @@ python_api_name: qiskit.circuit.ControlFlowOp
# ControlFlowOp
<Class id="qiskit.circuit.ControlFlowOp" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/controlflow/control_flow.py#L28-L84" signature="qiskit.circuit.ControlFlowOp(*args, **kwargs)" modifiers="class">
Bases: [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.instruction.Instruction"), [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.12)")
Bases: [`Instruction`](qiskit.circuit.Instruction "qiskit.circuit.instruction.Instruction"), [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.13)")
Abstract class to encapsulate all control flow operations.
@ -19,18 +19,18 @@ python_api_name: qiskit.circuit.ControlFlowOp
**Parameters**
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) instruction name
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) instructions qubit width
* **num\_clbits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) instructions clbit width
* **params** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*|*[*complex*](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")*|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*|ndarray|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")*]*) list of parameters
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *or*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) instructions duration. it must be integer if `unit` is dt
* **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) time unit of duration
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *or None*) An optional label for identifying the instruction.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) instruction name
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) instructions qubit width
* **num\_clbits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) instructions clbit width
* **params** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*|*[*complex*](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)")*|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*|ndarray|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")*]*) list of parameters
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *or*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) instructions duration. it must be integer if `unit` is dt
* **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) time unit of duration
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *or None*) An optional label for identifying the instruction.
**Raises**
* [**CircuitError**](circuit#qiskit.circuit.CircuitError "qiskit.circuit.CircuitError") when the register is not in the correct format.
* [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.12)") when the optional label is provided, but it is not a string.
* [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.13)") when the optional label is provided, but it is not a string.
## Attributes
@ -153,7 +153,7 @@ python_api_name: qiskit.circuit.ControlFlowOp
### assemble
<Function id="qiskit.circuit.ControlFlowOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.ControlFlowOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -197,7 +197,7 @@ python_api_name: qiskit.circuit.ControlFlowOp
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -221,7 +221,7 @@ python_api_name: qiskit.circuit.ControlFlowOp
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**
@ -245,7 +245,7 @@ python_api_name: qiskit.circuit.ControlFlowOp
**Return type**
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[expr.Var](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")]
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")\[[expr.Var](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")]
</Function>
### repeat
@ -257,7 +257,7 @@ python_api_name: qiskit.circuit.ControlFlowOp
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -296,7 +296,7 @@ python_api_name: qiskit.circuit.ControlFlowOp
**Parameters**
**blocks** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")*]*) the new subcircuit blocks to use.
**blocks** ([*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")*\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")*]*) the new subcircuit blocks to use.
**Returns**
@ -340,7 +340,7 @@ python_api_name: qiskit.circuit.ControlFlowOp
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### to\_mutable

View File

@ -17,13 +17,13 @@ python_api_name: qiskit.circuit.ControlledGate
**Parameters**
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the gate.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The number of qubits the gate acts on.
* **params** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")) A list of parameters for the gate.
* **label** (*Optional\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]*) An optional label for the gate.
* **num\_ctrl\_qubits** (*Optional\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]*) Number of control qubits.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the gate.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) The number of qubits the gate acts on.
* **params** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) A list of parameters for the gate.
* **label** (*Optional\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]*) An optional label for the gate.
* **num\_ctrl\_qubits** (*Optional\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]*) Number of control qubits.
* **definition** (*Optional\['QuantumCircuit']*) A list of gate rules for implementing this gate. The elements of the list are tuples of ([`Gate()`](qiskit.circuit.Gate "qiskit.circuit.Gate"), \[qubit\_list], \[clbit\_list]).
* **ctrl\_state** (*Optional\[Union\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*,* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]]*) The control state in decimal or as a bitstring (e.g. 111). If specified as a bitstring the length must equal num\_ctrl\_qubits, MSB on left. If None, use 2\*\*num\_ctrl\_qubits-1.
* **ctrl\_state** (*Optional\[Union\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*,* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]]*) The control state in decimal or as a bitstring (e.g. 111). If specified as a bitstring the length must equal num\_ctrl\_qubits, MSB on left. If None, use 2\*\*num\_ctrl\_qubits-1.
* **base\_gate** (*Optional\[*[*Gate*](qiskit.circuit.Gate "qiskit.circuit.Gate")*]*) Gate object to be controlled.
**Raises**
@ -170,7 +170,7 @@ python_api_name: qiskit.circuit.ControlledGate
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -190,7 +190,7 @@ python_api_name: qiskit.circuit.ControlledGate
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -217,7 +217,7 @@ python_api_name: qiskit.circuit.ControlledGate
### assemble
<Function id="qiskit.circuit.ControlledGate.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.ControlledGate.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -262,8 +262,8 @@ python_api_name: qiskit.circuit.ControlledGate
**Parameters**
* **qargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")) List of quantum bit arguments.
* **cargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")) List of classical bit arguments.
* **qargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) List of quantum bit arguments.
* **cargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) List of classical bit arguments.
**Returns**
@ -275,7 +275,7 @@ python_api_name: qiskit.circuit.ControlledGate
**Return type**
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")]]
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")]]
</Function>
### c\_if
@ -297,10 +297,10 @@ python_api_name: qiskit.circuit.ControlledGate
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of controls to add to gate (default: `1`)
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) optional gate label. Ignored if implemented as an annotated operation.
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) the control state in decimal or as a bitstring (e.g. `'111'`). If `None`, use `2**num_ctrl_qubits-1`.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) indicates whether the controlled gate is implemented as an annotated gate. If `None`, this is set to `False` if the controlled gate can directly be constructed, and otherwise set to `True`. This allows defering the construction process in case the synthesis of the controlled gate requires more information (e.g. values of unbound parameters).
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of controls to add to gate (default: `1`)
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) optional gate label. Ignored if implemented as an annotated operation.
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) the control state in decimal or as a bitstring (e.g. `'111'`). If `None`, use `2**num_ctrl_qubits-1`.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) indicates whether the controlled gate is implemented as an annotated gate. If `None`, this is set to `False` if the controlled gate can directly be constructed, and otherwise set to `True`. This allows defering the construction process in case the synthesis of the controlled gate requires more information (e.g. values of unbound parameters).
**Returns**
@ -318,7 +318,7 @@ python_api_name: qiskit.circuit.ControlledGate
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -354,8 +354,8 @@ python_api_name: qiskit.circuit.ControlledGate
**Parameters**
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
**Returns**
@ -375,7 +375,7 @@ python_api_name: qiskit.circuit.ControlledGate
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -423,7 +423,7 @@ python_api_name: qiskit.circuit.ControlledGate
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### to\_matrix

View File

@ -41,7 +41,7 @@ python_api_name: qiskit.circuit.EquivalenceLibrary
**Parameters**
**filename** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) An optional path to write the output image to if specified this method will return None.
**filename** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) An optional path to write the output image to if specified this method will return None.
**Returns**

View File

@ -15,10 +15,10 @@ python_api_name: qiskit.circuit.ForLoopOp
**Parameters**
* **indexset** (*Iterable\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]*) A collection of integers to loop over.
* **indexset** (*Iterable\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]*) A collection of integers to loop over.
* **loop\_parameter** (*Union\[*[*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.Parameter")*, None]*) The placeholder parameterizing `body` to which the values from `indexset` will be assigned.
* **body** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) The loop body to be repeatedly executed.
* **label** (*Optional\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]*) An optional label for identifying the instruction.
* **label** (*Optional\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]*) An optional label for identifying the instruction.
## Attributes
@ -137,7 +137,7 @@ python_api_name: qiskit.circuit.ForLoopOp
### assemble
<Function id="qiskit.circuit.ForLoopOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.ForLoopOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -181,7 +181,7 @@ python_api_name: qiskit.circuit.ForLoopOp
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -205,7 +205,7 @@ python_api_name: qiskit.circuit.ForLoopOp
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**
@ -229,7 +229,7 @@ python_api_name: qiskit.circuit.ForLoopOp
**Return type**
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[expr.Var](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")]
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")\[[expr.Var](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")]
</Function>
### repeat
@ -241,7 +241,7 @@ python_api_name: qiskit.circuit.ForLoopOp
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -320,7 +320,7 @@ python_api_name: qiskit.circuit.ForLoopOp
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### to\_mutable

View File

@ -17,10 +17,10 @@ python_api_name: qiskit.circuit.Gate
**Parameters**
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The Qobj name of the gate.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The number of qubits the gate acts on.
* **params** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")) A list of parameters.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) An optional label for the gate.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The Qobj name of the gate.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) The number of qubits the gate acts on.
* **params** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) A list of parameters.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) An optional label for the gate.
## Attributes
@ -137,7 +137,7 @@ python_api_name: qiskit.circuit.Gate
### assemble
<Function id="qiskit.circuit.Gate.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.Gate.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -182,8 +182,8 @@ python_api_name: qiskit.circuit.Gate
**Parameters**
* **qargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")) List of quantum bit arguments.
* **cargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")) List of classical bit arguments.
* **qargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) List of quantum bit arguments.
* **cargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) List of classical bit arguments.
**Returns**
@ -195,7 +195,7 @@ python_api_name: qiskit.circuit.Gate
**Return type**
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")]]
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")]]
</Function>
### c\_if
@ -217,10 +217,10 @@ python_api_name: qiskit.circuit.Gate
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of controls to add to gate (default: `1`)
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) optional gate label. Ignored if implemented as an annotated operation.
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) the control state in decimal or as a bitstring (e.g. `'111'`). If `None`, use `2**num_ctrl_qubits-1`.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) indicates whether the controlled gate is implemented as an annotated gate. If `None`, this is set to `False` if the controlled gate can directly be constructed, and otherwise set to `True`. This allows defering the construction process in case the synthesis of the controlled gate requires more information (e.g. values of unbound parameters).
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of controls to add to gate (default: `1`)
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) optional gate label. Ignored if implemented as an annotated operation.
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) the control state in decimal or as a bitstring (e.g. `'111'`). If `None`, use `2**num_ctrl_qubits-1`.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) indicates whether the controlled gate is implemented as an annotated gate. If `None`, this is set to `False` if the controlled gate can directly be constructed, and otherwise set to `True`. This allows defering the construction process in case the synthesis of the controlled gate requires more information (e.g. values of unbound parameters).
**Returns**
@ -238,7 +238,7 @@ python_api_name: qiskit.circuit.Gate
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -262,7 +262,7 @@ python_api_name: qiskit.circuit.Gate
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**
@ -288,8 +288,8 @@ python_api_name: qiskit.circuit.Gate
**Parameters**
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
**Returns**
@ -309,7 +309,7 @@ python_api_name: qiskit.circuit.Gate
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -357,7 +357,7 @@ python_api_name: qiskit.circuit.Gate
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### to\_matrix

View File

@ -19,10 +19,10 @@ python_api_name: qiskit.circuit.IfElseOp
**Parameters**
* **condition** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")*\[*[*ClassicalRegister*](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] |* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")*\[*[*Clbit*](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] |* [*expr.Expr*](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) A condition to be evaluated in real time during circuit execution which, if true, will trigger the evaluation of `true_body`. Can be specified as either a tuple of a `ClassicalRegister` to be tested for equality with a given `int`, or as a tuple of a `Clbit` to be compared to either a `bool` or an `int`.
* **condition** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")*\[*[*ClassicalRegister*](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] |* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")*\[*[*Clbit*](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] |* [*expr.Expr*](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) A condition to be evaluated in real time during circuit execution which, if true, will trigger the evaluation of `true_body`. Can be specified as either a tuple of a `ClassicalRegister` to be tested for equality with a given `int`, or as a tuple of a `Clbit` to be compared to either a `bool` or an `int`.
* **true\_body** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) A program to be executed if `condition` evaluates to true.
* **false\_body** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *| None*) A optional program to be executed if `condition` evaluates to false.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) An optional label for identifying the instruction.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) An optional label for identifying the instruction.
## Attributes
@ -141,7 +141,7 @@ python_api_name: qiskit.circuit.IfElseOp
### assemble
<Function id="qiskit.circuit.IfElseOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.IfElseOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -185,7 +185,7 @@ python_api_name: qiskit.circuit.IfElseOp
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -209,7 +209,7 @@ python_api_name: qiskit.circuit.IfElseOp
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**
@ -233,7 +233,7 @@ python_api_name: qiskit.circuit.IfElseOp
**Return type**
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[expr.Var](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")]
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")\[[expr.Var](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")]
</Function>
### repeat
@ -245,7 +245,7 @@ python_api_name: qiskit.circuit.IfElseOp
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -311,7 +311,7 @@ python_api_name: qiskit.circuit.IfElseOp
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### to\_mutable

View File

@ -17,18 +17,18 @@ python_api_name: qiskit.circuit.Instruction
**Parameters**
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) instruction name
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) instructions qubit width
* **num\_clbits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) instructions clbit width
* **params** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*|*[*complex*](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")*|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*|ndarray|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")*]*) list of parameters
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *or*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) instructions duration. it must be integer if `unit` is dt
* **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) time unit of duration
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *or None*) An optional label for identifying the instruction.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) instruction name
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) instructions qubit width
* **num\_clbits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) instructions clbit width
* **params** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*|*[*complex*](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)")*|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*|ndarray|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")*]*) list of parameters
* **duration** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *or*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) instructions duration. it must be integer if `unit` is dt
* **unit** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) time unit of duration
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *or None*) An optional label for identifying the instruction.
**Raises**
* [**CircuitError**](circuit#qiskit.circuit.CircuitError "qiskit.circuit.CircuitError") when the register is not in the correct format.
* [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.12)") when the optional label is provided, but it is not a string.
* [**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.13)") when the optional label is provided, but it is not a string.
## Attributes
@ -145,7 +145,7 @@ python_api_name: qiskit.circuit.Instruction
### assemble
<Function id="qiskit.circuit.Instruction.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.Instruction.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -189,7 +189,7 @@ python_api_name: qiskit.circuit.Instruction
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -213,7 +213,7 @@ python_api_name: qiskit.circuit.Instruction
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**
@ -239,7 +239,7 @@ python_api_name: qiskit.circuit.Instruction
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -287,7 +287,7 @@ python_api_name: qiskit.circuit.Instruction
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### to\_mutable

View File

@ -9,7 +9,7 @@ python_api_name: qiskit.circuit.InstructionSet
# InstructionSet
<Class id="qiskit.circuit.InstructionSet" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instructionset.py#L28-L177" signature="qiskit.circuit.InstructionSet(*, resource_requester=None)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.12)")
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")
Instruction collection, and their contexts.
@ -70,8 +70,8 @@ python_api_name: qiskit.circuit.InstructionSet
**Parameters**
* **classical** ([*Clbit*](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") *|*[*ClassicalRegister*](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") *|*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) the classical resource the equality condition should be on. If this is given as an integer, it will be resolved into a [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") using the same conventions as the circuit these instructions are attached to.
* **val** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) the value the classical resource should be equal to.
* **classical** ([*Clbit*](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") *|*[*ClassicalRegister*](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister") *|*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the classical resource the equality condition should be on. If this is given as an integer, it will be resolved into a [`Clbit`](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit") using the same conventions as the circuit these instructions are attached to.
* **val** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) the value the classical resource should be equal to.
**Returns**

View File

@ -9,7 +9,7 @@ python_api_name: qiskit.circuit.Operation
# Operation
<Class id="qiskit.circuit.Operation" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/operation.py#L18-L67" signature="qiskit.circuit.Operation" modifiers="class">
Bases: [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.12)")
Bases: [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.13)")
Quantum operation interface.

View File

@ -44,7 +44,7 @@ python_api_name: qiskit.circuit.Parameter
**Parameters**
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name of the `Parameter`, used for visual representation. This can be any Unicode string, e.g. “ϕ”.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name of the `Parameter`, used for visual representation. This can be any Unicode string, e.g. “ϕ”.
* **uuid** (*UUID | None*) For advanced usage only. Override the UUID of this parameter, in order to make it compare equal to some other parameter object. By default, two parameters with the same name do not compare equal to help catch shadowing bugs when two circuits containing the same named parameters are spurious combined. Setting the `uuid` field when creating two parameters to the same thing (along with the same name) allows them to be equal. This is useful during serialization and deserialization.
## Attributes
@ -64,7 +64,7 @@ python_api_name: qiskit.circuit.Parameter
### uuid
<Attribute id="qiskit.circuit.Parameter.uuid">
Returns the [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.12)") of the [`Parameter`](#qiskit.circuit.Parameter "qiskit.circuit.Parameter").
Returns the [`UUID`](https://docs.python.org/3/library/uuid.html#uuid.UUID "(in Python v3.13)") of the [`Parameter`](#qiskit.circuit.Parameter "qiskit.circuit.Parameter").
In advanced use cases, this property can be passed to the [`Parameter`](#qiskit.circuit.Parameter "qiskit.circuit.Parameter") constructor to produce an instance that compares equal to another instance.
</Attribute>
@ -117,8 +117,8 @@ python_api_name: qiskit.circuit.Parameter
**Parameters**
* **parameter\_values** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")) Mapping of Parameter instances to the numeric value to which they will be bound.
* **allow\_unknown\_parameters** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If `False`, raises an error if `parameter_values` contains Parameters in the keys outside those present in the expression. If `True`, any such parameters are simply ignored.
* **parameter\_values** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) Mapping of Parameter instances to the numeric value to which they will be bound.
* **allow\_unknown\_parameters** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If `False`, raises an error if `parameter_values` contains Parameters in the keys outside those present in the expression. If `True`, any such parameters are simply ignored.
**Raises**
@ -126,7 +126,7 @@ python_api_name: qiskit.circuit.Parameter
* If parameter\_values contains Parameters outside those in self. - If a non-numeric value is passed in parameter\_values.
* [**ZeroDivisionError**](https://docs.python.org/3/library/exceptions.html#ZeroDivisionError "(in Python v3.12)")
* [**ZeroDivisionError**](https://docs.python.org/3/library/exceptions.html#ZeroDivisionError "(in Python v3.13)")
* If binding the provided values requires division by zero.
@ -176,7 +176,7 @@ python_api_name: qiskit.circuit.Parameter
**Return type**
[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") | [complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")
[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") | [complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)")
</Function>
### is\_real
@ -194,11 +194,11 @@ python_api_name: qiskit.circuit.Parameter
### numeric
<Function id="qiskit.circuit.Parameter.numeric" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/parameterexpression.py#L496-L540" signature="numeric()">
Return a Python number representing this object, using the most restrictive of [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)"), [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") and [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)") that is valid for this object.
Return a Python number representing this object, using the most restrictive of [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)"), [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") and [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)") that is valid for this object.
In general, an [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") is only returned if the expression only involved symbolic integers. If floating-point values were used during the evaluation, the return value will be a [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") regardless of whether the represented value is an integer. This is because floating-point values “infect” symbolic computations by their inexact nature, and symbolic libraries will use inexact floating-point semantics not exact real-number semantics when they are involved. If you want to assert that all floating-point calculations *were* carried out at infinite precision (i.e. [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") could represent every intermediate value exactly), you can use [`float.is_integer()`](https://docs.python.org/3/library/stdtypes.html#float.is_integer "(in Python v3.12)") to check if the return float represents an integer and cast it using [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") if so. This would be an unusual pattern; typically one requires this by only ever using explicitly [`Rational`](https://docs.python.org/3/library/numbers.html#numbers.Rational "(in Python v3.12)") objects while working with symbolic expressions.
In general, an [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") is only returned if the expression only involved symbolic integers. If floating-point values were used during the evaluation, the return value will be a [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") regardless of whether the represented value is an integer. This is because floating-point values “infect” symbolic computations by their inexact nature, and symbolic libraries will use inexact floating-point semantics not exact real-number semantics when they are involved. If you want to assert that all floating-point calculations *were* carried out at infinite precision (i.e. [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") could represent every intermediate value exactly), you can use [`float.is_integer()`](https://docs.python.org/3/library/stdtypes.html#float.is_integer "(in Python v3.13)") to check if the return float represents an integer and cast it using [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") if so. This would be an unusual pattern; typically one requires this by only ever using explicitly [`Rational`](https://docs.python.org/3/library/numbers.html#numbers.Rational "(in Python v3.13)") objects while working with symbolic expressions.
This is more reliable and performant than using [`is_real()`](#qiskit.circuit.Parameter.is_real "qiskit.circuit.Parameter.is_real") followed by calling [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") or [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)"), as in some cases [`is_real()`](#qiskit.circuit.Parameter.is_real "qiskit.circuit.Parameter.is_real") needs to force a floating-point evaluation to determine an accurate result to work around bugs in the upstream symbolic libraries.
This is more reliable and performant than using [`is_real()`](#qiskit.circuit.Parameter.is_real "qiskit.circuit.Parameter.is_real") followed by calling [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") or [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)"), as in some cases [`is_real()`](#qiskit.circuit.Parameter.is_real "qiskit.circuit.Parameter.is_real") needs to force a floating-point evaluation to determine an accurate result to work around bugs in the upstream symbolic libraries.
**Returns**
@ -206,11 +206,11 @@ python_api_name: qiskit.circuit.Parameter
**Raises**
[**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.12)") if there are unbound parameters.
[**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.13)") if there are unbound parameters.
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") | [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") | [complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") | [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") | [complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)")
</Function>
### sign

View File

@ -9,7 +9,7 @@ python_api_name: qiskit.circuit.ParameterExpression
# ParameterExpression
<Class id="qiskit.circuit.ParameterExpression" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/parameterexpression.py#L33-L554" signature="qiskit.circuit.ParameterExpression(symbol_map, expr)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.12)")
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")
ParameterExpression class to enable creating expressions of Parameters.
@ -19,7 +19,7 @@ python_api_name: qiskit.circuit.ParameterExpression
**Parameters**
* **symbol\_map** (*Dict\[*[*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.Parameter")*, \[*[*ParameterExpression*](#qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*, or* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]]*) Mapping of [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") instances to the `sympy.Symbol` serving as their placeholder in expr.
* **symbol\_map** (*Dict\[*[*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.Parameter")*, \[*[*ParameterExpression*](#qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*, or* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]]*) Mapping of [`Parameter`](qiskit.circuit.Parameter "qiskit.circuit.Parameter") instances to the `sympy.Symbol` serving as their placeholder in expr.
* **expr** (*sympy.Expr*) Expression of `sympy.Symbol` s.
## Attributes
@ -64,7 +64,7 @@ python_api_name: qiskit.circuit.ParameterExpression
**Parameters**
* **parameter** ([*Parameter*](qiskit.circuit.Parameter "qiskit.circuit.Parameter")) A parameter in this expression whose value will be updated.
* **value** ([*ParameterExpression*](#qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") *|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) The new value to bind to.
* **value** ([*ParameterExpression*](#qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") *|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) The new value to bind to.
**Returns**
@ -82,8 +82,8 @@ python_api_name: qiskit.circuit.ParameterExpression
**Parameters**
* **parameter\_values** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")) Mapping of Parameter instances to the numeric value to which they will be bound.
* **allow\_unknown\_parameters** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If `False`, raises an error if `parameter_values` contains Parameters in the keys outside those present in the expression. If `True`, any such parameters are simply ignored.
* **parameter\_values** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) Mapping of Parameter instances to the numeric value to which they will be bound.
* **allow\_unknown\_parameters** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If `False`, raises an error if `parameter_values` contains Parameters in the keys outside those present in the expression. If `True`, any such parameters are simply ignored.
**Raises**
@ -91,7 +91,7 @@ python_api_name: qiskit.circuit.ParameterExpression
* If parameter\_values contains Parameters outside those in self. - If a non-numeric value is passed in parameter\_values.
* [**ZeroDivisionError**](https://docs.python.org/3/library/exceptions.html#ZeroDivisionError "(in Python v3.12)")
* [**ZeroDivisionError**](https://docs.python.org/3/library/exceptions.html#ZeroDivisionError "(in Python v3.13)")
* If binding the provided values requires division by zero.
@ -141,7 +141,7 @@ python_api_name: qiskit.circuit.ParameterExpression
**Return type**
[*ParameterExpression*](#qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") | [complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")
[*ParameterExpression*](#qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") | [complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)")
</Function>
### is\_real
@ -159,11 +159,11 @@ python_api_name: qiskit.circuit.ParameterExpression
### numeric
<Function id="qiskit.circuit.ParameterExpression.numeric" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/parameterexpression.py#L496-L540" signature="numeric()">
Return a Python number representing this object, using the most restrictive of [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)"), [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") and [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)") that is valid for this object.
Return a Python number representing this object, using the most restrictive of [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)"), [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") and [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)") that is valid for this object.
In general, an [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") is only returned if the expression only involved symbolic integers. If floating-point values were used during the evaluation, the return value will be a [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") regardless of whether the represented value is an integer. This is because floating-point values “infect” symbolic computations by their inexact nature, and symbolic libraries will use inexact floating-point semantics not exact real-number semantics when they are involved. If you want to assert that all floating-point calculations *were* carried out at infinite precision (i.e. [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") could represent every intermediate value exactly), you can use [`float.is_integer()`](https://docs.python.org/3/library/stdtypes.html#float.is_integer "(in Python v3.12)") to check if the return float represents an integer and cast it using [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") if so. This would be an unusual pattern; typically one requires this by only ever using explicitly [`Rational`](https://docs.python.org/3/library/numbers.html#numbers.Rational "(in Python v3.12)") objects while working with symbolic expressions.
In general, an [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") is only returned if the expression only involved symbolic integers. If floating-point values were used during the evaluation, the return value will be a [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") regardless of whether the represented value is an integer. This is because floating-point values “infect” symbolic computations by their inexact nature, and symbolic libraries will use inexact floating-point semantics not exact real-number semantics when they are involved. If you want to assert that all floating-point calculations *were* carried out at infinite precision (i.e. [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") could represent every intermediate value exactly), you can use [`float.is_integer()`](https://docs.python.org/3/library/stdtypes.html#float.is_integer "(in Python v3.13)") to check if the return float represents an integer and cast it using [`int`](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") if so. This would be an unusual pattern; typically one requires this by only ever using explicitly [`Rational`](https://docs.python.org/3/library/numbers.html#numbers.Rational "(in Python v3.13)") objects while working with symbolic expressions.
This is more reliable and performant than using [`is_real()`](#qiskit.circuit.ParameterExpression.is_real "qiskit.circuit.ParameterExpression.is_real") followed by calling [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") or [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)"), as in some cases [`is_real()`](#qiskit.circuit.ParameterExpression.is_real "qiskit.circuit.ParameterExpression.is_real") needs to force a floating-point evaluation to determine an accurate result to work around bugs in the upstream symbolic libraries.
This is more reliable and performant than using [`is_real()`](#qiskit.circuit.ParameterExpression.is_real "qiskit.circuit.ParameterExpression.is_real") followed by calling [`float`](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") or [`complex`](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)"), as in some cases [`is_real()`](#qiskit.circuit.ParameterExpression.is_real "qiskit.circuit.ParameterExpression.is_real") needs to force a floating-point evaluation to determine an accurate result to work around bugs in the upstream symbolic libraries.
**Returns**
@ -171,11 +171,11 @@ python_api_name: qiskit.circuit.ParameterExpression
**Raises**
[**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.12)") if there are unbound parameters.
[**TypeError**](https://docs.python.org/3/library/exceptions.html#TypeError "(in Python v3.13)") if there are unbound parameters.
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") | [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") | [complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") | [float](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") | [complex](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)")
</Function>
### sign
@ -197,8 +197,8 @@ python_api_name: qiskit.circuit.ParameterExpression
**Parameters**
* **parameter\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)")) Mapping from Parameters in self to the ParameterExpression instances with which they should be replaced.
* **allow\_unknown\_parameters** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If `False`, raises an error if `parameter_map` contains Parameters in the keys outside those present in the expression. If `True`, any such parameters are simply ignored.
* **parameter\_map** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)")) Mapping from Parameters in self to the ParameterExpression instances with which they should be replaced.
* **allow\_unknown\_parameters** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If `False`, raises an error if `parameter_map` contains Parameters in the keys outside those present in the expression. If `True`, any such parameters are simply ignored.
**Raises**

View File

@ -9,7 +9,7 @@ python_api_name: qiskit.circuit.ParameterVector
# ParameterVector
<Class id="qiskit.circuit.ParameterVector" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/parametervector.py#L50-L120" signature="qiskit.circuit.ParameterVector(name, length=0)" modifiers="class">
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.12)")
Bases: [`object`](https://docs.python.org/3/library/functions.html#object "(in Python v3.13)")
ParameterVector class to quickly generate lists of parameters.

File diff suppressed because it is too large Load Diff

View File

@ -137,7 +137,7 @@ python_api_name: qiskit.circuit.SwitchCaseOp
### assemble
<Function id="qiskit.circuit.SwitchCaseOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.SwitchCaseOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -211,7 +211,7 @@ python_api_name: qiskit.circuit.SwitchCaseOp
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -235,7 +235,7 @@ python_api_name: qiskit.circuit.SwitchCaseOp
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**
@ -259,7 +259,7 @@ python_api_name: qiskit.circuit.SwitchCaseOp
**Return type**
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[expr.Var](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")]
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")\[[expr.Var](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")]
</Function>
### repeat
@ -271,7 +271,7 @@ python_api_name: qiskit.circuit.SwitchCaseOp
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -354,7 +354,7 @@ python_api_name: qiskit.circuit.SwitchCaseOp
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### to\_mutable

View File

@ -17,9 +17,9 @@ python_api_name: qiskit.circuit.WhileLoopOp
**Parameters**
* **condition** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")*\[*[*ClassicalRegister*](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] |* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")*\[*[*Clbit*](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] |* [*expr.Expr*](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) A condition to be checked prior to executing `body`. Can be specified as either a tuple of a `ClassicalRegister` to be tested for equality with a given `int`, or as a tuple of a `Clbit` to be compared to either a `bool` or an `int`.
* **condition** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")*\[*[*ClassicalRegister*](circuit#qiskit.circuit.ClassicalRegister "qiskit.circuit.ClassicalRegister")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] |* [*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")*\[*[*Clbit*](circuit#qiskit.circuit.Clbit "qiskit.circuit.Clbit")*,* [*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] |* [*expr.Expr*](circuit_classical#qiskit.circuit.classical.expr.Expr "qiskit.circuit.classical.expr.Expr")) A condition to be checked prior to executing `body`. Can be specified as either a tuple of a `ClassicalRegister` to be tested for equality with a given `int`, or as a tuple of a `Clbit` to be compared to either a `bool` or an `int`.
* **body** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")) The loop body to be repeatedly executed.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) An optional label for identifying the instruction.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) An optional label for identifying the instruction.
## Attributes
@ -138,7 +138,7 @@ python_api_name: qiskit.circuit.WhileLoopOp
### assemble
<Function id="qiskit.circuit.WhileLoopOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.WhileLoopOp.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -182,7 +182,7 @@ python_api_name: qiskit.circuit.WhileLoopOp
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -206,7 +206,7 @@ python_api_name: qiskit.circuit.WhileLoopOp
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**
@ -230,7 +230,7 @@ python_api_name: qiskit.circuit.WhileLoopOp
**Return type**
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[expr.Var](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")]
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")\[[expr.Var](circuit_classical#qiskit.circuit.classical.expr.Var "qiskit.circuit.classical.expr.Var")]
</Function>
### repeat
@ -242,7 +242,7 @@ python_api_name: qiskit.circuit.WhileLoopOp
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -321,7 +321,7 @@ python_api_name: qiskit.circuit.WhileLoopOp
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### to\_mutable

View File

@ -15,9 +15,9 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Parameters**
* **expression** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The logical expression string.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Optional. Instruction gate name. Otherwise part of the expression is going to be used.
* **var\_order** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")) A list with the order in which variables will be created. (default: by appearance)
* **expression** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The logical expression string.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Optional. Instruction gate name. Otherwise part of the expression is going to be used.
* **var\_order** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) A list with the order in which variables will be created. (default: by appearance)
## Attributes
@ -134,7 +134,7 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
### assemble
<Function id="qiskit.circuit.classicalfunction.BooleanExpression.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.classicalfunction.BooleanExpression.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -179,8 +179,8 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Parameters**
* **qargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")) List of quantum bit arguments.
* **cargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")) List of classical bit arguments.
* **qargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) List of quantum bit arguments.
* **cargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) List of classical bit arguments.
**Returns**
@ -192,7 +192,7 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Return type**
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")]]
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")]]
</Function>
### c\_if
@ -214,10 +214,10 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of controls to add to gate (default: `1`)
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) optional gate label. Ignored if implemented as an annotated operation.
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) the control state in decimal or as a bitstring (e.g. `'111'`). If `None`, use `2**num_ctrl_qubits-1`.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) indicates whether the controlled gate is implemented as an annotated gate. If `None`, this is set to `False` if the controlled gate can directly be constructed, and otherwise set to `True`. This allows defering the construction process in case the synthesis of the controlled gate requires more information (e.g. values of unbound parameters).
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of controls to add to gate (default: `1`)
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) optional gate label. Ignored if implemented as an annotated operation.
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) the control state in decimal or as a bitstring (e.g. `'111'`). If `None`, use `2**num_ctrl_qubits-1`.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) indicates whether the controlled gate is implemented as an annotated gate. If `None`, this is set to `False` if the controlled gate can directly be constructed, and otherwise set to `True`. This allows defering the construction process in case the synthesis of the controlled gate requires more information (e.g. values of unbound parameters).
**Returns**
@ -235,7 +235,7 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -261,7 +261,7 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Raises**
[**FileNotFoundError**](https://docs.python.org/3/library/exceptions.html#FileNotFoundError "(in Python v3.12)") If filename is not found.
[**FileNotFoundError**](https://docs.python.org/3/library/exceptions.html#FileNotFoundError "(in Python v3.13)") If filename is not found.
</Function>
### inverse
@ -277,7 +277,7 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**
@ -303,8 +303,8 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Parameters**
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
**Returns**
@ -324,7 +324,7 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -366,7 +366,7 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Parameters**
**bitstring** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The bitstring for which to evaluate.
**bitstring** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The bitstring for which to evaluate.
**Returns**
@ -374,7 +374,7 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### soft\_compare
@ -392,7 +392,7 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### synth
@ -402,8 +402,8 @@ python_api_name: qiskit.circuit.classicalfunction.BooleanExpression
**Parameters**
* **registerless** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Default `True`. If `False` uses the parameter names to create registers with those names. Otherwise, creates a circuit with a flat quantum register.
* **synthesizer** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.12)")*\[\[*[*BooleanExpression*](#qiskit.circuit.classicalfunction.BooleanExpression "qiskit.circuit.classicalfunction.boolean_expression.BooleanExpression")*],* [*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*] | None*) A callable that takes self and returns a Tweedledum circuit.
* **registerless** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Default `True`. If `False` uses the parameter names to create registers with those names. Otherwise, creates a circuit with a flat quantum register.
* **synthesizer** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.13)")*\[\[*[*BooleanExpression*](#qiskit.circuit.classicalfunction.BooleanExpression "qiskit.circuit.classicalfunction.boolean_expression.BooleanExpression")*],* [*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*] | None*) A callable that takes self and returns a Tweedledum circuit.
**Returns**

View File

@ -19,8 +19,8 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Parameters**
* **source** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Python code with type hints.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Optional. Default: “*classicalfunction*”. ClassicalFunction name.
* **source** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Python code with type hints.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Optional. Default: “*classicalfunction*”. ClassicalFunction name.
**Raises**
@ -162,7 +162,7 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")([dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.12)"))
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")([dict](https://docs.python.org/3/library/stdtypes.html#dict "(in Python v3.13)"))
</Attribute>
### unit
@ -185,7 +185,7 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
### assemble
<Function id="qiskit.circuit.classicalfunction.ClassicalFunction.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/utils/deprecation.py#L365-L375" signature="assemble()">
<Function id="qiskit.circuit.classicalfunction.ClassicalFunction.assemble" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/instruction.py#L365-L375" signature="assemble()">
Assemble a QasmQobjInstruction
<Admonition title="Deprecated since version 1.2" type="danger">
@ -230,8 +230,8 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Parameters**
* **qargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")) List of quantum bit arguments.
* **cargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")) List of classical bit arguments.
* **qargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) List of quantum bit arguments.
* **cargs** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")) List of classical bit arguments.
**Returns**
@ -243,7 +243,7 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Return type**
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.12)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")]]
[*Iterable*](https://docs.python.org/3/library/typing.html#typing.Iterable "(in Python v3.13)")\[[tuple](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")\[[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)"), [list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")]]
</Function>
### c\_if
@ -271,10 +271,10 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of controls to add to gate (default: `1`)
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) optional gate label. Ignored if implemented as an annotated operation.
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) the control state in decimal or as a bitstring (e.g. `'111'`). If `None`, use `2**num_ctrl_qubits-1`.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) indicates whether the controlled gate is implemented as an annotated gate. If `None`, this is set to `False` if the controlled gate can directly be constructed, and otherwise set to `True`. This allows defering the construction process in case the synthesis of the controlled gate requires more information (e.g. values of unbound parameters).
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of controls to add to gate (default: `1`)
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) optional gate label. Ignored if implemented as an annotated operation.
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) the control state in decimal or as a bitstring (e.g. `'111'`). If `None`, use `2**num_ctrl_qubits-1`.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) indicates whether the controlled gate is implemented as an annotated gate. If `None`, this is set to `False` if the controlled gate can directly be constructed, and otherwise set to `True`. This allows defering the construction process in case the synthesis of the controlled gate requires more information (e.g. values of unbound parameters).
**Returns**
@ -292,7 +292,7 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Parameters**
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) name to be given to the copied circuit, if `None` then the name stays the same.
**name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) name to be given to the copied circuit, if `None` then the name stays the same.
**Returns**
@ -316,7 +316,7 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**
@ -342,8 +342,8 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Parameters**
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
**Returns**
@ -363,7 +363,7 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Parameters**
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of times to repeat the instruction
**n** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of times to repeat the instruction
**Returns**
@ -405,7 +405,7 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Parameters**
**bitstring** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The bitstring for which to evaluate.
**bitstring** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The bitstring for which to evaluate.
**Returns**
@ -413,7 +413,7 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### simulate\_all
@ -427,7 +427,7 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Return type**
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")
[str](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")
</Function>
### soft\_compare
@ -445,7 +445,7 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### synth
@ -455,10 +455,10 @@ python_api_name: qiskit.circuit.classicalfunction.ClassicalFunction
**Parameters**
* **registerless** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Default `True`. If `False` uses the parameter names to create
* **registerless** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Default `True`. If `False` uses the parameter names to create
* **Otherwise** (*registers with those names.*)
* **register.** (*creates a circuit with a flat quantum*)
* **synthesizer** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.12)")*\[\[ClassicalElement],* [*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*] | None*) Optional. If None tweedledums pkrm\_synth is used.
* **synthesizer** ([*Callable*](https://docs.python.org/3/library/typing.html#typing.Callable "(in Python v3.13)")*\[\[ClassicalElement],* [*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")*] | None*) Optional. If None tweedledums pkrm\_synth is used.
**Returns**

View File

@ -27,9 +27,9 @@ python_api_name: qiskit.circuit.library.AND
**Parameters**
* **num\_variable\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The qubits of which the OR is computed. The result will be written into an additional result qubit.
* **flags** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*] | None*) A list of +1/0/-1 marking negations or omissions of qubits.
* **mcx\_mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The mode to be used to implement the multi-controlled X gate.
* **num\_variable\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) The qubits of which the OR is computed. The result will be written into an additional result qubit.
* **flags** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*] | None*) A list of +1/0/-1 marking negations or omissions of qubits.
* **mcx\_mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The mode to be used to implement the multi-controlled X gate.
## Attributes
@ -174,7 +174,7 @@ python_api_name: qiskit.circuit.library.AND
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -130,7 +130,7 @@ python_api_name: qiskit.circuit.library.C3SXGate
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -150,7 +150,7 @@ python_api_name: qiskit.circuit.library.C3SXGate
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**

View File

@ -121,7 +121,7 @@ python_api_name: qiskit.circuit.library.C3XGate
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -141,7 +141,7 @@ python_api_name: qiskit.circuit.library.C3XGate
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -167,10 +167,10 @@ python_api_name: qiskit.circuit.library.C3XGate
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) control state expressed as integer, string (e.g. `'110'`), or `None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the controlled gate should be implemented as an annotated gate.
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) control state expressed as integer, string (e.g. `'110'`), or `None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the controlled gate should be implemented as an annotated gate.
**Returns**
@ -188,7 +188,7 @@ python_api_name: qiskit.circuit.library.C3XGate
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**Returns**

View File

@ -126,7 +126,7 @@ python_api_name: qiskit.circuit.library.C4XGate
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -146,7 +146,7 @@ python_api_name: qiskit.circuit.library.C4XGate
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -172,10 +172,10 @@ python_api_name: qiskit.circuit.library.C4XGate
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) control state expressed as integer, string (e.g. `'110'`), or `None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the controlled gate should be implemented as an annotated gate.
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) control state expressed as integer, string (e.g. `'110'`), or `None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the controlled gate should be implemented as an annotated gate.
**Returns**
@ -193,7 +193,7 @@ python_api_name: qiskit.circuit.library.C4XGate
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**Returns**

View File

@ -177,7 +177,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -197,7 +197,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -223,10 +223,10 @@ $$
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) control state expressed as integer, string (e.g. `'110'`), or `None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the controlled gate should be implemented as an annotated gate.
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) control state expressed as integer, string (e.g. `'110'`), or `None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the controlled gate should be implemented as an annotated gate.
**Returns**
@ -244,7 +244,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**Returns**

View File

@ -152,7 +152,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -172,7 +172,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -198,7 +198,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**Returns**

View File

@ -69,13 +69,13 @@ python_api_name: qiskit.circuit.library.CDKMRippleCarryAdder
**Parameters**
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The number of qubits in either input register for state $|a\rangle$ or $|b\rangle$. The two input registers must have the same number of qubits.
* **kind** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The kind of adder, can be `'full'` for a full adder, `'half'` for a half adder, or `'fixed'` for a fixed-sized adder. A full adder includes both carry-in and carry-out, a half only carry-out, and a fixed-sized adder neither carry-in nor carry-out.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the circuit object.
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) The number of qubits in either input register for state $|a\rangle$ or $|b\rangle$. The two input registers must have the same number of qubits.
* **kind** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The kind of adder, can be `'full'` for a full adder, `'half'` for a half adder, or `'fixed'` for a fixed-sized adder. A full adder includes both carry-in and carry-out, a half only carry-out, and a fixed-sized adder neither carry-in nor carry-out.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the circuit object.
**Raises**
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") If `num_state_qubits` is lower than 1.
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.13)") If `num_state_qubits` is lower than 1.
## Attributes
@ -230,7 +230,7 @@ python_api_name: qiskit.circuit.library.CDKMRippleCarryAdder
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -167,7 +167,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -187,7 +187,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**

View File

@ -148,7 +148,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -168,7 +168,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -194,10 +194,10 @@ $$
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) control state expressed as integer, string (e.g.\`\`110`), or ``None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) indicates whether the controlled gate should be implemented as an annotated gate. If `None`, this is handled as `False`.
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) control state expressed as integer, string (e.g.\`\`110`), or ``None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) indicates whether the controlled gate should be implemented as an annotated gate. If `None`, this is handled as `False`.
**Returns**
@ -223,8 +223,8 @@ $$
**Parameters**
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
**Returns**

View File

@ -169,7 +169,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -189,7 +189,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -215,7 +215,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CRXGate`](#qiskit.circuit.library.CRXGate "qiskit.circuit.library.CRXGate") with an inverted parameter value.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CRXGate`](#qiskit.circuit.library.CRXGate "qiskit.circuit.library.CRXGate") with an inverted parameter value.
**Returns**

View File

@ -169,7 +169,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -189,7 +189,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -215,7 +215,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CRYGate`](#qiskit.circuit.library.CRYGate "qiskit.circuit.library.CRYGate") with an inverted parameter value.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CRYGate`](#qiskit.circuit.library.CRYGate "qiskit.circuit.library.CRYGate") with an inverted parameter value.
**Returns**

View File

@ -171,7 +171,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -191,7 +191,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -217,7 +217,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)"))
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)"))
**when set to `True`, this is typically used to return an**

View File

@ -143,7 +143,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -163,7 +163,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -189,7 +189,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CSdgGate`](qiskit.circuit.library.CSdgGate "qiskit.circuit.library.CSdgGate").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CSdgGate`](qiskit.circuit.library.CSdgGate "qiskit.circuit.library.CSdgGate").
**Returns**
@ -209,8 +209,8 @@ $$
**Parameters**
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
**Returns**

View File

@ -165,7 +165,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -185,7 +185,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**

View File

@ -143,7 +143,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -163,7 +163,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -189,7 +189,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CSGate`](qiskit.circuit.library.CSGate "qiskit.circuit.library.CSGate").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CSGate`](qiskit.circuit.library.CSGate "qiskit.circuit.library.CSGate").
**Returns**
@ -209,8 +209,8 @@ $$
**Parameters**
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
**Returns**

View File

@ -186,7 +186,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -206,7 +206,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -232,7 +232,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**Returns**

View File

@ -159,7 +159,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -179,7 +179,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -205,10 +205,10 @@ $$
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) control state expressed as integer, string (e.g.\`\`110`), or ``None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the controlled gate should be implemented as an annotated gate.
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) control state expressed as integer, string (e.g.\`\`110`), or ``None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the controlled gate should be implemented as an annotated gate.
**Returns**
@ -226,7 +226,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CU1Gate`](#qiskit.circuit.library.CU1Gate "qiskit.circuit.library.CU1Gate") with inverse parameter values.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CU1Gate`](#qiskit.circuit.library.CU1Gate "qiskit.circuit.library.CU1Gate") with inverse parameter values.
**Returns**

View File

@ -185,7 +185,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -205,7 +205,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -233,7 +233,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CU3Gate`](#qiskit.circuit.library.CU3Gate "qiskit.circuit.library.CU3Gate") with inverse parameter values.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CU3Gate`](#qiskit.circuit.library.CU3Gate "qiskit.circuit.library.CU3Gate") with inverse parameter values.
**Returns**

View File

@ -175,7 +175,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -209,7 +209,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CUGate`](#qiskit.circuit.library.CUGate "qiskit.circuit.library.CUGate") with inverse parameter values.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse of this gate is always a [`CUGate`](#qiskit.circuit.library.CUGate "qiskit.circuit.library.CUGate") with inverse parameter values.
**Returns**

View File

@ -173,7 +173,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -193,7 +193,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -219,10 +219,10 @@ $$
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) control state expressed as integer, string (e.g. `'110'`), or `None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the controlled gate should be implemented as an annotated gate.
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) control state expressed as integer, string (e.g. `'110'`), or `None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the controlled gate should be implemented as an annotated gate.
**Returns**
@ -240,7 +240,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**Returns**

View File

@ -165,7 +165,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -185,7 +185,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -211,7 +211,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**Returns**

View File

@ -146,7 +146,7 @@ $$
**Return type**
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")
[int](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")
</Attribute>
### num\_qubits
@ -166,7 +166,7 @@ $$
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
**Raises**
@ -192,7 +192,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**Returns**

View File

@ -53,7 +53,7 @@ $$
**Parameters**
**diag** (*Sequence\[*[*complex*](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")*]*) List of the $2^k$ diagonal entries (for a diagonal gate on $k$ qubits).
**diag** (*Sequence\[*[*complex*](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)")*]*) List of the $2^k$ diagonal entries (for a diagonal gate on $k$ qubits).
**Raises**
@ -202,7 +202,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -15,7 +15,7 @@ python_api_name: qiskit.circuit.library.DiagonalGate
**Parameters**
**diag** (*Sequence\[*[*complex*](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")*]*) list of the $2^k$ diagonal entries (for a diagonal gate on $k$ qubits).
**diag** (*Sequence\[*[*complex*](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)")*]*) list of the $2^k$ diagonal entries (for a diagonal gate on $k$ qubits).
## Attributes

View File

@ -40,13 +40,13 @@ python_api_name: qiskit.circuit.library.DraperQFTAdder
**Parameters**
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The number of qubits in either input register for state $|a\rangle$ or $|b\rangle$. The two input registers must have the same number of qubits.
* **kind** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The kind of adder, can be `'half'` for a half adder or `'fixed'` for a fixed-sized adder. A half adder contains a carry-out to represent the most-significant bit, but the fixed-sized adder doesnt and hence performs addition modulo `2 ** num_state_qubits`.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the circuit object.
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) The number of qubits in either input register for state $|a\rangle$ or $|b\rangle$. The two input registers must have the same number of qubits.
* **kind** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The kind of adder, can be `'half'` for a half adder or `'fixed'` for a fixed-sized adder. A half adder contains a carry-out to represent the most-significant bit, but the fixed-sized adder doesnt and hence performs addition modulo `2 ** num_state_qubits`.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the circuit object.
**Raises**
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") If `num_state_qubits` is lower than 1.
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.13)") If `num_state_qubits` is lower than 1.
## Attributes
@ -201,7 +201,7 @@ python_api_name: qiskit.circuit.library.DraperQFTAdder
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -177,7 +177,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**Returns**

View File

@ -63,16 +63,16 @@ python_api_name: qiskit.circuit.library.EfficientSU2
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) The number of qubits of the EfficientSU2 circuit.
* **reps** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Specifies how often the structure of a rotation layer followed by an entanglement layer is repeated.
* **su2\_gates** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*type*](https://docs.python.org/3/library/functions.html#type "(in Python v3.12)") *|*[*qiskit.circuit.Instruction*](qiskit.circuit.Instruction "qiskit.circuit.Instruction") *|*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*type*](https://docs.python.org/3/library/functions.html#type "(in Python v3.12)") *|*[*qiskit.circuit.Instruction*](qiskit.circuit.Instruction "qiskit.circuit.Instruction") *|*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")*] | None*) The SU(2) single qubit gates to apply in single qubit gate layers. If only one gate is provided, the same gate is applied to each qubit. If a list of gates is provided, all gates are applied to each qubit in the provided order.
* **entanglement** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]] | Callable\[\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*],* [*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]]*) Specifies the entanglement structure. Can be a string (full, linear, reverse\_linear, pairwise, circular, or sca), a list of integer-pairs specifying the indices of qubits entangled with one another, or a callable returning such a list provided with the index of the entanglement layer. Defaults to reverse\_linear entanglement. Note that reverse\_linear entanglement provides the same unitary as full with fewer entangling gates. See the Examples section of [`TwoLocal`](qiskit.circuit.library.TwoLocal "qiskit.circuit.library.TwoLocal") for more detail.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) The number of qubits of the EfficientSU2 circuit.
* **reps** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Specifies how often the structure of a rotation layer followed by an entanglement layer is repeated.
* **su2\_gates** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*type*](https://docs.python.org/3/library/functions.html#type "(in Python v3.13)") *|*[*qiskit.circuit.Instruction*](qiskit.circuit.Instruction "qiskit.circuit.Instruction") *|*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*type*](https://docs.python.org/3/library/functions.html#type "(in Python v3.13)") *|*[*qiskit.circuit.Instruction*](qiskit.circuit.Instruction "qiskit.circuit.Instruction") *|*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")*] | None*) The SU(2) single qubit gates to apply in single qubit gate layers. If only one gate is provided, the same gate is applied to each qubit. If a list of gates is provided, all gates are applied to each qubit in the provided order.
* **entanglement** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]] | Callable\[\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*],* [*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]]*) Specifies the entanglement structure. Can be a string (full, linear, reverse\_linear, pairwise, circular, or sca), a list of integer-pairs specifying the indices of qubits entangled with one another, or a callable returning such a list provided with the index of the entanglement layer. Defaults to reverse\_linear entanglement. Note that reverse\_linear entanglement provides the same unitary as full with fewer entangling gates. See the Examples section of [`TwoLocal`](qiskit.circuit.library.TwoLocal "qiskit.circuit.library.TwoLocal") for more detail.
* **initial\_state** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *| None*) A QuantumCircuit object to prepend to the circuit.
* **skip\_unentangled\_qubits** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If True, the single qubit gates are only applied to qubits that are entangled with another qubit. If False, the single qubit gates are applied to each qubit in the Ansatz. Defaults to False.
* **skip\_final\_rotation\_layer** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If False, a rotation layer is added at the end of the ansatz. If True, no rotation layer is added.
* **parameter\_prefix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The parameterized gates require a parameter to be defined, for which we use [`ParameterVector`](qiskit.circuit.ParameterVector "qiskit.circuit.ParameterVector").
* **insert\_barriers** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If True, barriers are inserted in between each layer. If False, no barriers are inserted.
* **flatten** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) Set this to `True` to output a flat circuit instead of nesting it inside multiple layers of gate objects. By default currently the contents of the output circuit will be wrapped in nested objects for cleaner visualization. However, if youre using this circuit for anything besides visualization its **strongly** recommended to set this flag to `True` to avoid a large performance overhead for parameter binding.
* **skip\_unentangled\_qubits** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If True, the single qubit gates are only applied to qubits that are entangled with another qubit. If False, the single qubit gates are applied to each qubit in the Ansatz. Defaults to False.
* **skip\_final\_rotation\_layer** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If False, a rotation layer is added at the end of the ansatz. If True, no rotation layer is added.
* **parameter\_prefix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The parameterized gates require a parameter to be defined, for which we use [`ParameterVector`](qiskit.circuit.ParameterVector "qiskit.circuit.ParameterVector").
* **insert\_barriers** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If True, barriers are inserted in between each layer. If False, no barriers are inserted.
* **flatten** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) Set this to `True` to output a flat circuit instead of nesting it inside multiple layers of gate objects. By default currently the contents of the output circuit will be wrapped in nested objects for cleaner visualization. However, if youre using this circuit for anything besides visualization its **strongly** recommended to set this flag to `True` to avoid a large performance overhead for parameter binding.
## Attributes
@ -293,7 +293,7 @@ python_api_name: qiskit.circuit.library.EfficientSU2
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### ordered\_parameters

View File

@ -15,14 +15,14 @@ python_api_name: qiskit.circuit.library.EvolvedOperatorAnsatz
**Parameters**
* **operators** (*BaseOperator |* [*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)") *| None*) The operators to evolve. If a circuit is passed, we assume it implements an already evolved operator and thus the circuit is not evolved again. Can be a single operator (circuit) or a list of operators (and circuits).
* **reps** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The number of times to repeat the evolved operators.
* **operators** (*BaseOperator |* [*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)") *| None*) The operators to evolve. If a circuit is passed, we assume it implements an already evolved operator and thus the circuit is not evolved again. Can be a single operator (circuit) or a list of operators (and circuits).
* **reps** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) The number of times to repeat the evolved operators.
* **evolution** (*EvolutionBase |* [*EvolutionSynthesis*](qiskit.synthesis.EvolutionSynthesis "qiskit.synthesis.EvolutionSynthesis") *| None*) A specification of which evolution synthesis to use for the [`PauliEvolutionGate`](qiskit.circuit.library.PauliEvolutionGate "qiskit.circuit.library.PauliEvolutionGate"). Defaults to first order Trotterization.
* **insert\_barriers** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Whether to insert barriers in between each evolution.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the circuit.
* **parameter\_prefix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| Sequence\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")*]*) Set the names of the circuit parameters. If a string, the same prefix will be used for each parameters. Can also be a list to specify a prefix per operator.
* **insert\_barriers** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Whether to insert barriers in between each evolution.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the circuit.
* **parameter\_prefix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| Sequence\[*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")*]*) Set the names of the circuit parameters. If a string, the same prefix will be used for each parameters. Can also be a list to specify a prefix per operator.
* **initial\_state** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *| None*) A [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") object to prepend to the circuit.
* **flatten** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) Set this to `True` to output a flat circuit instead of nesting it inside multiple layers of gate objects. By default currently the contents of the output circuit will be wrapped in nested objects for cleaner visualization. However, if youre using this circuit for anything besides visualization its **strongly** recommended to set this flag to `True` to avoid a large performance overhead for parameter binding.
* **flatten** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) Set this to `True` to output a flat circuit instead of nesting it inside multiple layers of gate objects. By default currently the contents of the output circuit will be wrapped in nested objects for cleaner visualization. However, if youre using this circuit for anything besides visualization its **strongly** recommended to set this flag to `True` to avoid a large performance overhead for parameter binding.
## Attributes
@ -257,7 +257,7 @@ python_api_name: qiskit.circuit.library.EvolvedOperatorAnsatz
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### operators
@ -271,7 +271,7 @@ python_api_name: qiskit.circuit.library.EvolvedOperatorAnsatz
**Return type**
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")
[list](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")
</Attribute>
### ordered\_parameters

View File

@ -19,10 +19,10 @@ $$
**Parameters**
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The number of qubits representing the value to invert.
* **scaling** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Scaling factor $s$ of the reciprocal function, i.e. to compute $s / x$.
* **neg\_vals** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Whether $x$ might represent negative values. In this case the first qubit is the sign, with $|1\rangle$ for negative and $|0\rangle$ for positive. For the negative case it is assumed that the remaining string represents $1 - x$. This is because $e^{-2 \pi i x} = e^{2 \pi i (1 - x)}$ for $x \in [0,1)$.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the object.
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) The number of qubits representing the value to invert.
* **scaling** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) Scaling factor $s$ of the reciprocal function, i.e. to compute $s / x$.
* **neg\_vals** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Whether $x$ might represent negative values. In this case the first qubit is the sign, with $|1\rangle$ for negative and $|0\rangle$ for positive. For the negative case it is assumed that the remaining string represents $1 - x$. This is because $e^{-2 \pi i x} = e^{2 \pi i (1 - x)}$ for $x \in [0,1)$.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the object.
<Admonition title="Note" type="note">
It is assumed that the binary string $x$ represents a number \< 1.
@ -171,7 +171,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -78,20 +78,20 @@ $$
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) The number of qubits of the ExcitationPreserving circuit.
* **mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Choose the entangler mode, can be iswap or fsim.
* **reps** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Specifies how often the structure of a rotation layer followed by an entanglement layer is repeated.
* **entanglement** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]] | Callable\[\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*],* [*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]]*) Specifies the entanglement structure. Can be a string (full, linear or sca), a list of integer-pairs specifying the indices of qubits entangled with one another, or a callable returning such a list provided with the index of the entanglement layer. See the Examples section of [`TwoLocal`](qiskit.circuit.library.TwoLocal "qiskit.circuit.library.TwoLocal") for more detail.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) The number of qubits of the ExcitationPreserving circuit.
* **mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Choose the entangler mode, can be iswap or fsim.
* **reps** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Specifies how often the structure of a rotation layer followed by an entanglement layer is repeated.
* **entanglement** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]] | Callable\[\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*],* [*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]]*) Specifies the entanglement structure. Can be a string (full, linear or sca), a list of integer-pairs specifying the indices of qubits entangled with one another, or a callable returning such a list provided with the index of the entanglement layer. See the Examples section of [`TwoLocal`](qiskit.circuit.library.TwoLocal "qiskit.circuit.library.TwoLocal") for more detail.
* **initial\_state** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *| None*) A QuantumCircuit object to prepend to the circuit.
* **skip\_unentangled\_qubits** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If True, the single qubit gates are only applied to qubits that are entangled with another qubit. If False, the single qubit gates are applied to each qubit in the Ansatz. Defaults to False.
* **skip\_final\_rotation\_layer** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If True, a rotation layer is added at the end of the ansatz. If False, no rotation layer is added. Defaults to True.
* **parameter\_prefix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The parameterized gates require a parameter to be defined, for which we use [`ParameterVector`](qiskit.circuit.ParameterVector "qiskit.circuit.ParameterVector").
* **insert\_barriers** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If True, barriers are inserted in between each layer. If False, no barriers are inserted.
* **flatten** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) Set this to `True` to output a flat circuit instead of nesting it inside multiple layers of gate objects. By default currently the contents of the output circuit will be wrapped in nested objects for cleaner visualization. However, if youre using this circuit for anything besides visualization its **strongly** recommended to set this flag to `True` to avoid a large performance overhead for parameter binding.
* **skip\_unentangled\_qubits** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If True, the single qubit gates are only applied to qubits that are entangled with another qubit. If False, the single qubit gates are applied to each qubit in the Ansatz. Defaults to False.
* **skip\_final\_rotation\_layer** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If True, a rotation layer is added at the end of the ansatz. If False, no rotation layer is added. Defaults to True.
* **parameter\_prefix** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The parameterized gates require a parameter to be defined, for which we use [`ParameterVector`](qiskit.circuit.ParameterVector "qiskit.circuit.ParameterVector").
* **insert\_barriers** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If True, barriers are inserted in between each layer. If False, no barriers are inserted.
* **flatten** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) Set this to `True` to output a flat circuit instead of nesting it inside multiple layers of gate objects. By default currently the contents of the output circuit will be wrapped in nested objects for cleaner visualization. However, if youre using this circuit for anything besides visualization its **strongly** recommended to set this flag to `True` to avoid a large performance overhead for parameter binding.
**Raises**
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") If the selected mode is not supported.
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.13)") If the selected mode is not supported.
## Attributes
@ -312,7 +312,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### ordered\_parameters

View File

@ -31,8 +31,8 @@ python_api_name: qiskit.circuit.library.FourierChecking
**Parameters**
* **f** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]*) truth table for f, length 2\*\*n list of \{1,-1}.
* **g** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]*) truth table for g, length 2\*\*n list of \{1,-1}.
* **f** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]*) truth table for f, length 2\*\*n list of \{1,-1}.
* **g** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]*) truth table for g, length 2\*\*n list of \{1,-1}.
**Raises**
@ -185,7 +185,7 @@ python_api_name: qiskit.circuit.library.FourierChecking
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -9,7 +9,7 @@ python_api_name: qiskit.circuit.library.FunctionalPauliRotations
# FunctionalPauliRotations
<Class id="qiskit.circuit.library.FunctionalPauliRotations" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/library/arithmetic/functional_pauli_rotations.py#L22-L114" signature="qiskit.circuit.library.FunctionalPauliRotations(num_state_qubits=None, basis='Y', name='F')" modifiers="class">
Bases: `BlueprintCircuit`, [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.12)")
Bases: `BlueprintCircuit`, [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.13)")
Base class for functional Pauli rotations.
@ -17,9 +17,9 @@ python_api_name: qiskit.circuit.library.FunctionalPauliRotations
**Parameters**
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) The number of qubits representing the state $|x\rangle$.
* **basis** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The kind of Pauli rotation to use. Must be X, Y or Z.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the circuit object.
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) The number of qubits representing the state $|x\rangle$.
* **basis** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The kind of Pauli rotation to use. Must be X, Y or Z.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the circuit object.
## Attributes
@ -196,7 +196,7 @@ python_api_name: qiskit.circuit.library.FunctionalPauliRotations
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -48,8 +48,8 @@ $$
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) width of gate.
* **theta** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*]] |* [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v2.1)")) a num\_qubits x num\_qubits symmetric matrix of interaction angles for each qubit pair. The upper triangle is considered.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) width of gate.
* **theta** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*]] |* [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v2.1)")) a num\_qubits x num\_qubits symmetric matrix of interaction angles for each qubit pair. The upper triangle is considered.
## Attributes
@ -194,7 +194,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -41,9 +41,9 @@ $$
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of qubits.
* **theta** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) rotation angle about axis determined by phi
* **phi** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) angle of rotation axis in xy-plane
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of qubits.
* **theta** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) rotation angle about axis determined by phi
* **phi** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) angle of rotation axis in xy-plane
## Attributes
@ -188,7 +188,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -41,8 +41,8 @@ $$
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of qubits.
* **theta** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) rotation angle about x-axis
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of qubits.
* **theta** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) rotation angle about x-axis
## Attributes
@ -187,7 +187,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -41,8 +41,8 @@ $$
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of qubits.
* **theta** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) rotation angle about y-axis
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of qubits.
* **theta** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) rotation angle about y-axis
## Attributes
@ -187,7 +187,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -41,8 +41,8 @@ $$
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of qubits.
* **phi** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) rotation angle about z-axis
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of qubits.
* **phi** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) rotation angle about z-axis
## Attributes
@ -187,7 +187,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -28,8 +28,8 @@ $$
**Parameters**
* **phase** ([*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") *|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) The value of phase it takes.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) An optional label for the gate.
* **phase** ([*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.parameterexpression.ParameterExpression") *|*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) The value of phase it takes.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) An optional label for the gate.
## Attributes
@ -147,7 +147,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse is always another [`GlobalPhaseGate`](#qiskit.circuit.library.GlobalPhaseGate "qiskit.circuit.library.GlobalPhaseGate") with an inverted parameter value.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as the inverse is always another [`GlobalPhaseGate`](#qiskit.circuit.library.GlobalPhaseGate "qiskit.circuit.library.GlobalPhaseGate") with an inverted parameter value.
**Returns**

View File

@ -41,7 +41,7 @@ $$
**Parameters**
**adjacency\_matrix** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)") *| np.ndarray*) input graph as n-by-n list of 0-1 lists
**adjacency\_matrix** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)") *| np.ndarray*) input graph as n-by-n list of 0-1 lists
**Raises**
@ -192,7 +192,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -155,10 +155,10 @@ $$
* **oracle** (*Union\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")*,* [*Statevector*](qiskit.quantum_info.Statevector "qiskit.quantum_info.Statevector")*]*) The phase oracle implementing a reflection about the bad state. Note that this is not a bitflip oracle, see the docstring for more information.
* **state\_preparation** (*Optional\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")*]*) The operator preparing the good and bad state. For Grovers algorithm, this is a n-qubit Hadamard gate and for amplitude amplification or estimation the operator $\mathcal{A}$.
* **zero\_reflection** (*Optional\[Union\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")*,* [*DensityMatrix*](qiskit.quantum_info.DensityMatrix "qiskit.quantum_info.DensityMatrix")*,* [*Operator*](qiskit.quantum_info.Operator "qiskit.quantum_info.Operator")*]]*) The reflection about the zero state, $\mathcal{S}_0$.
* **reflection\_qubits** (*Optional\[List\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]]*) Qubits on which the zero reflection acts on.
* **insert\_barriers** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Whether barriers should be inserted between the reflections and A.
* **mcx\_mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The mode to use for building the default zero reflection.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the circuit.
* **reflection\_qubits** (*Optional\[List\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]]*) Qubits on which the zero reflection acts on.
* **insert\_barriers** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Whether barriers should be inserted between the reflections and A.
* **mcx\_mode** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The mode to use for building the default zero reflection.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the circuit.
## Attributes
@ -303,7 +303,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### oracle

View File

@ -153,10 +153,10 @@ $$
**Parameters**
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) control state expressed as integer, string (e.g.\`\`110`), or ``None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)") *| None*) indicates whether the controlled gate should be implemented as an annotated gate. If `None`, this is handled as `False`.
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of control qubits.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) An optional label for the gate \[Default: `None`]
* **ctrl\_state** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *|*[*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) control state expressed as integer, string (e.g.\`\`110`), or ``None`. If `None`, use all 1s.
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)") *| None*) indicates whether the controlled gate should be implemented as an annotated gate. If `None`, this is handled as `False`.
**Returns**
@ -174,7 +174,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**Returns**

View File

@ -52,14 +52,14 @@ python_api_name: qiskit.circuit.library.HRSCumulativeMultiplier
**Parameters**
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The number of qubits in either input register for state $|a\rangle$ or $|b\rangle$. The two input registers must have the same number of qubits.
* **num\_result\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) The number of result qubits to limit the output to. If number of result qubits is $n$, multiplication modulo $2^n$ is performed to limit the output to the specified number of qubits. Default value is `2 * num_state_qubits` to represent any possible result from the multiplication of the two inputs.
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) The number of qubits in either input register for state $|a\rangle$ or $|b\rangle$. The two input registers must have the same number of qubits.
* **num\_result\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) The number of result qubits to limit the output to. If number of result qubits is $n$, multiplication modulo $2^n$ is performed to limit the output to the specified number of qubits. Default value is `2 * num_state_qubits` to represent any possible result from the multiplication of the two inputs.
* **adder** ([*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit") *| None*) Half adder circuit to be used for performing multiplication. The CDKMRippleCarryAdder is used as default if no adder is provided.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the circuit object.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the circuit object.
**Raises**
[**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError "(in Python v3.12)") If `num_result_qubits` is not default and a custom adder is provided.
[**NotImplementedError**](https://docs.python.org/3/library/exceptions.html#NotImplementedError "(in Python v3.13)") If `num_result_qubits` is not default and a custom adder is provided.
## Attributes
@ -224,7 +224,7 @@ python_api_name: qiskit.circuit.library.HRSCumulativeMultiplier
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -18,12 +18,12 @@ python_api_name: qiskit.circuit.library.HamiltonianGate
**Parameters**
* **data** (*np.ndarray |* [*Gate*](qiskit.circuit.Gate "qiskit.circuit.Gate") *| BaseOperator*) A hermitian operator.
* **time** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) Time evolution parameter.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *| None*) Unitary name for backend \[Default: `None`].
* **time** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *|*[*ParameterExpression*](qiskit.circuit.ParameterExpression "qiskit.circuit.ParameterExpression")) Time evolution parameter.
* **label** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *| None*) Unitary name for backend \[Default: `None`].
**Raises**
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.12)") if input data is not an N-qubit unitary operator.
[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError "(in Python v3.13)") if input data is not an N-qubit unitary operator.
## Attributes

View File

@ -45,7 +45,7 @@ $$
**Parameters**
**adjacency\_matrix** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]] |* [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v2.1)")) a symmetric n-by-n list of 0-1 lists. n will be the number of qubits.
**adjacency\_matrix** ([*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*List*](https://docs.python.org/3/library/typing.html#typing.List "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]] |* [*ndarray*](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray "(in NumPy v2.1)")) a symmetric n-by-n list of 0-1 lists. n will be the number of qubits.
**Raises**
@ -194,7 +194,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -150,7 +150,7 @@ $$
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) when set to `True`, this is typically used to return an [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation") with an inverse modifier set instead of a concrete [`Gate`](qiskit.circuit.Gate "qiskit.circuit.Gate"). However, for this class this argument is ignored as this gate is self-inverse.
**Returns**
@ -172,8 +172,8 @@ $$
**Parameters**
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
* **exponent** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) the power to raise the gate to
* **annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) indicates whether the power gate can be implemented as an annotated operation. In the case of several standard gates, such as [`RXGate`](qiskit.circuit.library.RXGate "qiskit.circuit.library.RXGate"), this argument is ignored when the power of a gate can be expressed in terms of another standard gate.
**Returns**

View File

@ -33,7 +33,7 @@ python_api_name: qiskit.circuit.library.IQP
**Parameters**
**interactions** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)") *| np.ndarray*) input n-by-n symmetric matrix.
**interactions** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)") *| np.ndarray*) input n-by-n symmetric matrix.
**Raises**
@ -182,7 +182,7 @@ python_api_name: qiskit.circuit.library.IQP
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -23,7 +23,7 @@ python_api_name: qiskit.circuit.library.Initialize
**Parameters**
* **params** ([*Statevector*](qiskit.quantum_info.Statevector "qiskit.quantum_info.Statevector") *| Sequence\[*[*complex*](https://docs.python.org/3/library/functions.html#complex "(in Python v3.12)")*] |* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)") *|*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)"))
* **params** ([*Statevector*](qiskit.quantum_info.Statevector "qiskit.quantum_info.Statevector") *| Sequence\[*[*complex*](https://docs.python.org/3/library/functions.html#complex "(in Python v3.13)")*] |* [*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)") *|*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)"))
The state to initialize to, can be either of the following.
@ -31,9 +31,9 @@ python_api_name: qiskit.circuit.library.Initialize
* Labels of basis states of the Pauli eigenstates Z, X, Y. See [`Statevector.from_label()`](qiskit.quantum_info.Statevector#from_label "qiskit.quantum_info.Statevector.from_label"). Notice the order of the labels is reversed with respect to the qubit index to be applied to. Example label 01 initializes the qubit zero to $|1\rangle$ and the qubit one to $|0\rangle$.
* An integer that is used as a bitmap indicating which qubits to initialize to $|1\rangle$. Example: setting params to 5 would initialize qubit 0 and qubit 2 to $|1\rangle$ and qubit 1 to $|0\rangle$.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) This parameter is only used if params is an int. Indicates the total number of qubits in the initialize call. Example: initialize covers 5 qubits and params is 3. This allows qubits 0 and 1 to be initialized to $|1\rangle$ and the remaining 3 qubits to be initialized to $|0\rangle$.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) This parameter is only used if params is an int. Indicates the total number of qubits in the initialize call. Example: initialize covers 5 qubits and params is 3. This allows qubits 0 and 1 to be initialized to $|1\rangle$ and the remaining 3 qubits to be initialized to $|0\rangle$.
* **normalize** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) Whether to normalize an input array to a unit vector.
* **normalize** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) Whether to normalize an input array to a unit vector.
## Attributes

View File

@ -48,7 +48,7 @@ $$
**Parameters**
**num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) width of top and bottom registers (half total circuit width)
**num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) width of top and bottom registers (half total circuit width)
## Attributes
@ -193,7 +193,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -25,10 +25,10 @@ $$
**Parameters**
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) Number of state qubits. If this is set it will determine the number of qubits required for the circuit.
* **value** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) The fixed value to compare with.
* **geq** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) If True, evaluate a `>=` condition, else `<`.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Name of the circuit.
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) Number of state qubits. If this is set it will determine the number of qubits required for the circuit.
* **value** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) The fixed value to compare with.
* **geq** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) If True, evaluate a `>=` condition, else `<`.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Name of the circuit.
## Attributes
@ -193,7 +193,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -24,9 +24,9 @@ python_api_name: qiskit.circuit.library.Isometry
**Parameters**
* **isometry** (*np.ndarray*) An isometry from $m$ to :math\`n\` qubits, i.e., a complex `np.ndarray` of dimension $2^n \times 2^m$ with orthonormal columns (given in the computational basis specified by the order of the ancillas and the input qubits, where the ancillas are considered to be more significant than the input qubits).
* **num\_ancillas\_zero** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of additional ancillas that start in the state $|0\rangle$ (the $n-m$ ancillas required for providing the output of the isometry are not accounted for here).
* **num\_ancillas\_dirty** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) Number of additional ancillas that start in an arbitrary state.
* **epsilon** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) Error tolerance of calculations.
* **num\_ancillas\_zero** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of additional ancillas that start in the state $|0\rangle$ (the $n-m$ ancillas required for providing the output of the isometry are not accounted for here).
* **num\_ancillas\_dirty** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) Number of additional ancillas that start in an arbitrary state.
* **epsilon** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) Error tolerance of calculations.
## Attributes
@ -154,7 +154,7 @@ python_api_name: qiskit.circuit.library.Isometry
**Parameters**
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**annotated** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if set to True the output inverse gate will be returned as [`AnnotatedOperation`](qiskit.circuit.AnnotatedOperation "qiskit.circuit.AnnotatedOperation").
**Returns**

View File

@ -56,14 +56,14 @@ $$
**Parameters**
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The number of qubits used to encode the variable $x$.
* **slope** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*]*) The slope of the linear function. Can be a list of slopes if it is a piecewise linear function.
* **offset** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*]*) The offset of the linear function. Can be a list of offsets if it is a piecewise linear function.
* **domain** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*]*) The domain of the function as tuple $(x_\min{}, x_\max{})$.
* **image** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*]*) The image of the function as tuple $(f_\min{}, f_\max{})$.
* **rescaling\_factor** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) The rescaling factor to adjust the accuracy in the Taylor approximation.
* **breakpoints** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")*] | None*) The breakpoints if the function is piecewise linear. If None, the function is not piecewise.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) Name of the circuit.
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) The number of qubits used to encode the variable $x$.
* **slope** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*]*) The slope of the linear function. Can be a list of slopes if it is a piecewise linear function.
* **offset** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)") *|*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*]*) The offset of the linear function. Can be a list of offsets if it is a piecewise linear function.
* **domain** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*]*) The domain of the function as tuple $(x_\min{}, x_\max{})$.
* **image** ([*tuple*](https://docs.python.org/3/library/stdtypes.html#tuple "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*,* [*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*]*) The image of the function as tuple $(f_\min{}, f_\max{})$.
* **rescaling\_factor** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) The rescaling factor to adjust the accuracy in the Taylor approximation.
* **breakpoints** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")*] | None*) The breakpoints if the function is piecewise linear. If None, the function is not piecewise.
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) Name of the circuit.
## Attributes
@ -208,7 +208,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters
@ -316,7 +316,7 @@ $$
**Parameters**
**scaled\_value** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) A function value from the Taylor expansion of $\hat{f}(x)$.
**scaled\_value** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) A function value from the Taylor expansion of $\hat{f}(x)$.
**Returns**
@ -324,7 +324,7 @@ $$
**Return type**
[float](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")
[float](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")
</Function>
</Class>

View File

@ -47,8 +47,8 @@ $$
**Parameters**
* **linear** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*] | np.ndarray\[*[*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")*] |* [*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *|*[*LinearFunction*](#qiskit.circuit.library.LinearFunction "qiskit.circuit.library.LinearFunction") *|*[*PermutationGate*](qiskit.circuit.library.PermutationGate "qiskit.circuit.library.PermutationGate") *|*[*Clifford*](qiskit.quantum_info.Clifford "qiskit.quantum_info.Clifford")) data from which a linear function can be constructed. It can be either a nxn matrix (describing the linear transformation), a permutation (which is a special case of a linear function), another linear function, a clifford (when it corresponds to a linear function), or a quantum circuit composed of linear gates (CX and SWAP) and other objects described above, including nested subcircuits.
* **validate\_input** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")) if True, performs more expensive input validation checks, such as checking that a given n x n matrix is invertible.
* **linear** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*] | np.ndarray\[*[*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")*] |* [*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit") *|*[*LinearFunction*](#qiskit.circuit.library.LinearFunction "qiskit.circuit.library.LinearFunction") *|*[*PermutationGate*](qiskit.circuit.library.PermutationGate "qiskit.circuit.library.PermutationGate") *|*[*Clifford*](qiskit.quantum_info.Clifford "qiskit.quantum_info.Clifford")) data from which a linear function can be constructed. It can be either a nxn matrix (describing the linear transformation), a permutation (which is a special case of a linear function), another linear function, a clifford (when it corresponds to a linear function), or a quantum circuit composed of linear gates (CX and SWAP) and other objects described above, including nested subcircuits.
* **validate\_input** ([*bool*](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")) if True, performs more expensive input validation checks, such as checking that a given n x n matrix is invertible.
**Raises**
@ -180,8 +180,8 @@ $$
**Parameters**
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) number of qubits of the extended function.
* **positions** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.12)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")*]*) describes the positions of original qubits in the extended functions qubits.
* **num\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) number of qubits of the extended function.
* **positions** ([*list*](https://docs.python.org/3/library/stdtypes.html#list "(in Python v3.13)")*\[*[*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")*]*) describes the positions of original qubits in the extended functions qubits.
**Returns**
@ -205,7 +205,7 @@ $$
**Return type**
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.12)")
[bool](https://docs.python.org/3/library/functions.html#bool "(in Python v3.13)")
</Function>
### mat\_str

View File

@ -38,11 +38,11 @@ $$
**Parameters**
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)") *| None*) The number of qubits representing the state $|x\rangle$.
* **slope** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) The slope of the controlled rotation.
* **offset** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.12)")) The offset of the controlled rotation.
* **basis** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The type of Pauli rotation (X, Y, Z).
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.12)")) The name of the circuit object.
* **num\_state\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)") *| None*) The number of qubits representing the state $|x\rangle$.
* **slope** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) The slope of the controlled rotation.
* **offset** ([*float*](https://docs.python.org/3/library/functions.html#float "(in Python v3.13)")) The offset of the controlled rotation.
* **basis** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The type of Pauli rotation (X, Y, Z).
* **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str "(in Python v3.13)")) The name of the circuit object.
## Attributes
@ -231,7 +231,7 @@ $$
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters

View File

@ -8,7 +8,7 @@ python_api_name: qiskit.circuit.library.MCMT
# MCMT
<Class id="qiskit.circuit.library.MCMT" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/library/generalized_gates/mcmt.py#L27-L155" signature="qiskit.circuit.library.MCMT(gate, num_ctrl_qubits, num_target_qubits)" modifiers="class">
<Class id="qiskit.circuit.library.MCMT" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/library/generalized_gates/mcmt.py#L27-L120" signature="qiskit.circuit.library.MCMT(gate, num_ctrl_qubits, num_target_qubits)" modifiers="class">
Bases: [`QuantumCircuit`](qiskit.circuit.QuantumCircuit "qiskit.circuit.quantumcircuit.QuantumCircuit")
The multi-controlled multi-target gate, for an arbitrary singly controlled target gate.
@ -32,16 +32,20 @@ python_api_name: qiskit.circuit.library.MCMT
Create a new multi-control multi-target gate.
<Admonition title="Deprecated since version 1.3_pending" type="danger">
The class `qiskit.circuit.library.generalized_gates.mcmt.MCMT` is pending deprecation as of qiskit 1.3. It will be marked deprecated in a future release, and then removed no earlier than 3 months after the release date. Use MCMTGate instead.
</Admonition>
**Parameters**
* **gate** ([*Gate*](qiskit.circuit.Gate "qiskit.circuit.Gate") *| Callable\[\[*[*QuantumCircuit*](qiskit.circuit.QuantumCircuit "qiskit.circuit.QuantumCircuit")*,* [*circuit.Qubit*](circuit#qiskit.circuit.Qubit "qiskit.circuit.Qubit")*,* [*circuit.Qubit*](circuit#qiskit.circuit.Qubit "qiskit.circuit.Qubit")*],* [*circuit.Instruction*](qiskit.circuit.Instruction "qiskit.circuit.Instruction")*]*) The gate to be applied controlled on the control qubits and applied to the target qubits. Can be either a Gate or a circuit method. If it is a callable, it will be casted to a Gate.
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The number of control qubits.
* **num\_target\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.12)")) The number of target qubits.
* **num\_ctrl\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) The number of control qubits.
* **num\_target\_qubits** ([*int*](https://docs.python.org/3/library/functions.html#int "(in Python v3.13)")) The number of target qubits.
**Raises**
* [**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") If the gate cannot be casted to a controlled gate.
* [**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") If the number of controls or targets is 0.
* [**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") If the gate cannot be casted to a controlled gate.
* [**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") If the number of controls or targets is 0.
## Attributes
@ -192,7 +196,7 @@ python_api_name: qiskit.circuit.library.MCMT
**Raises**
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.12)") When circuit is not scheduled.
[**AttributeError**](https://docs.python.org/3/library/exceptions.html#AttributeError "(in Python v3.13)") When circuit is not scheduled.
</Attribute>
### parameters
@ -295,13 +299,13 @@ python_api_name: qiskit.circuit.library.MCMT
### control
<Function id="qiskit.circuit.library.MCMT.control" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/library/generalized_gates/mcmt.py#L145-L151" signature="control(num_ctrl_qubits=1, label=None, ctrl_state=None, annotated=False)">
<Function id="qiskit.circuit.library.MCMT.control" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/library/generalized_gates/mcmt.py#L110-L116" signature="control(num_ctrl_qubits=1, label=None, ctrl_state=None, annotated=False)">
Return the controlled version of the MCMT circuit.
</Function>
### inverse
<Function id="qiskit.circuit.library.MCMT.inverse" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/library/generalized_gates/mcmt.py#L153-L155" signature="inverse(annotated=False)">
<Function id="qiskit.circuit.library.MCMT.inverse" github="https://github.com/Qiskit/qiskit/tree/main/qiskit/circuit/library/generalized_gates/mcmt.py#L118-L120" signature="inverse(annotated=False)">
Return the inverse MCMT circuit, which is itself.
</Function>
</Class>

Some files were not shown because too many files have changed in this diff Show More