interpreter module
Module contents (__init___.py)
- class interpreter.Interpreter
Bases:
objectThe parent class of all interpreters. It is the entry point of the translation.
- run(qc: QuantumCircuit, num_shots=1024) dict
Convert (if defined) and run the circuit.
- Parameters:
qc (QuantumCircuit) – Quantum circuit to run.
num_shots (int, optional) – Number of shots to run the circuit for. Defaults to 1024.
- Returns:
Results after running the circuit.
- Return type:
dict
- interpreter.transpile_two(qc: QuantumCircuit) QuantumCircuit
Convert a circuit to only use 2-input gates.
- Parameters:
qc (QuantumCircuit) – Input quantum circuit.
- Returns:
Quantum circuit that only uses 2-input gates.
- Return type:
QuantumCircuit