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:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
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
- in a jupyter(notebook or lab) environment :
import systemq.kernel as kn
- 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.
- intialize the system :
kn.init()
calling this step to initialize the system with previous setups. This setup is safe to run repeatly
- 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
- 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 aret.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
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
Built Distributions
Hashes for systemq-1.0.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5537785eb240db98b097a88e74f3a9b5959e5eb5cdff44a0c24888666cac05c0 |
|
MD5 | 936d8e65dc8cc5e598f801dfee05b801 |
|
BLAKE2b-256 | d505f48a5046d24daa5a579baab7d2843dc1911d6bbd3ea6189b5fdc0aba21f1 |
Hashes for systemq-1.0.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50125acef3f98f2f35dae01c2a00a08c9e16f1424ad94fa8711db18b9d492523 |
|
MD5 | 087640c1ce3015255330bf6c6e039f1a |
|
BLAKE2b-256 | 3e56dc198f2ce8bb45224aa55cc504e0cbc540388192a8f3aaab7ae0f65884de |
Hashes for systemq-1.0.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2393ef74621aaf968d0ef45327bc42584d7b19379d5fd04e2e086f63b1b60db |
|
MD5 | 092f6beaf5cb3f7899f85702be2c74c1 |
|
BLAKE2b-256 | b6e610b4036ac4f51cead54e43305d73284f006195f6f9391d3f620543b6571f |
Hashes for systemq-1.0.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f604a343efbc10a1e935bf5a8fe9ef4691065fa99f2a5ca9bbda002df21c8e2f |
|
MD5 | b7a28d684a8959d124cbcf09f494675a |
|
BLAKE2b-256 | 0ecb995862bfe4dcae3ba8c2cac49d16805595b47d6d515d183a5717c54f8b87 |
Hashes for systemq-1.0.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2c795d28d4194387ff07463891ec137cad50f42ad5175d8b2e543034485420b |
|
MD5 | d1aac105a89531f253049442843e66cd |
|
BLAKE2b-256 | 4bc89e0bfe6abd96d0b7ce8fa228389f14336f71040fdb594cdec97de577360e |