Skip to content

Commit

Permalink
Merge pull request #603 from qiboteam/add_RX12_pulse
Browse files Browse the repository at this point in the history
Adding `RX12` pulse
  • Loading branch information
scarrazza authored Sep 28, 2023
2 parents 2185079 + 78bb51d commit 5ca4e7a
Show file tree
Hide file tree
Showing 8 changed files with 180 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/qibolab/dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
"start": 0,
"phase": 0,
},
"RX12": {
"duration": 40,
"amplitude": 0.005,
"frequency": 4700000000,
"shape": "Gaussian(5)",
"type": "qd",
"start": 0,
"phase": 0,
},
"MZ": {
"duration": 1000,
"amplitude": 0.0025,
Expand All @@ -47,6 +56,15 @@
"start": 0,
"phase": 0,
},
"RX12": {
"duration": 40,
"amplitude": 0.0484,
"frequency": 4855663000,
"shape": "Drag(5, -0.02)",
"type": "qd",
"start": 0,
"phase": 0,
},
"MZ": {
"duration": 620,
"amplitude": 0.003575,
Expand All @@ -67,6 +85,15 @@
"start": 0,
"phase": 0,
},
"RX12": {
"duration": 40,
"amplitude": 0.005,
"frequency": 2700000000,
"shape": "Gaussian(5)",
"type": "qd",
"start": 0,
"phase": 0,
},
"MZ": {
"duration": 1000,
"amplitude": 0.0025,
Expand All @@ -87,6 +114,15 @@
"start": 0,
"phase": 0,
},
"RX12": {
"duration": 40,
"amplitude": 0.0484,
"frequency": 5855663000,
"shape": "Drag(5, -0.02)",
"type": "qd",
"start": 0,
"phase": 0,
},
"MZ": {
"duration": 620,
"amplitude": 0.003575,
Expand Down
4 changes: 4 additions & 0 deletions src/qibolab/native.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ class SingleQubitNatives:
"""Container with the native single-qubit gates acting on a specific qubit."""

RX: Optional[NativePulse] = None
"""Pulse to drive the qubit from state 0 to state 1."""
RX12: Optional[NativePulse] = None
"""Pulse to drive to qubit from state 1 to state 2."""
MZ: Optional[NativePulse] = None
"""Measurement pulse."""

@property
def RX90(self) -> NativePulse:
Expand Down
4 changes: 4 additions & 0 deletions src/qibolab/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ def create_RX_pulse(self, qubit, start=0, relative_phase=0):
qubit = self.get_qubit(qubit)
return self.qubits[qubit].native_gates.RX.pulse(start, relative_phase)

def create_RX12_pulse(self, qubit, start=0, relative_phase=0):
qubit = self.get_qubit(qubit)
return self.qubits[qubit].native_gates.RX12.pulse(start, relative_phase)

def create_CZ_pulse_sequence(self, qubits, start=0):
# Check in the settings if qubits[0]-qubits[1] is a key
pair = tuple(sorted(self.get_qubit(q) for q in qubits))
Expand Down
45 changes: 45 additions & 0 deletions tests/dummy_qrc/qblox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 40
amplitude: 0.5028
frequency: 5_050_304_836
# if_frequency: -200_000_000 # difference in qubit frequency
shape: Gaussian(5)
type: qd
relative_start: 0
phase: 0
MZ:
duration: 2000
amplitude: 0.1
Expand All @@ -45,6 +54,15 @@ native_gates:
type: qd
relative_start: 0
phase: 0 # qubit drive
RX12:
duration: 40 # should be multiple of 4
amplitude: 0.5078
frequency: 4_852_833_073 # qubit frequency
# if_frequency: -200_000_000 # difference in qubit frequency
shape: Gaussian(5)
type: qd
relative_start: 0
phase: 0
MZ:
duration: 2000
amplitude: 0.2
Expand All @@ -64,6 +82,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 40 # should be multiple of 4
amplitude: 0.5016
frequency: 5_795_371_914 # qubit frequency
# if_frequency: -200_000_000 # difference in qubit frequency
shape: Gaussian(5)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 2000
amplitude: 0.25
Expand All @@ -83,6 +110,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 40 # should be multiple of 4
amplitude: 0.5026
frequency: 6_761_018_001 # qubit frequency
# if_frequency: -200_000_000 # difference in qubit frequency
shape: Gaussian(5)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 2000
amplitude: 0.2
Expand All @@ -102,6 +138,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 40 # should be multiple of 4
amplitude: 0.5172
frequency: 6_586_543_060 # qubit frequency
# if_frequency: -200_000_000 # difference in qubit frequency
shape: Gaussian(5)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 2000
amplitude: 0.4
Expand Down
43 changes: 43 additions & 0 deletions tests/dummy_qrc/qm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,14 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 40
amplitude: 0.005
frequency: 4_700_000_000
shape: Gaussian(5)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 1000
amplitude: 0.0025
Expand All @@ -59,6 +67,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 40
amplitude: 0.0484
frequency: 4_855_663_000
#frequency: 4_718_515_000 # 02 transition (more likely)
shape: Drag(5, -0.02)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 620
amplitude: 0.003575
Expand All @@ -77,6 +94,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 40
amplitude: 0.05682
frequency: 5_800_563_000
#frequency: 5_661_400_000 # 02 transition
shape: Drag(5, -0.04) #Gaussian(5)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 960
amplitude: 0.00325
Expand All @@ -95,6 +121,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 40
amplitude: 0.138
frequency: 6_760_922_000
#frequency: 6_628_822_000 # 02 transition
shape: Gaussian(5)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 960
amplitude: 0.004225
Expand All @@ -112,6 +147,14 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 40
amplitude: 0.0617
frequency: 6_585_053_000
shape: Drag(5, 0.0) #Gaussian(5)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 640
amplitude: 0.0039
Expand Down
2 changes: 2 additions & 0 deletions tests/dummy_qrc/rfsoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ native_gates:
0:
RX: {duration: 30, amplitude: 0.05284168507293318, frequency: 5542341844,
shape: Rectangular(), type: qd, relative_start: 0, phase: 0}
RX12: {duration: 30, amplitude: 0.05284168507293318, frequency: 5542341844,
shape: Rectangular(), type: qd, relative_start: 0, phase: 0}
MZ: {duration: 600, amplitude: 0.03, frequency: 7371258599, shape: Rectangular(),
type: ro, relative_start: 0, phase: 0}
two_qubit: {}
Expand Down
45 changes: 45 additions & 0 deletions tests/dummy_qrc/zurich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 40
amplitude: 0.625 #0.45
frequency: 4_095_830_788 #doesnt do anything requiered for qibolab to work
# shape: Gaussian(5)
shape: Drag(5, 0.04)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 2000 #2000.e-9
amplitude: .5 # .1
Expand All @@ -54,6 +63,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 90 #80
amplitude: 0.2 #0.2
frequency: 4_170_000_000 #doesnt do anything requiered for qibolab to work
shape: Gaussian(5)
# shape: Drag(5, 0.04)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 1000
amplitude: .1 # 1
Expand All @@ -73,6 +91,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 40 #200 #60
amplitude: 0.59
frequency: 4_300_587_281 #4_401_600_000 #4_505_500_000 #4_321_500_000 # 4_541_100_000 #doesnt do anything requiered for qibolab to work
shape: Gaussian(5)
# shape: Drag(5, 0.04)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 2000
amplitude: .54
Expand All @@ -92,6 +119,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 90 #80
amplitude: 0.75 #0.8
frequency: 4_100_000_000 #doesnt do anything requiered for qibolab to work
shape: Gaussian(5)
# shape: Drag(5, 0.04)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 2000
amplitude: .01 # 1
Expand All @@ -111,6 +147,15 @@ native_gates:
type: qd # qubit drive
relative_start: 0
phase: 0
RX12:
duration: 53 #110 #80
amplitude: 1 #0.398 #0.8
frequency: 4_196_800_000 #Small detuning increase freq #4_248_775_000 #doesnt do anything requiered for qibolab to work
shape: Gaussian(5)
# shape: Drag(5, 0.04)
type: qd # qubit drive
relative_start: 0
phase: 0
MZ:
duration: 1000
amplitude: .5 #.50 # 1
Expand Down
1 change: 1 addition & 0 deletions tests/test_dummy.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ def test_dummy_execute_pulse_sequence(acquisition):
platform = create_platform("dummy")
sequence = PulseSequence()
sequence.add(platform.create_qubit_readout_pulse(0, 0))
sequence.add(platform.create_RX12_pulse(0, 0))
options = ExecutionParameters(nshots=None, acquisition_type=acquisition)
result = platform.execute_pulse_sequence(sequence, options)

Expand Down

0 comments on commit 5ca4e7a

Please sign in to comment.