Open lucky9-cyou opened 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
z expectation: [[1, 0], [0, -1]] $|1>$ -1, $|0>$ 1