Circuit.append_circuit
- Circuit.append_circuit(circuit, location, as_circuit_gate=False, move=False)[source]
Append circuit at the qudit location specified.
- Parameters:
circuit (
Circuit
) – The circuit to append.location (
CircuitLocationLike
) – Apply the circuit to these qudits.as_circuit_gate (
bool
) – If true, append circuit as a unit block (CircuitGate) rather than each operation in circuit individually. (Default: False)move (
bool
) – Move circuit into circuit gate rather than copy. (Default: False)
- Returns:
- The starting cycle index of the appended circuit. If the
appended circuit is empty, then this will be -1.
- Return type:
int
- Raises:
ValueError – If circuit is not the same size as location.
See also