Closed yaelbh closed 3 years ago
List of gates currently supported by the MPS simulator:
{"id", "x", "y", "z", "s", "sdg", "h", "t", "tdg", "p", "u1",
"u2", "u3", "u", "U", "CX", "cx", "cz", "cp", "cu1", "swap", "ccx"}
For the statevector simulator:
"cy", "cp", "cu1", "cu2", "cu3", "swap", "id", "p",
"x", "y", "z", "h", "s", "sdg", "t", "tdg",
"r", "rx", "ry", "rz", "rxx", "ryy", "rzz", "rzx",
"ccx", "cswap", "mcx", "mcy", "mcz", "mcu1", "mcu2", "mcu3",
"mcswap", "mcphase", "mcr", "mcrx", "mcry", "mcry", "sx", "csx",
"mcsx", "delay", "pauli"}
To do:
cy, cswap, cu2, cu3
r, rx, ry, rz
rxx, ryy, rzz, rxz
mc
sx, csx, mcsx
delay
needs to be donepauli
, best is to let the transpiler convert it to a list of regular Pauli gates (unlike the statevector simulator, in the MPS simulator there is no performance gain from this special Pauli gate)As in the statevector simulator, maybe also here we will implement mc
gates, and then other gates (some of them are already supported) will become a special case. For example, x, cx, ccx
, etc., can also call mcx
. Not sure though about it, since with the MPS we also have to handle swaps.
I see that mcx
is already implemented in the MPS simulator, but it appears to apply only to 3 qubits. I don't know (will check) what happens if the user tries more qubits. x
and cx
are each implemented separately. Other mc
's are not supported.
Although mcx
(for 3 qubits) is implemented, it is not in the list of gates. Therefore a user cannot use it directly. It's just ccx
, which is in the list of gates.
I see that some gates are deprecated. I won't add support to them.
Working on it now
Repeating https://github.com/Qiskit/qiskit-aer/issues/1008#issuecomment-720289414, but this time taking the list of gates supported by each simulator from qasm_simulator.py
, employing a couple of changes from #1076, and excluding deprecated gates and non-existing gates (#1070):
List of gates currently supported by the MPS simulator:
'u', 'p', 'cp', 'cx', 'cz', 'id', 'x', 'y', 'z', 'h', 's', 'sdg', 'sx', 't', 'tdg', 'swap', 'ccx', 'unitary', 'roerror', 'delay', 'r', 'rx', 'ry', 'rz', 'rxx', 'ryy', 'rzz', 'rzx'
For the statevector simulator:
'u', 'p', 'r', 'rx', 'ry', 'rz', 'id', 'x', 'y', 'z', 'h', 's', 'sdg', 'sx', 't', 'tdg', 'swap', 'cx', 'cy', 'cz', 'csx', 'cp', 'rxx', 'ryy', 'rzz', 'rzx', 'ccx', 'cswap', 'mcx', 'mcphase', 'unitary', 'diagonal', 'multiplexer', 'initialize', 'kraus', 'roerror', 'delay', 'pauli', 'mcx_gray'
To do:
cy, cswap, csx
r, rx, ry, rz
rxx, ryy, rzz, rxz
mcx, mcx_gray, mcphase
delay
needs to be donediagonal
and kraus
are implemented but need to be added to the list of gates, maybe also roerror
initialize
will be done in #1058pauli
, best is to let the transpiler convert it to a list of regular Pauli gates (unlike the statevector simulator, in the MPS simulator there is no performance gain from this special Pauli gate)Multi-controlled gates: since they require contraction with many qubits, it is not clear whether their direct application is more efficient than transpilation to 2-qubit gates. Therefore I don't think we should implement them in the MPS simulator.
Closing because done in #1088.
What is the expected behavior?
There are a bunch of gates that the MPS simulator does not support, although other Aer simulators support them. The task is to complete the support in the MPS simulator. See also related issue #1004.