Skip to main content

Q series measurement and control equipment driver interface

Project description

  _   _   ____     ___    ____           _                       
 | \ | | / ___|   / _ \  |  _ \   _ __  (_) __   __   ___   _ __ 
 |  \| | \___ \  | | | | | | | | | '__| | | \ \ / /  / _ \ | '__|
 | |\  |  ___) | | |_| | | |_| | | |    | |  \ V /  |  __/ | |   
 |_| \_| |____/   \__\_\ |____/  |_|    |_|   \_/    \___| |_|   

简介

NSQDriver为一套测控系列设备的Python通用驱动接口。可使用Python作为编程语言,基于此驱动接口可以实现对测控设备的控制,进而完成各种超导量子芯片的表征实验和高保真门操作。

                              +------------------------+
                              |          Python        |
                              |     +------------------+
                              |     |      NSQDriver   |
                              +------------------------+
                                     :     :         :
                           +----------     :         -----+
                           :               :              :
                           V               V              V
                     +-----------+   +-----------+   +-----------+   
                     |  Device A |   |  Device B |   |   QSYNC   |    
                     +-----------+   +-----------+   +-----------+   

NSQDriver接口可用于统一控制Q100/PQ系列测控仪器,可详细控制每台仪器每个OUT、IN通道的播放与采集行为,以及查看设备的运行状态等。在一个多台测控设备组成的多比特测控系统中,可以有效的在软件层面实现对系统中每台设备的详细控制。


快速开始

  • 驱动接口的通用流程如下
from nsqdriver import MCIDriver, QSYNCDriver

# 实例化设备驱动接口
driver = MCIDriver('127.0.0.1')
qsync = QSYNCDriver('127.0.0.1')

# 连接设备
qsync.open()
driver.open()

# 初始化系统
qsync.sync_system()


# 相关参数,参数细节相关参考 8.可用参数列表
driver.set('Shot', 1024)
  • NSWave语言
    • NSWave是一种对于Sequence序列发生技术的配套编程语言,属于python语法的子集,支持与python程序进行混编
    • Sequence序列发生模式将测控所需的各种门的编辑由主控计算机直接生成波形转化成了设备实时计算
    • 提供了一套直观的时序编辑接口
from nsqdriver import nswave as nw
from nsqdriver import MCIDriver
import numpy as np

@nw.kernel
def program(envelope: np.ndarray):
    srate: nw.Var = 8e9
    time_width: nw.Var = 6e-6
    freq: nw.Var = 4.1e9
    time_line: np.ndarray = np.linspace(0, 6e-6, int(time_width * srate + 1))
    wave: np.ndarray = np.cos(2 * np.pi * time_line * freq)
    frame_0: nw.Frame = nw.ins_frame(0e9, 0*np.pi)
    frame_1: nw.Frame = nw.ins_frame(4.3e9, 0*np.pi)
    envelope_0: nw.Envelope = nw.ins_envelope(wave)
    envelope_1: "nw.Envelope" = nw.evlp_gaussian(2e-6, srate)
    envelope_2: nw.Envelope = nw.ins_envelope(envelope)

    nw.wait_for_trigger()
    nw.reset_frame([frame_0, frame_1])
    nw.wait(3.2e-6)
    nw.play_wave(envelope_1, frame_1)
    nw.play_wave(envelope_0, frame_0)
    nw.inc_phase(frame_1, np.pi)
    nw.play_wave(envelope_2, frame_1)

    return nw.Kernel()

driver: MCIDriver
envelope = np.ones((10240, ))
driver.set("Program", program(envelope), 'S5-O1')

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nsqdriver-0.0.301-cp312-cp312-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.12Windows x86-64

