qrisp.QuantumCircuit.compose#
- QuantumCircuit.compose(other: QuantumCircuit, qubits: QubitLike | None = None, clbits: ClbitLike | None = None, inplace: bool = True) QuantumCircuit | None[source]#
Composes this QuantumCircuit with another QuantumCircuit by appending the other to self.
- Parameters:
- otherQuantumCircuit
The QuantumCircuit to be appended to self.
- qubitsQubitLike | None, optional
The qubits to be used for the composition. If None, the qubits of self and other will be matched by their identifiers. The default is None.
- clbitsClbitLike | None, optional
The classical bits to be used for the composition. If None, the clbits of self and other will be matched by their identifiers. The default is None.
- inplacebool, optional
If True, the composition is performed in-place and self is modified. If False, a new QuantumCircuit is returned and self is not modified. The default is True.
- Returns:
- QuantumCircuit | None
The composed QuantumCircuit. Only returned if inplace is False.