Intel® Quantum SDK
Forum related to Intel Quantum SDK, a full-stack software kit for programming and executing algorithms on simulated quantum hardware.
공지
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
38 토론

Hybrid Quantum-Classical application tutorial

KevinR_Intel
중재자
3,556 조회수

Look for upcoming sessions of introductions to the features and programming applications with the Intel® Quantum SDK.

 

Attached are updated versions an example of a hybrid quantum-classical application, a variational quantum eigensolver. It contains the essential components of processing information in both classic bit representation and quantum qubit representation.

 

This example solves a single matrix, but can be extended with the Intel® Hybrid Quantum-Classical library https://github.com/IntelLabs/Hybrid-Quantum-Classical-Library  to treat arbitrary matrices.

KevinR_Intel_0-1678051120869.png

 

 

7 응답
joshdumo
초보자
3,517 조회수

Hi,

I am trying out the example and am getting an error when running the executable simple_vqe, something about GLIBC.

Please assist.

joshdumo_0-1678728673266.png

 

0 포인트
KevinR_Intel
중재자
3,514 조회수

Hi Josh,

It's because you're trying to run on the login node. The login node is only there to provide communication and access to the job queue.

To use the compile_and_run.txt as a job script, put it in the same directory as simple_vqe.cpp, remove the '.txt' suffix, and type

qsub compile_and_run

The 'qsub' command submits the "job script" to the machine and when it's turn in the queue comes, your job runs. If you read compile_and_run, it is basically just the sequence of things you would have typed if you had done then yourself on the Command-Line-Interface.

 

The output of your job will be in the file 'initial_test.oNNNN' where the NNN's are the number of your job in the total queue. Alternatively, you can also modify the source code to write out any data you'd like to preserve.

joshdumo
초보자
3,507 조회수

Thank you for the prompt assist.

Previously I was running "qsub compile_and_run_vqe.txt" still with the suffix attached.

 

I then followed the correct outlined procedure but still i get no output, instead getting 'No such process'. Please find attached the screenshot.

joshdumo_0-1678747439288.png

 

0 포인트
KevinR_Intel
중재자
3,504 조회수

I omitted a step in explaining how to modify the .txt to become a job file, and that may be causing the error. Try changing the first line of the script to

#!/bin/bash

i.e., remove 1 "#".

 

Adding an extra # was necessary because the forum wants to protect you from downloading a potentially-immediately dangerous file, and considers bash scripts to be to ready-to-go.

 

Also check to make sure that the end of the compile_and_run_vqe has the lines

# move to the directory run the executable
cd vqe_outputs/
./simple_vqe

 

0 포인트
joshdumo
초보자
3,494 조회수

Hi Kevin,

 

I have tried running with the updated simple_vqe and compile_and_run_vqe. This time the compilation has errors. Please see screenshot and attached job output.

joshdumo_0-1678881467298.png

 

 

0 포인트
KevinR_Intel
중재자
3,489 조회수

That simple_vqe.cpp was stale--it used the beta version API calls and that is what the compiler is (rightly) complaining about. That is my mistake; I've uploaded an updated version that is consistent with version 1.0.

 

TLDR:  I uploaded the .cpp file from the wrong directory.

joshdumo
초보자
3,488 조회수

Hi Kevin,

 

The updated version runs as expected. Thank you very much for the support!

joshdumo_0-1678913902145.png

 

0 포인트
응답