Skip to content
New issue

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

Incorrect state preparations for multiple qubits #60

Closed
antalszava opened this issue Apr 30, 2021 · 1 comment
Closed

Incorrect state preparations for multiple qubits #60

antalszava opened this issue Apr 30, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@antalszava
Copy link
Contributor

Some newly added test cases from the device test suite are failing when using BasisState and QubitStateVector for multiple qubits.

Example:

dev1 = qml.device('default.qubit', wires=3)
dev2 = qml.device('cirq.simulator', wires=3)

par = np.array([0, 1, 0, 0, 0, 0, 0, 0])

def circuit():
    qml.QubitStateVector(par, wires=[2,1,0])
    return qml.expval(qml.PauliZ(0)), qml.expval(qml.PauliZ(1)), qml.expval(qml.PauliZ(2))

qnode1 = qml.QNode(circuit, dev1)
qnode2 = qml.QNode(circuit, dev2)

print("Default qubit: ", qnode1())
print("Cirq simulator: ", qnode2())
Default qubit:  [-1.  1.  1.]
Cirq simulator:  [ 1.  1. -1.]

See the following example and the log:
https://github.com/PennyLaneAI/plugin-test-matrix/runs/2471773491?check_suite_focus=true#step:7:129

@antalszava antalszava added the bug Something isn't working label Apr 30, 2021
@antalszava
Copy link
Contributor Author

Fixed in #61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant