Skip to main content

Getting Started

QuREKA에서Let’s 양자walk 작업을through 요청하고the 결과를process 확인하는of 과정을requesting 살펴봅시다.quantum jobs and verifying the results on QuREKA.

양자A 작업은Quantum 양자Job 회로를refers 포함하는to 일련의a 프로그램sequence 또는of 알고리즘을programs 가리키는데,or 단순히algorithms 하나의that 양자include 회로로quantum 표현되거나circuits. VQE,These QAOAcan 처럼range 고전-양자from 하이브리드a 계산이single 포함된circuit 일련의to 알고리즘일complex 수도classical-quantum 있습니다.hybrid computations such as VQE or QAOA. In this guide, we will create a simple quantum job containing a single quantum circuit.

1. Creating a Quantum Job


Creating a Quantum Server


To 문서에서는write 하나의and 양자execute 회로를quantum 포함하는circuit 간단한code, 양자you 작업을must 작성합니다.first create a Quantum Server. A Quantum Server provides dedicated computational resources for developing quantum algorithms.

양자 작업
    작성

  • Access Path: You can access this via the Dashboard or the [Quantum Server] menu in the sidebar.
  • How to Create: Click the [Create] button within the menu to create a new Quantum Server.

  • Server Types by Subscription: The types and specifications (vCPU, RAM, GPU, etc.) of the Quantum Servers available to you vary depending on your current Subscription Plan. If the desired server specification is not active, please update your plan on the Subscription page.
  • 개발Development 환경Environment 진입Configuration

    먼저
    All 양자Quantum 회로를Servers 작성하기on 위해QuREKA 대시보드의provide Notebookan 버튼을optimized 눌러서environment 접속합니다.

    커널with 선택

    접속을 마쳤다면 양자 작업을 작성할 커널을 선택합니다. QuREKA는 네 종류의 커널을 제공합니다.

  • Python(CPU): CPU 연산만을 사용하여 양자 회로를 시뮬레이션 할 수 있습니다.
  • Python(CPU): CUDA-Q에 기반하여 GPU 자원을 동원해 양자 회로를 시뮬레이션 할 수 있습니다.
  • Python: 양자 작업을 제출하기 위한 커널입니다.
  • Pytorch(GPU): Pytorch용 GPU 커널입니다.
  • Jupyter notebook 파일을 생성한 후에도 우측 상단의 커널 이름을 클릭하여 커널을 변경할 수 있습니다.

    양자 회로 작성

    사용자는NVIDIA CUDA-Q 또는pre-installed. Pennylane에You 기반하여can 양자immediately 회로를begin 작성할 수 있습니다. QuREKA는developing CUDA-Q에Q 최적화된based quantum algorithms through Jupyter Notebook without any additional framework installation.

    2. Writing a Quantum Circuit


    QuREKA provides DGX 서버를infrastructure 제공하므로optimized 우리는for NVIDIA CUDA-Q로Q, 개발하는so 것을we 권장합니다.highly 우리는recommend 예시로developing with 큐비트에CUDA-Q. 대한The following example demonstrates creating a GHZ 상태를State 생성합니다.using three qubits.

    [Code Cell]

    Python
    import cudaq

    @cudaq.kernel

    def ghz(numQubits: int):

        # Create a qubit vector     qubits = cudaq.qvector(numQubits)

             # Apply Hadamard gate to the first qubit (creating superposition)     h(qubits.front())

             # Create entanglement between qubits using controlled-X (CNOT) gates     x.ctrl(qubits[0], qubits[1])

        x.ctrl(qubits[1], qubits[2])

             # Measure all qubits     mz(qubits)

    작업을 제출하기# 전에Verify circuit 회로가validity 유효한지via 먼저simulation 확인해볼before submitting 있습니다.

    the actual job sample_result = cudaq.sample(ghz, 3)

    print(sample_result)


    [Output]

    실행 결과는 아래처럼 `000`부터 `111`까지 총 8개의 상태가 약 125회씩 출력됩니다. 이 결과값은 무작위성에 의해서 실행할때마다 다를 수 있습니다.

    { 000:123 001:158 010:121 011:107 100:107 101:115 110:124 111:145 }

    Note: The output shows measurement counts for a total of 8 states from 000 to 111. Due to the probabilistic nature (randomness) of quantum computing, results may vary with each execution.

     

    양자3. 작업Submitting 제출a Quantum Job

    양자
    Submit 자원을your 선택하여written 양자circuit 작업을to 제출합니다.an `actual quantum resource (Backend) for execution. You can select various backends provided by QuREKA using the cudaq.set_target`을set_target 통해function. QuREKA에서For 제공하는authentication, 다양한you 양자will 백엔드를need 선택할 수 있습니다. 양자 작업을 제출하기 위해서 QuREKA에서 제공하는the API 키를Key 사용합니다.issued APIduring 키는the [대시보드](./interfaces/Dashboard.md)service 탭에서preparation 확인할stage.

    The 있습니다.

    아래following 예제는example shows how to set the target to the MIMIQ 시뮬레이터를simulator 사용하기and 위한submit `target`a 설정job.

    방법입니다.

    [Code Cell]

    Python
    # Configure execution environment and authentication
    device = "qube.mimiq"

    api_key = "TYPE_YOUR_API_KEY"

     # Enter the API key issued from your Dashboard # Set QuREKA quantum backend target cudaq.set_target("sdt", device=device, api_key=api_key) # Submit quantum job and receive results result = cudaq.sample(ghz, 3) print(result)

     

     

    양자4. 작업Monitoring 확인Your Job

    제출된
    You 양자can 작업은monitor 화면the 우측status and history of your submitted quantum jobs through the following paths:

    • 'TASK' Tab 또는(Right Side): Monitor the status of your currently submitted job in real-time within the right panel of the Quantum Server (Jupyter Notebook).

    • 'Quantum Jobs' Menu (Console): View detailed results and statistics for all jobs, including past execution history, in the [Quantum Jobs] menu of the main QuREKA 콘솔의console.
    • '양자
    작업' 탭에서 모니터링할 수 있습니다.