rshift

rshift(self, target)[source]

Add a target backend to circuit.

Parameters

target (BaseBackend) – The target backend

Returns

QuantumCircuit with attached target_backend.

Return type

QuantumCircuit

Raises
  • KaleidoscopeError – Input is not a valid backend instance.

  • KaleidoscopeError – Number of qubits larger than target backend.

Example

from qiskit import QuantumCircuit
import kaleidoscope.qiskit
from kaleidoscope.qiskit.services import Simulators

qc = QuantumCircuit(5, 5) >> Simulators.aer_vigo_simulator
print(qc.target_backend)
Traceback (most recent call last):
  File "<ipython-input-1-bdb7f62815cb>", line 5, in <module>
    qc = QuantumCircuit(5, 5) >> Simulators.aer_vigo_simulator
  File "/opt/miniconda3/envs/qiskit/lib/python3.9/site-packages/kaleidoscope/qiskit/services/_simulators.py", line 190, in __getattr__
    raise AttributeError("Couldn't load {}.".format(attr))
AttributeError: Couldn't load aer_vigo_simulator.

Use %tb to get the full traceback.