-
Notifications
You must be signed in to change notification settings - Fork 12
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
Ensure support for new rx
and rzz
gates
#413
Comments
We could have an enum for the available gatesets class GateSet(Enum):
FALCON = {OpType.X, OpType.SX, OpType.Rz, OpType.CX} # No longer supported
EAGLE = {OpType.X, OpType.SX, OpType.Rz, OpType.ECR}
HERON = {OpType.Rx, OpType.ZZPhase, ...}
... Also whatever the name for the |
Had a look into whether I could compile and run circuits with the new gates. Good news and bad news. The good news is that the backends already recognise that from pytket.extensions.qiskit import IBMQEmulatorBackend
emulator = IBMQEmulatorBackend("ibm_torino")
print(emulator.backend_info.gate_set) Output:
Lets test compilation with a simple three qubit circuit from pytket import Circuit
from pytket.circuit.display import render_circuit_jupyter as draw
test_circ = Circuit(3).CX(0, 1).CX(0, 2).measure_all()
cc_emulator = emulator.get_compiled_circuit(test_circ)
print("Circuit valid?", emulator.valid_circuit(cc_emulator))
draw(c_emulator_circ) Output
Note the presence of ZZPhase gates and absence of Rx gates. We may need to update the rebasing to reduce the number of single qubit gates (using Rx gates where its advantageous to do so). Execution of this circuit on the emulator seems to work fine emulator_result = emulator.run_circuit(cc_emulator, n_shots=100)
# executes successfully What about the real device? i.e. from pytket.extensions.qiskit import IBMQBackend
torino_device = IBMQBackend("ibm_torino") device_circ = cc_emulator.copy()
print("Circuit valid?", torino_device.valid_circuit(device_circ)) Output:
Execution on the backend seems not to work though torino_handle = torino_device.process_circuit(device_circ, n_shots=100) gives
This seems reminicant of the ECR directionality issue -> #312 Also weird as interactions between Nodes 79 and 80 are recognised as valid from pytket._tket.unit_id import Node
print((Node(79), Node(80)) in torino_device.backend_info.architecture.coupling) Output:
This also agrees with a direct check from ibm
Output:
|
No description provided.
The text was updated successfully, but these errors were encountered: