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

[QHC-231] Change Runcard Structure / Remove dead code #662

Open
wants to merge 42 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b3e9625
Treat chip as a Networkx graph.
AlbertMitjans Nov 5, 2023
607f5fa
Remove node usage.
AlbertMitjans Nov 5, 2023
1651df5
Remove chip.
AlbertMitjans Nov 5, 2023
7c7f216
Fix tests
AlbertMitjans Nov 5, 2023
8077a2f
More changes.
AlbertMitjans Nov 5, 2023
5dcb574
More changes.
AlbertMitjans Nov 5, 2023
5c9a115
merge from main
fedonman Jan 12, 2024
f6f5f8a
merge from main
fedonman Feb 1, 2024
1db2a30
update implementation
fedonman Feb 2, 2024
4b26b7b
reach compilable state
fedonman Feb 5, 2024
ae2491c
fix tests except qblox compile/upload
fedonman Feb 6, 2024
e07a4a0
Merge branch 'main' into simplify-chip
fedonman Feb 6, 2024
736b05e
make some runcard settings optional
fedonman Feb 7, 2024
88d0d1e
separate compilation settings
fedonman Feb 7, 2024
b94de55
fix issues
fedonman Feb 7, 2024
34cb19c
changes for circular imports
fedonman Feb 8, 2024
1f08515
Merge branch 'main' into simplify-chip
fedonman Feb 9, 2024
f50973f
more changes
fedonman Feb 11, 2024
1a303cb
compilable state
fedonman Feb 11, 2024
c7a1cd1
WIP
fedonman Feb 12, 2024
dd6a6f7
WIP
fedonman Feb 12, 2024
1491ce5
wip
fedonman Feb 12, 2024
3ed560b
Merge branch 'main' into simplify-chip
fedonman Feb 12, 2024
45fbea4
merge from main
fedonman Feb 12, 2024
7699b80
improvements and test fixes
fedonman Feb 15, 2024
ad4cc11
WIP
fedonman Feb 16, 2024
9939459
update qbloxcompiler
fedonman Feb 19, 2024
3985e4b
update tests and imports
fedonman Feb 19, 2024
3431000
merge from main
fedonman Feb 20, 2024
927cd2f
updates
fedonman Feb 20, 2024
d9157c3
updates in type checking
fedonman Feb 20, 2024
e3abe24
fix and comment out tests to check coverage
fedonman Feb 22, 2024
e56bfcc
fix qililab init
fedonman Feb 22, 2024
a595974
fix docs
fedonman Feb 22, 2024
a7c2db2
decouple QbloxCompiler and QbloxSequencer
fedonman Feb 23, 2024
57fb193
remove firmware from instrument settings
fedonman Feb 25, 2024
98438c7
remove num_sequencers from awg settings
fedonman Feb 25, 2024
c4fe415
fix tests
fedonman Feb 26, 2024
45ef85f
fix pylint
fedonman Feb 26, 2024
08e41d6
improve instrument castings
fedonman Feb 26, 2024
248d2f5
fix pylint
fedonman Feb 26, 2024
fe71387
ignoring type checkings in codecoverage
jjmartinezQT Mar 18, 2024
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
4 changes: 0 additions & 4 deletions docs/code/chip.rst

This file was deleted.

4 changes: 0 additions & 4 deletions docs/code/experiment.rst

This file was deleted.

4 changes: 2 additions & 2 deletions docs/code/transpiler.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ql.transpiler
ql.circuit_transpiler
===============

.. automodule:: qililab.transpiler
.. automodule:: qililab.circuit_transpiler
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
sys.path.insert(0, os.path.abspath(".."))

project = "Qililab"
copyright = "2023, Qilimanjaro"
copy_right = "2023, Qilimanjaro"
author = "Qilimanjaro"

import qililab # pylint: disable=wrong-import-position # noqa: E402
Expand Down
21 changes: 2 additions & 19 deletions docs/fundamentals/runcard.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ The runcards are the serialized :class:`.Platform`'s in the form of dictionaries

They contain all the laboratory information, settings and parameters, concretely they contain information about the:

- Gates transpilation

- :class:`.Chip`

- Instruments

- Buses

- Gates transpilation

|