nsqdriver-0.0.301-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (8.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

nsqdriver-0.0.301-cp312-cp312-macosx_10_13_universal2.whl (2.5 MB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

nsqdriver-0.0.301-cp311-cp311-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.11Windows x86-64

nsqdriver-0.0.301-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

nsqdriver-0.0.301-cp311-cp311-macosx_10_9_universal2.whl (2.5 MB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

nsqdriver-0.0.301-cp310-cp310-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10Windows x86-64

nsqdriver-0.0.301-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

nsqdriver-0.0.301-cp310-cp310-macosx_10_9_universal2.whl (2.5 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file nsqdriver-0.0.301-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for nsqdriver-0.0.301-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e3241fa0eb84a57d0e631427e1a872a438852b282eea564866851b5152e9f36d
MD5 e09af24b77b590ec55d09b1de9f75ded
BLAKE2b-256 c05edd838e11a0c5bda95eade9b90336aae89301fbda7dae1f88133dd9bdc812

See more details on using hashes here.

File details

Details for the file nsqdriver-0.0.301-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for nsqdriver-0.0.301-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a118879ff70f7e26a651629e32730152b74b53f32480d9843a16f5ed948ed662
MD5 e13e76179888e1d16df69fae464ebe93
BLAKE2b-256 69e11420f3759efa8f7ff3cc4f0b9e556392180661b9e81f6a8ac934007c34fd

See more details on using hashes here.

File details

Details for the file nsqdriver-0.0.301-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for nsqdriver-0.0.301-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 d41f7c82a5c639155d2c8f7744a786a391716aabe36b67bcd670c6657e0e45d6
MD5 273afcda6ebb10b12363553d97b2ac73
BLAKE2b-256 ffdc63156795fdb137ac00535c366068083a8d2e856caffd0e1bc2d2e1099a4d

See more details on using hashes here.

File details

Details for the file nsqdriver-0.0.301-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for nsqdriver-0.0.301-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0272ae17006e415bb94ab62b50dcb4f88fe6602b06b04080101412cc523512cd
MD5 99f7d73113e08b86abe412712ad1aa2e
BLAKE2b-256 a888ec1b5865b611e34fdd43d18409fdf625d4c6314def17a27406fcdd6765a4

See more details on using hashes here.

File details

Details for the file nsqdriver-0.0.301-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for nsqdriver-0.0.301-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 ad38841d0449dcb52b63a6cb132793e192f1cf61974bd6ac834234910def81d6
MD5 e30ba5b7a61e7a8eb5751cfd29c3e78d
BLAKE2b-256 6ec4377c31e6ed87b29dc3a4f5a03da1024acc87fd7844bf9949dcf918a4739b

See more details on using hashes here.

File details

Details for the file nsqdriver-0.0.301-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for nsqdriver-0.0.301-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 552d96b9d32a6b603adce8a295f5d5e63c3aba57a4d6fbc6d476fd4f7c6ab83d
MD5 18ee177244a262101b76d37897ffeedc
BLAKE2b-256 9c57e3075d5d84a4d8cff2945bf7ce299e23f20677de072d1179921eea3caa03

See more details on using hashes here.

File details

Details for the file nsqdriver-0.0.301-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for nsqdriver-0.0.301-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 383694769b327ccbfcaa71a3bdfb4ad94a10c2135422aa5aacce8c0228bd34cc
MD5 23915a0e596131a7688aabce8ce30e97
BLAKE2b-256 127a4db0fcde83e490ad7f5b58415812a4dfb97b1d13a75e131c9e4db2a462c5

See more details on using hashes here.

File details

Details for the file nsqdriver-0.0.301-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for nsqdriver-0.0.301-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5190eb744c2cc4afff10525509b6911b72a6d699ef865965a5289737023d04f2
MD5 60cb15cfcdc7db16519f29d4cb81a0c3
BLAKE2b-256 34d5b8a725e54a438bffc5ccfeef39c6381cc99bcf4b81d4bb8f362a207c2417

See more details on using hashes here.

File details

Details for the file nsqdriver-0.0.301-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for nsqdriver-0.0.301-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7007a2e95dff8af8538d5cd9eeaa0148b2ef6d22c6ee900829234144cd22a659
MD5 7c55574e6e67050e868b09330d086640
BLAKE2b-256 d1a3ee74b6efb5ebf0c8859a56780e65196777aa92622c985113625dfb6a4daf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page