|
Sequential Quantum Gate Decomposer
v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
|
Classes | |
| class | TestApplyDerivateTo |
| class | TestApplyDerivateToF32 |
| class | TestApplyFromRight |
| class | TestApplyToCombined |
| class | TestApplyToFloat32 |
| class | TestApplyToFloat64 |
| class | TestApplyToList |
| class | TestApplyToListF32 |
| class | TestCircuitMisc |
| class | TestGateFusion |
| class | TestGeneralOperation |
| class | TestNestedCircuit |
| class | TestRectangularApplyRoutes |
Functions | |
| def | _assert_state_close (a, b, rtol=1e-6) |
| def | _assert_unitary_close (a, b, rtol=1e-6) |
| def | _build_rx_rz_cnot_circuit (qbit_num) |
| def | _identity (n, dtype=np.complex128) |
| def | _params32 (n) |
| def | _params64 (n) |
| def | _random_state (n, dtype=np.complex128, seed=42) |
| def | _random_unitary (dim, seed=123) |
| def | _ref_matrix64 (circuit) |
Variables | |
| QBIT_NUMS_ALL | |
| QBIT_NUMS_MEDIUM | |
| QBIT_NUMS_SMALL | |
| RECT_COLS_MAX | |
Copyright 2020 Peter Rakyta, Ph.D.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Tests for qgd_Circuit: covers float32/float64 dispatch, state vector vs unitary,
apply_from_right, gate fusion (set_min_fusion), nested circuits, and boundary qubit
counts that stress AVX kernels (small kernel: qbit_num<14, TBB large kernel: qbit_num>=14).
|
private |
Assert two state vectors are the same up to a global phase.
Definition at line 83 of file test_circuit.py.

|
private |
Assert two unitaries are the same up to a global phase.
Definition at line 73 of file test_circuit.py.

|
private |
Build RX(0) â RZ(0) â CNOT(0,1) circuit if qbit_num >= 2, else RX â RZ.
Definition at line 56 of file test_circuit.py.

|
private |
|
private |
Float32 parameter array of length n.
Definition at line 49 of file test_circuit.py.

|
private |
Float64 parameter array of length n.
Definition at line 42 of file test_circuit.py.

|
private |
Return a normalised random state vector of length n.
Definition at line 34 of file test_circuit.py.

|
private |
Create a deterministic random unitary matrix using QR decomposition.
Definition at line 93 of file test_circuit.py.

|
private |
Compute reference unitary via get_Matrix (float64).
Definition at line 67 of file test_circuit.py.

| tests.gates.test_circuit.QBIT_NUMS_ALL |
Definition at line 112 of file test_circuit.py.
| tests.gates.test_circuit.QBIT_NUMS_MEDIUM |
Definition at line 111 of file test_circuit.py.
| tests.gates.test_circuit.QBIT_NUMS_SMALL |
Definition at line 110 of file test_circuit.py.
| tests.gates.test_circuit.RECT_COLS_MAX |
Definition at line 113 of file test_circuit.py.
1.8.13