We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QINIT 1 CREG 1 RX q[0], (-1.57) RZ q[0], (1.57) H q[0] MEASURE q[0],c[0]
这个线路应该和
QINIT 1 CREG 1 X q[0] MEASURE q[0],c[0]
结果一致,pyqpanda模拟结果分别为{'0': 3.170681151136739e-07, '1': 0.9999996829318852},{'0': 0.0, '1': 1.0},与理论预期一致; 但qpandalite分别为[0.9999996829318849, 3.170681151136738e-07]和[0.0, 1.0],排除了顺序问题确实有误。将H q[0]替换为RY q[0], (-1.57)时同样有问题。
The text was updated successfully, but these errors were encountered:
qpandalite.simulator没有问题,如果结果不对可能在parser上,需要进一步排查。
qpandalite.simulator
import qpandalite.simulator as qsim sim = qsim.Simulator() sim.init_n_qubit(1) # sim.x(0) sim.rx(0, -1.57) sim.rz(0, 1.57) sim.hadamard(0) print(sim.state) print(sim.pmeasure(0))
returns
[(0.00039832185787549583+0.0003980047897352759j), (0.9999997622620077-0.0003980047897352759j)] [3.1706811511360793e-07, 0.9999996829318846]
Sorry, something went wrong.
No branches or pull requests
QINIT 1
CREG 1
RX q[0], (-1.57)
RZ q[0], (1.57)
H q[0]
MEASURE q[0],c[0]
这个线路应该和
QINIT 1
CREG 1
X q[0]
MEASURE q[0],c[0]
结果一致,pyqpanda模拟结果分别为{'0': 3.170681151136739e-07, '1': 0.9999996829318852},{'0': 0.0, '1': 1.0},与理论预期一致; 但qpandalite分别为[0.9999996829318849, 3.170681151136738e-07]和[0.0, 1.0],排除了顺序问题确实有误。将H q[0]替换为RY q[0], (-1.57)时同样有问题。
The text was updated successfully, but these errors were encountered: