qiskit.dagcircuit.DAGCircuit.compose¶
- DAGCircuit.compose(other, qubits=None, clbits=None, front=False, inplace=True)[Quellcode]¶
Compose the
other
circuit onto the output of this circuit.A subset of input wires of
other
are mapped to a subset of output wires of this circuit.other
can be narrower or of equal width toself
.- Parameter
other (DAGCircuit) – circuit to compose with self
qubits (list[Qubit|int]) – qubits of self to compose onto.
clbits (list[Clbit|int]) – clbits of self to compose onto.
front (bool) – If True, front composition will be performed (not implemented yet)
inplace (bool) – If True, modify the object. Otherwise return composed circuit.
- Rückgabe
the composed dag (returns None if inplace==True).
- Rückgabetyp
- Verursacht
DAGCircuitError – if
other
is wider or there are duplicate edge mappings.