BAQIC / qasmsim

Apache License 2.0
0 stars 0 forks source link

feat: classical thread and quantum thread #1

Open lucky9-cyou opened 2 months ago

lucky9-cyou commented 2 months ago
lucky9-cyou commented 2 months ago

variable.json

{
    "variable_01": 0.0,
    "variable_02": 0.0
}

qasm

OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[2];
h q[0];
cx q[0], q[1];
ry(variable_01) q[3];
measure q -> c;

NOTE: please make sure the variable name is not the same with other string, like creg

lucky9-cyou commented 2 months ago

z expectation: [[1, 0], [0, -1]] $|1>$ -1, $|0>$ 1

lucky9-cyou commented 2 months ago

https://en.wikipedia.org/wiki/Simultaneous_perturbation_stochastic_approximation

lucky9-cyou commented 1 month ago

CleanShot 2024-09-09 at 20 49 30@2x

lucky9-cyou commented 5 days ago