Normally, in order to save the laboratory settings and its calibrated parameters, runcards get saved as YAML files to be retrieved later on.
Expand Down Expand Up @@ -53,7 +51,6 @@ Runcard YAML file example:
reset_method: passive
passive_reset_duration: 100
minimum_clock_time: 4
operations: []
gates:
M(0):
- bus: feedline_bus # alias of the bus
Expand Down Expand Up @@ -207,8 +204,6 @@ Runcard YAML file example:
instruments:
- name: QRM
alias: QRM1
firmware: 0.7.0
num_sequencers: 2
acquisition_delay_time: 100
out_offsets: [0, 0]
awg_sequencers:
Expand All @@ -221,9 +216,6 @@ Runcard YAML file example:
gain_q: .5
offset_i: 0
offset_q: 0
weights_i: [1., 1., 1., 1., 1.] # to calibrate
weights_q: [1., 1., 1., 1., 1.] # to calibrate
weighed_acq_enabled: False
threshold: 0.5
threshold_rotation: 0.0
num_bins: 1
Expand All @@ -249,9 +241,6 @@ Runcard YAML file example:
gain_q: .5
offset_i: 0
offset_q: 0
weights_i: [1., 1., 1., 1., 1.] # to calibrate
weights_q: [1., 1., 1., 1., 1.] # to calibrate
weighed_acq_enabled: False
threshold: 0.5
threshold_rotation: 0.0
num_bins: 1
Expand All @@ -270,8 +259,6 @@ Runcard YAML file example:
scope_store_enabled: false
- name: QCM-RF
alias: QCM-RF1
firmware: 0.7.0
num_sequencers: 2
out0_lo_freq: 6.5e+09
out0_lo_en: true
out0_att: 0
Expand Down Expand Up @@ -311,8 +298,6 @@ Runcard YAML file example:
hardware_modulation: true
- name: QCM
alias: QCM1
firmware: 0.7.0
num_sequencers: 2
out_offsets: [0.0, 0.0, 0.0, 0.0]
awg_sequencers:
- identifier: 0
Expand Down Expand Up @@ -343,13 +328,11 @@ Runcard YAML file example:
hardware_modulation: true
- name: RS
alias: rs_1
firmware: 4.2.76.0-3.30.046.294
power: 16
frequency: 8.0726e+09
rf_on: true
- name: mini_circuits
alias: attenuator
firmware: None
attenuation: 32

instrument_controllers:
Expand Down
2 changes: 0 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ Qililab Documentation

code/ql
code/calibration
code/chip
code/drivers
code/experiment
code/platform
code/pulse
code/qprogram
Expand Down
4 changes: 4 additions & 0 deletions examples/demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import qililab as ql

platform = ql.build_platform(runcard="/home/fedonman/projects/qililab/examples/runcards/galadriel.yml")
print(platform.buses)
67 changes: 48 additions & 19 deletions examples/example_using_qililab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,17 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2023-11-05 14:10:41,714 - qm - INFO - Starting session: 121f2692-4859-4269-903a-2a8847bf0775\n"
]
}
],
"source": [
"import os\n",
"from pathlib import Path\n",
Expand All @@ -28,7 +36,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -47,20 +55,9 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[qililab] [0.20.4|WARNING|2023-08-22 14:52:03]: Cannot set `output_i=1` and `output_q=0` in hardware. The I/Q signals sent to sequencer 1 will be swapped to allow this setting.\n",
"WARNING:qililab.config.config:Cannot set `output_i=1` and `output_q=0` in hardware. The I/Q signals sent to sequencer 1 will be swapped to allow this setting.\n",
"[qililab] [0.20.4|WARNING|2023-08-22 14:52:03]: Cannot set `output_i=3` and `output_q=2` in hardware. The I/Q signals sent to sequencer 3 will be swapped to allow this setting.\n",
"WARNING:qililab.config.config:Cannot set `output_i=3` and `output_q=2` in hardware. The I/Q signals sent to sequencer 3 will be swapped to allow this setting.\n"
]
}
],
"outputs": [],
"source": [
"runcard_path = str(Path(fname) / \"runcards/galadriel.yml\")\n",
"platform = ql.build_platform(runcard=runcard_path)"
Expand All @@ -76,7 +73,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -115,7 +112,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 6,
"metadata": {},
"outputs": [
{
Expand All @@ -140,6 +137,38 @@
"print(platform.buses)"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['qubit_0', 'qubit_1']\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import networkx as nx\n",
"\n",
"dictionary = {\"qubit_0\": [\"qubit_2\"], \"qubit_1\": [\"qubit_2\"], \"qubit_2\": [\"qubit_0\", \"qubit_1\"]}\n",
"graph = nx.from_dict_of_lists(dictionary)\n",
"print(list(graph[\"qubit_2\"].keys()))\n",
"\"qubit_2\" in graph"
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand Down Expand Up @@ -1080,7 +1109,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
"version": "3.10.13"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
Loading