Skip to content
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

Replace YAML runcard with JSON ones #782

Merged
merged 3 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 68 additions & 51 deletions doc/source/getting-started/experiment.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ To define a platform the user needs to provide a folder with the following struc

my_platform/
platform.py
parameters.yml
parameters.json
kernels.npz # (optional)

where ``platform.py`` contains instruments information, ``parameters.yml``
where ``platform.py`` contains instruments information, ``parameters.json``
includes calibration parameters and ``kernels.npz`` is an optional
file with additional calibration parameters.

Expand Down Expand Up @@ -78,54 +78,71 @@ For simplicity, the qubit will be controlled by a RFSoC-based system, althought
def create(folder: Path) -> Platform:
"""Function that generates Qibolab platform."""

And the we can define the runcard ``my_platform/parameters.yml``:

.. code-block:: yaml

# my_platform.yml

nqubits: 1
qubits: [0]
topology: []
settings: {nshots: 1024, relaxation_time: 70000, sampling_rate: 9830400000}

native_gates:
single_qubit:
0:
RX: # pi-pulse for X gate
duration: 40
amplitude: 0.5
frequency: 5_500_000_000
shape: Gaussian(3)
type: qd
start: 0
phase: 0

MZ: # measurement pulse
duration: 2000
amplitude: 0.02
frequency: 7_370_000_000
shape: Rectangular()
type: ro
start: 0
phase: 0

two_qubits: {}
characterization:
single_qubit:
0:
readout_frequency: 7370000000
drive_frequency: 5500000000
anharmonicity: 0
Ec: 0
Ej: 0
g: 0
T1: 0.0
T2: 0.0
threshold: 0.0
iq_angle: 0.0
mean_gnd_states: [0.0, 0.0]
mean_exc_states: [0.0, 0.0]
And the we can define the runcard ``my_platform/parameters.json``:

.. code-block:: json

{
"nqubits": 1,
"qubits": [
0
],
"topology": [],
"settings": {
"nshots": 1024,
"relaxation_time": 70000,
"sampling_rate": 9830400000
},
"native_gates": {
"single_qubit": {
"0": {
"RX": {
"duration": 40,
"amplitude": 0.5,
"frequency": 5500000000,
"shape": "Gaussian(3)",
"type": "qd",
"start": 0,
"phase": 0
},
"MZ": {
"duration": 2000,
"amplitude": 0.02,
"frequency": 7370000000,
"shape": "Rectangular()",
"type": "ro",
"start": 0,
"phase": 0
}
}
},
"two_qubits": {}
},
"characterization": {
"single_qubit": {
"0": {
"readout_frequency": 7370000000,
"drive_frequency": 5500000000,
"anharmonicity": 0,
"Ec": 0,
"Ej": 0,
"g": 0,
"T1": 0.0,
"T2": 0.0,
"threshold": 0.0,
"iq_angle": 0.0,
"mean_gnd_states": [
0.0,
0.0
],
"mean_exc_states": [
0.0,
0.0
]
}
}
}
}


Setting up the environment
Expand Down Expand Up @@ -171,7 +188,7 @@ We leave to the dedicated tutorial a full explanation of the experiment, but her
AcquisitionType,
)

# load the platform from ``dummy.py`` and ``dummy.yml``
# load the platform from ``dummy.py`` and ``dummy.json``
platform = create_platform("dummy")

# define the pulse sequence
Expand Down
Loading
Loading