qiskit.circuit.QuantumCircuit.append¶
- QuantumCircuit.append(instruction, qargs=None, cargs=None)[source]¶
Append one or more instructions to the end of the circuit, modifying the circuit in place.
The
qargs
andcargs
will be expanded and broadcast according to the rules of the givenInstruction
, and any non-Bit
specifiers (such as integer indices) will be resolved into the relevant instances.If a
CircuitInstruction
is given, it will be unwrapped, verified in the context of this circuit, and a new object will be appended to the circuit. In this case, you may not passqargs
orcargs
separately.- প্যারামিটার
instruction (Operation | CircuitInstruction) --
Instruction
instance to append, or aCircuitInstruction
with all its context.qargs (Sequence[QubitSpecifier] | None) -- specifiers of the
Qubit
s to attach instruction to.cargs (Sequence[ClbitSpecifier] | None) -- specifiers of the
Clbit
s to attach instruction to.
- রিটার্নস
a handle to the
CircuitInstruction
s that were actually added to the circuit.- রিটার্ন টাইপ
- রেইজেস
CircuitError -- if the operation passed is not an instance of
Instruction
.