Skip to main content

systemq

Project description

Copyright Notice for SystemQ

Copyright (C) 2024 by Beijing Academy of Quantum Information and Sciences

All rights reserved.

License

SystemQ is distributed under MIT, GPL, Apache Lisence. For more details, see the LICENSE file included with this distribution or visit [link to the license text, if available online].

Redistribution and Use

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Disclaimer

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Usage :

installation

<path_to_python> -m pip install systemq quark jupyter jupyter_notebook jupyter_lab

basic usage

  1. in a jupyter(notebook or lab) environment :
import systemq.kernel as kn
  1. decide the configuration path : the default directory to look at in linux(or windows) usually is at /home/\<user\_name\>. If there are other wanted path, it is easy to add them with
kn.add_config_dir("path to the configuration directory")

At the configuration directory, a json file called bootstrap.json is expected. In which each basic setup to configure the systemq kernel is listed.

  1. intialize the system :
kn.init()

calling this step to initialize the system with previous setups. This setup is safe to run repeatly

  1. Scanner Usage Example:
qubits=tuple(['Q0301'])
t = kts.Scan(f'T1_{qubits}',
                 signal= 'population',             
                 shots = 1024)
circ = []
delay  = 0 
for qid,qubit in enumerate(qubits):
    circ.append(('X', qubit))
    circ.append((('Delay',delay),qubit))
    circ.append((('R', 0,('with', ('params:phase', 0))), qubit))
    circ.append((('R', 0,('with', ('params:phase', 0))), qubit))    
    circ.append((('Delay', 200e-9), qubit))
    circ.append((('Measure', qid), qubit))  ;
    
t["circuit"] = circ
t["repeat"] =np.linspace(0, 100, 5001)  
t.run() # non blocking
t.join() # blocking  the task with join
  1. To cancel a task : If it is not blocked, you can call the task's canceller, for example t.cancel() . If it is blocked, in another word there are t.join() called in the jupyter cells and the system is waiting there. You can just click the square at the top of jupyter notebook to stop the task

Further notice :

This package is under intense development under Beijing Academy of Quantum Information and Sciences Teams. Any usage issue please submit to https://pypi.org/project/systemq. Or contact our staff for advice or problems. Thank you for using our software.

Project details


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

systemq-1.0.0-cp312-cp312-win_amd64.whl (5.8 MB view hashes)

Uploaded CPython 3.12 Windows x86-64

systemq-1.0.0-cp311-cp311-win_amd64.whl (5.9 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

systemq-1.0.0-cp310-cp310-win_amd64.whl (5.9 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

systemq-1.0.0-cp39-cp39-win_amd64.whl (6.2 MB view hashes)

Uploaded CPython 3.9 Windows x86-64

systemq-1.0.0-cp38-cp38-win_amd64.whl (6.3 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

Supported by

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