cunqa.qpu.QPU
- class cunqa.qpu.QPU(id: int, qclient: cunqa.qclient.QClient, backend: Backend, family: str, endpoint: tuple)
Bases:
object
Class to define a QPU.
Methods
Class method to run a circuit in the QPU.
Attributes
backend
id
- run(circuit: dict | CunqaCircuit, transpile: bool = False, initial_layout: list[int] | None = None, opt_level: int = 1, **run_parameters: Any) QJob
Class method to run a circuit in the QPU.
It is important to note that if transpilation is set False, we asume user has already done the transpilation, otherwise some errors during the simulation can occur, for example if the QPU has a noise model with error associated to specific gates, if the circuit is not transpiled errors might not appear.
If transpile is False and initial_layout is provided, it will be ignored.
Possible instructions to add as **run_parameters can be: shots, method, parameter_binds, meas_level, …
- Args:
circuit (json dict or <class ‘qiskit.circuit.CunqaCircuit’>): circuit to be run in the QPU.
transpile (bool): if True, transpilation will be done with respect to the backend of the given QPU. Default is set to False.
initial_layout (list[int]): Initial position of virtual qubits on physical qubits for transpilation.
opt_level (int): optimization level for transpilation, default set to 1.
**run_parameters : any other simulation instructions.
- Return:
<class ‘QJob’> object.