SoftwareQuTech / SimulaQron

Quantum Network Simulator for Application Programming
Other
113 stars 53 forks source link

CPHASE is failing #237

Closed tobiasBora closed 5 years ago

tobiasBora commented 5 years ago

Hello, I don't know why but I can't use CPHASE in simulaqron, with (at least) projectq backend. Indeed, the code:

# Works
serverState[id1].rot_Z(42)
serverState[id2].rot_Z(42)
# Fails
serverState[id1].CPHASE(serverState[id2])

Fails on last line with error AttributeError: 'qubit' object has no attribute 'CPHASE'... According to https://softwarequtech.github.io/SimulaQron/html/UsefulCommands.html#qubit, it should work no?

Any idea why it's failing?

AckslD commented 5 years ago

Hi @tobiasBora! There was a typo in the docs, the methods are cphase and cnot. This is now fixed, see https://softwarequtech.github.io/CQC-Python/useful_commands.html#qubit and the api.