qubasic 0.8.0__tar.gz → 0.10.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qubasic-0.8.0 → qubasic-0.10.0}/CHANGELOG.md +29 -0
- {qubasic-0.8.0/qubasic.egg-info → qubasic-0.10.0}/PKG-INFO +72 -1
- {qubasic-0.8.0 → qubasic-0.10.0}/README.md +71 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/pyproject.toml +1 -1
- {qubasic-0.8.0 → qubasic-0.10.0/qubasic.egg-info}/PKG-INFO +72 -1
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic.egg-info/SOURCES.txt +8 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/__init__.py +1 -1
- qubasic-0.10.0/qubasic_core/algos2.py +475 -0
- qubasic-0.10.0/qubasic_core/benchmarking.py +369 -0
- qubasic-0.10.0/qubasic_core/bosonic.py +175 -0
- qubasic-0.10.0/qubasic_core/dynamics.py +322 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/noise_mixin.py +8 -1
- qubasic-0.10.0/qubasic_core/pauliprop.py +130 -0
- qubasic-0.10.0/qubasic_core/qec.py +434 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/qol.py +8 -0
- qubasic-0.10.0/qubasic_core/qudits.py +154 -0
- qubasic-0.10.0/qubasic_core/resources.py +173 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/terminal.py +36 -2
- {qubasic-0.8.0 → qubasic-0.10.0}/tests/test_qubasic.py +259 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/LICENSE +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/MANIFEST.in +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/examples/bell.qb +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/examples/grover3.qb +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/examples/locc_teleport.qb +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/examples/sweep_rx.qb +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic.egg-info/dependency_links.txt +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic.egg-info/entry_points.txt +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic.egg-info/requires.txt +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic.egg-info/top_level.txt +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/__main__.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/algorithms.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/analysis.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/backend.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/classic.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/cli.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/control_flow.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/debug.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/demos.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/display.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/engine.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/engine_state.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/errors.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/exec_context.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/executor.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/expression.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/file_io.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/gates.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/help_text.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/io_protocol.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/locc.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/locc_commands.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/locc_display.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/locc_engine.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/locc_execution.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/memory.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/mock_backend.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/parser.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/patterns.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/profiler.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/program_mgmt.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/protocol.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/scope.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/screen.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/state_display.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/statements.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/strings.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/subs.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/qubasic_core/sweep.py +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/setup.cfg +0 -0
- {qubasic-0.8.0 → qubasic-0.10.0}/tests/test_features.py +0 -0
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.0 (2026-06-19)
|
|
4
|
+
|
|
5
|
+
Completes the frontier set: fault-tolerant QEC extras and a compilation/resources
|
|
6
|
+
group. All offline on Qiskit/Aer/numpy.
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- Surface code: `QEC SURFACE [d]`, a rotated surface code at odd distance d (validated to correct every weight-1 error).
|
|
10
|
+
- Union-find / matching decoder: exact minimum-weight matching of syndrome defects, scalable and dependency-free, selected with the `UF` flag on `LOGICAL_ERROR_RATE`. It tracks the optimal lookup decoder on the repetition and surface codes; the lookup decoder remains the default and the right choice for non-topological codes like Steane and Shor.
|
|
11
|
+
- Magic-state distillation: `DISTILL <p>` runs the 15-to-1 protocol (via the [15,11,3] Hamming detection), with cubic output-error suppression ~35 p^3.
|
|
12
|
+
- Lattice surgery: `LATTICE <a> <b>` performs the joint Zbar_A Zbar_B measurement that merges two repetition patches (the building block of a lattice-surgery CNOT).
|
|
13
|
+
- Fault-tolerant resource estimation: `RESOURCES <target_pL> <physical_p>` reports the surface-code distance, physical qubits per logical, T-count, T-factory overhead, and an approximate runtime.
|
|
14
|
+
- Calibrated device models: `DEVICE linear|ring|heavyhex|all [n] [T1us] [T2us]` builds a per-qubit thermal-relaxation noise model and coupling map for offline hardware-realistic simulation.
|
|
15
|
+
- `NOISE crosstalk <p>`: a correlated two-qubit ZZ crosstalk channel on entangling gates.
|
|
16
|
+
- `OPTIMIZE [level]`: transpiles the program and reports the depth and gate-count reduction.
|
|
17
|
+
|
|
18
|
+
## 0.9.0 (2026-06-19)
|
|
19
|
+
|
|
20
|
+
Frontier and experimental methods. All offline on Qiskit/Aer/numpy; nothing
|
|
21
|
+
needs a cloud backend or an external simulation engine.
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- Hamiltonian dynamics and open systems: `HAMILTONIAN` (Pauli sum, plus `ISING`, `HEISENBERG`, `HUBBARD` Jordan-Wigner, and `RYDBERG` builders), `EVOLVE` (Suzuki-Trotter time evolution, verified to fidelity 1.0 against the exact propagator), `LINDBLAD` (RK4 master-equation open-system evolution), and `CHANNEL`/`APPLYCHANNEL` (user-defined CPTP Kraus channels).
|
|
25
|
+
- Quantum error correction: `QEC` (repetition, Steane, Shor codes with self-verified logical operators), an optimal minimum-weight lookup decoder, `LOGICAL_ERROR_RATE` (Pauli-frame Monte Carlo), and `THRESHOLD` sweeps (the repetition crossing lands at p = 0.5).
|
|
26
|
+
- Frontier benchmarking: `XEB` (cross-entropy benchmarking), `QVOLUME` (quantum volume heavy-output test), `RBINT` (interleaved RB), `MIRROR` (mirror benchmarking), `GST` (1-qubit linear-inversion gate-set-style estimate), and entanglement measures `CONCURRENCE` and `NEGATIVITY`.
|
|
27
|
+
- Advanced algorithms: `IQPE` (iterative phase estimation), `AMPEST` (amplitude estimation), `AMPLIFY` (amplitude amplification), `QWALK` (discrete-time quantum walk), `GRAPHSTATE` (graph/cluster states for measurement-based computing), `FEATUREMAP`/`QKERNEL` (quantum-machine-learning encoding and kernels), `SHOR` (order finding and factoring, factors 15 into 3 x 5), and `HHL` (2x2 linear solver).
|
|
28
|
+
- Pauli propagation: `PAULIPROP` estimates Pauli expectation values by Heisenberg-picture backpropagation with weight truncation (exact when nothing is pruned, matching `EXPECT`).
|
|
29
|
+
- Qudit engine: `QUDIT`, `QX`, `QZ`, `QF`, `QSUM`, `QSTATE`, `QMEASURE` for d-level systems (independent of the qubit engine).
|
|
30
|
+
- Bosonic / continuous-variable engine: `BOSONIC`, `DISPLACE`, `SQUEEZE`, `CAT`, `BS`, `BSTATE` for truncated Fock-space modes.
|
|
31
|
+
|
|
3
32
|
## 0.8.0 (2026-06-19)
|
|
4
33
|
|
|
5
34
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qubasic
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.0
|
|
4
4
|
Summary: Quantum BASIC Interactive Terminal
|
|
5
5
|
Author-email: "Charles C. Norton" <machineelv@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -500,6 +500,77 @@ LOADQASM file.qasm Import OpenQASM as an editable program (2.0 built-in; 3
|
|
|
500
500
|
SAVEPNG out.png hist Save the histogram as a PNG (also: bloch, circuit; needs matplotlib)
|
|
501
501
|
```
|
|
502
502
|
|
|
503
|
+
## Hamiltonian dynamics and open systems
|
|
504
|
+
|
|
505
|
+
```
|
|
506
|
+
HAMILTONIAN H = 1.0 ZZ 0 1 + 0.5 X 0 Declare a Pauli-sum Hamiltonian
|
|
507
|
+
HAMILTONIAN H = ISING 1.0 0.5 Builders: ISING, HEISENBERG, HUBBARD, RYDBERG
|
|
508
|
+
10 EVOLVE H, 1.5, 20 Trotterized e^{-iHt} (time, steps) in a circuit
|
|
509
|
+
LINDBLAD NONE, 1.0, 200, 1.0 SM 0 Open-system master-equation evolution
|
|
510
|
+
CHANNEL AD = [[1,0],[0,0.95]] ; [[0,0.31],[0,0]] Define a Kraus channel
|
|
511
|
+
10 APPLYCHANNEL AD 0 Apply a custom channel
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
## Error correction
|
|
515
|
+
|
|
516
|
+
```
|
|
517
|
+
QEC STEANE Show a code (REP [d], STEANE, SHOR, SURFACE [d]) and its stabilizers
|
|
518
|
+
LOGICAL_ERROR_RATE STEANE 0.02 Monte-Carlo logical error rate (optimal lookup decoder)
|
|
519
|
+
LOGICAL_ERROR_RATE SURFACE 0.02 UF Same, with the union-find / matching decoder
|
|
520
|
+
THRESHOLD REP 0.0 0.5 11 Sweep p across distances 3/5/7 (crossing at 0.5)
|
|
521
|
+
DISTILL 0.02 15-to-1 magic-state distillation (output error ~35 p^3)
|
|
522
|
+
LATTICE 0 1 Lattice-surgery joint Zbar-Zbar measurement of two patches
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
Codes: repetition (any odd distance), Steane [[7,1,3]], Shor [[9,1,3]], rotated
|
|
526
|
+
surface. Decoders: an optimal minimum-weight lookup table (all codes) and a
|
|
527
|
+
scalable union-find / matching decoder (topological codes, via the `UF` flag).
|
|
528
|
+
|
|
529
|
+
## Benchmarking and verification
|
|
530
|
+
|
|
531
|
+
```
|
|
532
|
+
XEB 4 10 20 Cross-entropy benchmarking fidelity
|
|
533
|
+
QVOLUME 4 Quantum volume heavy-output test
|
|
534
|
+
RBINT H Interleaved RB fidelity of a Clifford gate
|
|
535
|
+
MIRROR 16 10 Mirror-circuit benchmarking
|
|
536
|
+
GST 1-qubit gate-set-style process estimate
|
|
537
|
+
CONCURRENCE 0 1 Two-qubit concurrence
|
|
538
|
+
NEGATIVITY 0 Entanglement negativity across a bipartition
|
|
539
|
+
PAULIPROP ZZ 0 1 Pauli-propagation expectation (Heisenberg, truncated)
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
## Advanced algorithms
|
|
543
|
+
|
|
544
|
+
```
|
|
545
|
+
IQPE 4 0 UGATE Iterative phase estimation of a UNITARY eigenphase
|
|
546
|
+
AMPEST 5 0 Amplitude estimation of the marked amplitude
|
|
547
|
+
10 AMPLIFY 101 One amplitude-amplification (Grover) step
|
|
548
|
+
QWALK 5 Discrete-time quantum walk on a cycle
|
|
549
|
+
10 GRAPHSTATE 0-1, 1-2 Prepare a graph/cluster state (MBQC resource)
|
|
550
|
+
10 FEATUREMAP x0 x1 ZZ feature-map data encoding (QML)
|
|
551
|
+
QKERNEL 0.5 0.3 ; 0.4 0.2 Quantum kernel |<phi(x)|phi(y)>|^2
|
|
552
|
+
SHOR 15 Order finding / factoring of small N
|
|
553
|
+
HHL 1 0 0 2 1 1 Solve a 2x2 Hermitian system A x = v
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
## Beyond qubits
|
|
557
|
+
|
|
558
|
+
```
|
|
559
|
+
QUDIT 3 2 d-level systems: QX, QZ, QF, QSUM, QSTATE, QMEASURE
|
|
560
|
+
BOSONIC 1 25 Continuous-variable Fock modes
|
|
561
|
+
DISPLACE 0 1.0 ...DISPLACE, SQUEEZE, CAT, BS, BSTATE
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
## Compilation and resources
|
|
565
|
+
|
|
566
|
+
```
|
|
567
|
+
RESOURCES 1e-12 0.001 Fault-tolerant estimate (surface-code distance, qubits, runtime)
|
|
568
|
+
DEVICE linear 5 Calibrated offline device model (per-qubit T1/T2 + coupling map)
|
|
569
|
+
DEVICE ring 5 80 60 ...with custom T1/T2 in microseconds (also: heavyhex, all, OFF)
|
|
570
|
+
OPTIMIZE 3 Transpile the program and report the depth/gate reduction
|
|
571
|
+
NOISE crosstalk 0.01 Correlated two-qubit ZZ crosstalk on entangling gates
|
|
572
|
+
```
|
|
573
|
+
|
|
503
574
|
## Noise models
|
|
504
575
|
|
|
505
576
|
```
|
|
@@ -467,6 +467,77 @@ LOADQASM file.qasm Import OpenQASM as an editable program (2.0 built-in; 3
|
|
|
467
467
|
SAVEPNG out.png hist Save the histogram as a PNG (also: bloch, circuit; needs matplotlib)
|
|
468
468
|
```
|
|
469
469
|
|
|
470
|
+
## Hamiltonian dynamics and open systems
|
|
471
|
+
|
|
472
|
+
```
|
|
473
|
+
HAMILTONIAN H = 1.0 ZZ 0 1 + 0.5 X 0 Declare a Pauli-sum Hamiltonian
|
|
474
|
+
HAMILTONIAN H = ISING 1.0 0.5 Builders: ISING, HEISENBERG, HUBBARD, RYDBERG
|
|
475
|
+
10 EVOLVE H, 1.5, 20 Trotterized e^{-iHt} (time, steps) in a circuit
|
|
476
|
+
LINDBLAD NONE, 1.0, 200, 1.0 SM 0 Open-system master-equation evolution
|
|
477
|
+
CHANNEL AD = [[1,0],[0,0.95]] ; [[0,0.31],[0,0]] Define a Kraus channel
|
|
478
|
+
10 APPLYCHANNEL AD 0 Apply a custom channel
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
## Error correction
|
|
482
|
+
|
|
483
|
+
```
|
|
484
|
+
QEC STEANE Show a code (REP [d], STEANE, SHOR, SURFACE [d]) and its stabilizers
|
|
485
|
+
LOGICAL_ERROR_RATE STEANE 0.02 Monte-Carlo logical error rate (optimal lookup decoder)
|
|
486
|
+
LOGICAL_ERROR_RATE SURFACE 0.02 UF Same, with the union-find / matching decoder
|
|
487
|
+
THRESHOLD REP 0.0 0.5 11 Sweep p across distances 3/5/7 (crossing at 0.5)
|
|
488
|
+
DISTILL 0.02 15-to-1 magic-state distillation (output error ~35 p^3)
|
|
489
|
+
LATTICE 0 1 Lattice-surgery joint Zbar-Zbar measurement of two patches
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
Codes: repetition (any odd distance), Steane [[7,1,3]], Shor [[9,1,3]], rotated
|
|
493
|
+
surface. Decoders: an optimal minimum-weight lookup table (all codes) and a
|
|
494
|
+
scalable union-find / matching decoder (topological codes, via the `UF` flag).
|
|
495
|
+
|
|
496
|
+
## Benchmarking and verification
|
|
497
|
+
|
|
498
|
+
```
|
|
499
|
+
XEB 4 10 20 Cross-entropy benchmarking fidelity
|
|
500
|
+
QVOLUME 4 Quantum volume heavy-output test
|
|
501
|
+
RBINT H Interleaved RB fidelity of a Clifford gate
|
|
502
|
+
MIRROR 16 10 Mirror-circuit benchmarking
|
|
503
|
+
GST 1-qubit gate-set-style process estimate
|
|
504
|
+
CONCURRENCE 0 1 Two-qubit concurrence
|
|
505
|
+
NEGATIVITY 0 Entanglement negativity across a bipartition
|
|
506
|
+
PAULIPROP ZZ 0 1 Pauli-propagation expectation (Heisenberg, truncated)
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
## Advanced algorithms
|
|
510
|
+
|
|
511
|
+
```
|
|
512
|
+
IQPE 4 0 UGATE Iterative phase estimation of a UNITARY eigenphase
|
|
513
|
+
AMPEST 5 0 Amplitude estimation of the marked amplitude
|
|
514
|
+
10 AMPLIFY 101 One amplitude-amplification (Grover) step
|
|
515
|
+
QWALK 5 Discrete-time quantum walk on a cycle
|
|
516
|
+
10 GRAPHSTATE 0-1, 1-2 Prepare a graph/cluster state (MBQC resource)
|
|
517
|
+
10 FEATUREMAP x0 x1 ZZ feature-map data encoding (QML)
|
|
518
|
+
QKERNEL 0.5 0.3 ; 0.4 0.2 Quantum kernel |<phi(x)|phi(y)>|^2
|
|
519
|
+
SHOR 15 Order finding / factoring of small N
|
|
520
|
+
HHL 1 0 0 2 1 1 Solve a 2x2 Hermitian system A x = v
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
## Beyond qubits
|
|
524
|
+
|
|
525
|
+
```
|
|
526
|
+
QUDIT 3 2 d-level systems: QX, QZ, QF, QSUM, QSTATE, QMEASURE
|
|
527
|
+
BOSONIC 1 25 Continuous-variable Fock modes
|
|
528
|
+
DISPLACE 0 1.0 ...DISPLACE, SQUEEZE, CAT, BS, BSTATE
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
## Compilation and resources
|
|
532
|
+
|
|
533
|
+
```
|
|
534
|
+
RESOURCES 1e-12 0.001 Fault-tolerant estimate (surface-code distance, qubits, runtime)
|
|
535
|
+
DEVICE linear 5 Calibrated offline device model (per-qubit T1/T2 + coupling map)
|
|
536
|
+
DEVICE ring 5 80 60 ...with custom T1/T2 in microseconds (also: heavyhex, all, OFF)
|
|
537
|
+
OPTIMIZE 3 Transpile the program and report the depth/gate reduction
|
|
538
|
+
NOISE crosstalk 0.01 Correlated two-qubit ZZ crosstalk on entangling gates
|
|
539
|
+
```
|
|
540
|
+
|
|
470
541
|
## Noise models
|
|
471
542
|
|
|
472
543
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qubasic
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.0
|
|
4
4
|
Summary: Quantum BASIC Interactive Terminal
|
|
5
5
|
Author-email: "Charles C. Norton" <machineelv@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -500,6 +500,77 @@ LOADQASM file.qasm Import OpenQASM as an editable program (2.0 built-in; 3
|
|
|
500
500
|
SAVEPNG out.png hist Save the histogram as a PNG (also: bloch, circuit; needs matplotlib)
|
|
501
501
|
```
|
|
502
502
|
|
|
503
|
+
## Hamiltonian dynamics and open systems
|
|
504
|
+
|
|
505
|
+
```
|
|
506
|
+
HAMILTONIAN H = 1.0 ZZ 0 1 + 0.5 X 0 Declare a Pauli-sum Hamiltonian
|
|
507
|
+
HAMILTONIAN H = ISING 1.0 0.5 Builders: ISING, HEISENBERG, HUBBARD, RYDBERG
|
|
508
|
+
10 EVOLVE H, 1.5, 20 Trotterized e^{-iHt} (time, steps) in a circuit
|
|
509
|
+
LINDBLAD NONE, 1.0, 200, 1.0 SM 0 Open-system master-equation evolution
|
|
510
|
+
CHANNEL AD = [[1,0],[0,0.95]] ; [[0,0.31],[0,0]] Define a Kraus channel
|
|
511
|
+
10 APPLYCHANNEL AD 0 Apply a custom channel
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
## Error correction
|
|
515
|
+
|
|
516
|
+
```
|
|
517
|
+
QEC STEANE Show a code (REP [d], STEANE, SHOR, SURFACE [d]) and its stabilizers
|
|
518
|
+
LOGICAL_ERROR_RATE STEANE 0.02 Monte-Carlo logical error rate (optimal lookup decoder)
|
|
519
|
+
LOGICAL_ERROR_RATE SURFACE 0.02 UF Same, with the union-find / matching decoder
|
|
520
|
+
THRESHOLD REP 0.0 0.5 11 Sweep p across distances 3/5/7 (crossing at 0.5)
|
|
521
|
+
DISTILL 0.02 15-to-1 magic-state distillation (output error ~35 p^3)
|
|
522
|
+
LATTICE 0 1 Lattice-surgery joint Zbar-Zbar measurement of two patches
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
Codes: repetition (any odd distance), Steane [[7,1,3]], Shor [[9,1,3]], rotated
|
|
526
|
+
surface. Decoders: an optimal minimum-weight lookup table (all codes) and a
|
|
527
|
+
scalable union-find / matching decoder (topological codes, via the `UF` flag).
|
|
528
|
+
|
|
529
|
+
## Benchmarking and verification
|
|
530
|
+
|
|
531
|
+
```
|
|
532
|
+
XEB 4 10 20 Cross-entropy benchmarking fidelity
|
|
533
|
+
QVOLUME 4 Quantum volume heavy-output test
|
|
534
|
+
RBINT H Interleaved RB fidelity of a Clifford gate
|
|
535
|
+
MIRROR 16 10 Mirror-circuit benchmarking
|
|
536
|
+
GST 1-qubit gate-set-style process estimate
|
|
537
|
+
CONCURRENCE 0 1 Two-qubit concurrence
|
|
538
|
+
NEGATIVITY 0 Entanglement negativity across a bipartition
|
|
539
|
+
PAULIPROP ZZ 0 1 Pauli-propagation expectation (Heisenberg, truncated)
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
## Advanced algorithms
|
|
543
|
+
|
|
544
|
+
```
|
|
545
|
+
IQPE 4 0 UGATE Iterative phase estimation of a UNITARY eigenphase
|
|
546
|
+
AMPEST 5 0 Amplitude estimation of the marked amplitude
|
|
547
|
+
10 AMPLIFY 101 One amplitude-amplification (Grover) step
|
|
548
|
+
QWALK 5 Discrete-time quantum walk on a cycle
|
|
549
|
+
10 GRAPHSTATE 0-1, 1-2 Prepare a graph/cluster state (MBQC resource)
|
|
550
|
+
10 FEATUREMAP x0 x1 ZZ feature-map data encoding (QML)
|
|
551
|
+
QKERNEL 0.5 0.3 ; 0.4 0.2 Quantum kernel |<phi(x)|phi(y)>|^2
|
|
552
|
+
SHOR 15 Order finding / factoring of small N
|
|
553
|
+
HHL 1 0 0 2 1 1 Solve a 2x2 Hermitian system A x = v
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
## Beyond qubits
|
|
557
|
+
|
|
558
|
+
```
|
|
559
|
+
QUDIT 3 2 d-level systems: QX, QZ, QF, QSUM, QSTATE, QMEASURE
|
|
560
|
+
BOSONIC 1 25 Continuous-variable Fock modes
|
|
561
|
+
DISPLACE 0 1.0 ...DISPLACE, SQUEEZE, CAT, BS, BSTATE
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
## Compilation and resources
|
|
565
|
+
|
|
566
|
+
```
|
|
567
|
+
RESOURCES 1e-12 0.001 Fault-tolerant estimate (surface-code distance, qubits, runtime)
|
|
568
|
+
DEVICE linear 5 Calibrated offline device model (per-qubit T1/T2 + coupling map)
|
|
569
|
+
DEVICE ring 5 80 60 ...with custom T1/T2 in microseconds (also: heavyhex, all, OFF)
|
|
570
|
+
OPTIMIZE 3 Transpile the program and report the depth/gate reduction
|
|
571
|
+
NOISE crosstalk 0.01 Correlated two-qubit ZZ crosstalk on entangling gates
|
|
572
|
+
```
|
|
573
|
+
|
|
503
574
|
## Noise models
|
|
504
575
|
|
|
505
576
|
```
|
|
@@ -16,14 +16,18 @@ qubasic.egg-info/top_level.txt
|
|
|
16
16
|
qubasic_core/__init__.py
|
|
17
17
|
qubasic_core/__main__.py
|
|
18
18
|
qubasic_core/algorithms.py
|
|
19
|
+
qubasic_core/algos2.py
|
|
19
20
|
qubasic_core/analysis.py
|
|
20
21
|
qubasic_core/backend.py
|
|
22
|
+
qubasic_core/benchmarking.py
|
|
23
|
+
qubasic_core/bosonic.py
|
|
21
24
|
qubasic_core/classic.py
|
|
22
25
|
qubasic_core/cli.py
|
|
23
26
|
qubasic_core/control_flow.py
|
|
24
27
|
qubasic_core/debug.py
|
|
25
28
|
qubasic_core/demos.py
|
|
26
29
|
qubasic_core/display.py
|
|
30
|
+
qubasic_core/dynamics.py
|
|
27
31
|
qubasic_core/engine.py
|
|
28
32
|
qubasic_core/engine_state.py
|
|
29
33
|
qubasic_core/errors.py
|
|
@@ -44,10 +48,14 @@ qubasic_core/mock_backend.py
|
|
|
44
48
|
qubasic_core/noise_mixin.py
|
|
45
49
|
qubasic_core/parser.py
|
|
46
50
|
qubasic_core/patterns.py
|
|
51
|
+
qubasic_core/pauliprop.py
|
|
47
52
|
qubasic_core/profiler.py
|
|
48
53
|
qubasic_core/program_mgmt.py
|
|
49
54
|
qubasic_core/protocol.py
|
|
55
|
+
qubasic_core/qec.py
|
|
50
56
|
qubasic_core/qol.py
|
|
57
|
+
qubasic_core/qudits.py
|
|
58
|
+
qubasic_core/resources.py
|
|
51
59
|
qubasic_core/scope.py
|
|
52
60
|
qubasic_core/screen.py
|
|
53
61
|
qubasic_core/state_display.py
|