You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to create two different registers with different number of qubits ( i.e. the first one with N qubits and the second one with M) to compute later CZ gate between the M qubits of M and the first M qubits of N.
How could this registers be created in Qibo?
The text was updated successfully, but these errors were encountered:
which changes slightly how the measurement results are returned after simulation (see the documentation for more details). But I believe this is not relevant in your case.
Moreovoer, you can create CZ gates with multiple control qubits using .controlled_by, eg.:
circuit.add(gates.Z(4).controlled_by(0, 1, 2, 3))
which applies a Z gate to qubit 4 when 0, 1, 2 and 3 are all in the |1> state. You can have an arbitrary number of controls but there is still a single target qubit.
There is no specific qubit or register object in Qibo. The qubits are numbered from most significant to least by an int value from 0 to nqubits-1. To keep track of registers in a tidy way, I recommend using native python lists. If I understood well your issue, it could look like this:
I want to create two different registers with different number of qubits ( i.e. the first one with N qubits and the second one with M) to compute later CZ gate between the M qubits of M and the first M qubits of N.
How could this registers be created in Qibo?
The text was updated successfully, but these errors were encountered: