Quos package simplifies plotting and simulating a quantum computing circuit employing oscillatory qudits.
Project description
Quos package
Quos package simplifies plotting and simulating a quantum computing circuit employing oscillatory qubits.
To install
pip install matplotlib
pip install quos
To upgrade
pip install --upgrade quos
To open quos.html
import quos
quos.qdoc()
To download quos.xlsm
import quos
quos.qxls()
To get argument for qplt
import quos
quos.qxls("ExcelFileWithSpecificationOfGates.xlsm")
To plot a circuit
import quos
quos.qplt('1,3,0|H,1,1|X,2,1|Z,3,2|Y,4,2|C,1,3,X,3,3|K,4,3|Rx 30,2,4|R 30 30 60,3,4|Cd,4,5,H,3,6|Ph 15,1,5|Pp 45,2,5|Ry 45,4,6|Sw,1,6,Sw,2,6|S,4,4|Rz 15,1,7|T,3,7|V,4,7|O,a,8|iSw,1,9,iSw,4,9|M,a,10')
- Q0 (qubit 0) on qubit other than 3 at time 0
- Q0 (qubit 1) on qubit 3 at time 0
- H (Hadamard gate) on qubit 1 at time 1
- X (Pauli X gate) on qubit 2 at time 1
- Z (Pauli Z gate) on qubit 3 at time 2
- Y (Pauli Y gate) on qubit 4 at time 2
- C (control point) on qubit 1 at time 3 controlling
- X (Pauli X gate) on qubit 3 at time 3
- K (Komparator gate) on qubit 4 at time 3
- Rx (rotation by 30 around X) on qubit 2 at time 4
- R (rotation by 30 30 60 around X Y Z) on qubit 3 at time 4
- Cd (reverse control point) on qubit 4 at time 5 controlling
- H (Hadamard gate) on qubit 3 at time 6
- Ph (global phase gate by 15) on qubit 1 at time 5
- Pp (phase gate for second state by 45) on qubit 2 at time 5
- Ry (rotation by 45 around Y) on qubit 4 at time 6
- Sw (swap) qubit 1 at time 6 with qubit 2 at time 6
- S (S gate) on qubit 4 at time 4
- Rz (rotation by 15 around Z) on qubit 1 at time 7
- T (T gate) on qubit 3 at time 7
- V (V gate) on qubit 4 at time 7
- O (Observer gate) on all qubits at time 8
- iSw (imaginary swap) qubit 1 at time 9 with qubit 4 at time 9
- M (Measurement gate) on all qubits at time 10
To simulate a circuit
Under construction ...
Gates included
-
Qubits
-
0: qubit in state 0
-
1: Qubit in state 1
-
Individual gates
-
I: Identity
-
T: T (Pi/8 phase gate)
-
Ph: Global phase gate: Needs angle
-
Pp: Phase gate for second state: Needs angle
-
H: Hadamard
-
X: (Pauli) X gate
-
Y: (Pauli) Y gate
-
Z: (Pauli) Z gate
-
Rx: Rotation around X: Needs angle
-
Ry: Rotation around Y: Needs angle
-
Rz: Rotation around Z: Needs angle
-
R: Rotation around arbitrary axis: Needs 3 angles
-
V: V (sqrt X) phase
-
S: S (sqrt Z) phase
-
Interactive gates
-
C: Controls another gate: Needs affected gate
-
Cd: Reverse-controls another gate: Needs affected gate
-
Sw: Swaps with another gate: Needs connected Sw
-
iSw: Imaginary swaps with another gate: Needs connected iSw
-
Measurement related
-
M: Measurement gate
-
O: Observation gate
-
K: Komparator (Comparator) gate
These gates can work for qudits as well as qubits.
Version History
- 0.0.1 2023-11-07 Initial release
- 0.0.2 2023-11-07 Minor corrections
- 0.0.3 2023-11-07 Minor corrections
- 0.0.4 2023-11-07 Minor corrections
- 0.0.5 2023-11-09 Removed dependancy on networkx package
- 0.0.6 2023-11-09 Enabled plotting of CNOT gate
- 0.0.7 2023-11-10 Enabled arguments and plotting of qubits
- 0.0.8 2023-11-14 Enabled several other gates
- 0.0.9 2023-11-15 Enabled measurement gates
- 0.0.10 2023-11-16 Enabled Excel file output
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 Distribution
Built Distribution
File details
Details for the file quos-0.0.10.tar.gz
.
File metadata
- Download URL: quos-0.0.10.tar.gz
- Upload date:
- Size: 68.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5db2100704753a7e6db472383227c99f44d46109b5de75e8a55a5260e60768bf |
|
MD5 | 5af77a1b4808695251243e8894944de2 |
|
BLAKE2b-256 | 50b53801fe9cd93064fca67e0dbe3d7627164464919c178a298075f96cc48bfc |
File details
Details for the file quos-0.0.10-py3-none-any.whl
.
File metadata
- Download URL: quos-0.0.10-py3-none-any.whl
- Upload date:
- Size: 97.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f05573f250107a9a531d1cd91a9de70e8bf62c8869882ad0bc157ba51cc74025 |
|
MD5 | 725b8571b465702a4e5576909f64da84 |
|
BLAKE2b-256 | 4f9177c013f3a92d156f2f145fbb852c4ccd0af4da5cb5b568e25ebd421017f8 |