qiskit.circuit.QuantumCircuit.tensor¶
- QuantumCircuit.tensor(other, inplace=False)[source]¶
Tensor
self
withother
.Remember that in the little-endian convention the leftmost operation will be at the bottom of the circuit. See also the docs for more information.
┌────────┐ ┌─────┐ ┌─────┐ q_0: ┤ bottom ├ ⊗ q_0: ┤ top ├ = q_0: ─┤ top ├── └────────┘ └─────┘ ┌┴─────┴─┐ q_1: ┤ bottom ├ └────────┘
- প্যারামিটার
other (QuantumCircuit) -- The other circuit to tensor this circuit with.
inplace (bool) -- If True, modify the object. Otherwise return composed circuit.
- রিটার্ন টাইপ
Optional[QuantumCircuit]
Examples
from qiskit import QuantumCircuit top = QuantumCircuit(1) top.x(0); bottom = QuantumCircuit(2) bottom.cry(0.2, 0, 1); tensored = bottom.tensor(top) tensored.draw('mpl')
- রিটার্নস
The tensored circuit (returns None if inplace==True).
- রিটার্ন টাইপ