Usage
Quick Start
import cirq import qiskit import pennylane as qml from pyquil import Program # Set your OpenAI API key openai.api_key = "<YOUR_OPENAI_API_KEY>"response = openai.Completion.create( engine="text-davinci-003", prompt=f"Translate the following instruction in Myanmar language to a Quantum Computing code snippet (Cirq, Qiskit, etc.): {myanmar_instruction}", max_tokens=300, temperature=0.5, n=1, stop=None, ) code = response.choices[0].text.strip() return codetry: exec_globals = {} exec_locals = {} exec(code, exec_globals, exec_locals) result = exec_locals.get('result', 'Output not available') return str(result) except Exception as e: return f"Error in execution: {str(e)}"
Sample Workflow
Last updated