Bengali
Languages
English
Bengali
French
German
Japanese
Korean
Portuguese
Spanish
Tamil

qiskit.circuit.QuantumCircuit.tensor

QuantumCircuit.tensor(other, inplace=False)[source]

Tensor self with other.

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')

(Source code)

../_images/qiskit-circuit-QuantumCircuit-tensor-1.png
রিটার্নস

The tensored circuit (returns None if inplace==True).

রিটার্ন টাইপ

QuantumCircuit