Conversation
…y call on the z line, not the coupler line.
quam_builder/architecture/superconducting/qpu/flux_tunable_quam.py
Outdated
Show resolved
Hide resolved
quam_builder/architecture/superconducting/qpu/flux_tunable_quam.py
Outdated
Show resolved
Hide resolved
quam_builder/architecture/superconducting/qpu/flux_tunable_quam.py
Outdated
Show resolved
Hide resolved
...lder/architecture/superconducting/custom_gates/flux_tunable_transmon_pair/two_qubit_gates.py
Show resolved
Hide resolved
| from quam.components.pulses import Pulse, ReadoutPulse | ||
| from quam.core import quam_dataclass | ||
| from quam.utils.qua_types import QuaVariableBool, QuaVariableFloat, QuaVariableInt | ||
|
|
There was a problem hiding this comment.
Is there a reason for not using the framework that the IQCC team is using?
Especially with
@quam_dataclass
class TwoQubitGate(QuamComponent, ABC):
extras: Dict[str, Any] = field(default_factory=dict)
@property
def transmon_pair(self):
from ..transmon_pair import TransmonPair
if isinstance(self.parent, TransmonPair):
return self.parent
elif hasattr(self.parent, "parent") and isinstance(self.parent.parent, TransmonPair):
return self.parent.parent
else:
raise AttributeError("TwoQubitGate is not attached to a QubitPair. 2Q_gate: {self}")
@property
def qubit_control(self):
return self.transmon_pair.qubit_control
@property
def qubit_target(self):
return self.transmon_pair.qubit_target
@property
def coupler(self):
return self.transmon_pair.coupler
def __call__(self):
self.execute()
@quam_dataclass
class CZGate(TwoQubitGate):
"""CZ Operation for a qubit pair"""
There was a problem hiding this comment.
The implementation here seems to be more general and can be attached to any qubit type. Any recommendation for when to extend the class and when to use macro?
There was a problem hiding this comment.
In terms of consistency with the other custom_gates, cross_resonance is also implemented as macro. We could refactor this, but what is your current thought? My thought right now is that macro works because the implementation depends on what user have and can choose which appropriate gate to attached rather than being pre-defined.
There was a problem hiding this comment.
I recently discussed it with @nulinspiratie and his advice is to use the Gate macros for 1 and 2 qubit gates and keep using the standard methods for other functions such as reset, readout...
There was a problem hiding this comment.
@TheoLaudatQM I'd prefer consistency and open for changes. Here the class inherits quam.components.macro.QubitPairMacro. The IQCC implementation inherits TwoQubitGate(QuamComponent, ABC). Which approach should we take here? @nulinspiratie
quam_builder/architecture/superconducting/custom_gates/__init__.py
Outdated
Show resolved
Hide resolved
| qua_T = QuaVariable | QuaExpression | ||
|
|
||
|
|
||
| @quam_dataclass |
There was a problem hiding this comment.
The apply method in this class seems too big. I would recommend splitting it up into several methods. For example, each cr_type should be its own method or function. Also, I would expect that many of the parameters in apply are actually gate parameters similar to zz_correction_phase
There was a problem hiding this comment.
@nulinspiratie Refactored the macro and decomposed them to methods. There are many parameters but many of them are for the operations (pulses) of involved elements. Is there a better way to manage these?
The location of the file was moved to: custom_gates/fixed_transmon_pair/two_qubit_gates.py following the changes in the flux tunable one.
…rm/quam-builder into feat/add-cr-cz-macros
Implements macros for CR and CZ gates on transmons (both flux tunable and fixed with fixed and tunable couplers)
Contains also fixes: