Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
List of all members | Public Member Functions
tests.gates.test_circuit.TestCircuitMisc Class Reference

Public Member Functions

def test_empty_circuit_is_identity_f32 (self)
 
def test_empty_circuit_is_identity_f64 (self)
 
def test_get_matrix_matches_apply_to_identity (self, qbit_num)
 
def test_get_qbit_num (self)
 
def test_h_x_cnot_no_params_f32 (self, qbit_num)
 
def test_h_x_cnot_no_params_f64 (self, qbit_num)
 
def test_non_contiguous_params_handled (self)
 
def test_parameter_num_consistent (self)
 

Detailed Description

Miscellaneous circuit-level tests.

Definition at line 770 of file test_circuit.py.

Member Function Documentation

◆ test_empty_circuit_is_identity_f32()

def tests.gates.test_circuit.TestCircuitMisc.test_empty_circuit_is_identity_f32 (   self)
An empty circuit, float32 path, should act as identity.

Definition at line 796 of file test_circuit.py.

Here is the call graph for this function:

◆ test_empty_circuit_is_identity_f64()

def tests.gates.test_circuit.TestCircuitMisc.test_empty_circuit_is_identity_f64 (   self)
An empty circuit should act as identity on any matrix.

Definition at line 787 of file test_circuit.py.

Here is the call graph for this function:

◆ test_get_matrix_matches_apply_to_identity()

def tests.gates.test_circuit.TestCircuitMisc.test_get_matrix_matches_apply_to_identity (   self,
  qbit_num 
)
get_Matrix and apply_to on identity give the same result for all qubit counts.

Definition at line 806 of file test_circuit.py.

Here is the call graph for this function:

◆ test_get_qbit_num()

def tests.gates.test_circuit.TestCircuitMisc.test_get_qbit_num (   self)

Definition at line 782 of file test_circuit.py.

◆ test_h_x_cnot_no_params_f32()

def tests.gates.test_circuit.TestCircuitMisc.test_h_x_cnot_no_params_f32 (   self,
  qbit_num 
)
Parameter-free circuit float32 path produces correct result.

Definition at line 854 of file test_circuit.py.

Here is the call graph for this function:

◆ test_h_x_cnot_no_params_f64()

def tests.gates.test_circuit.TestCircuitMisc.test_h_x_cnot_no_params_f64 (   self,
  qbit_num 
)
Circuits with only parameter-free gates work with empty param arrays.

Definition at line 838 of file test_circuit.py.

Here is the call graph for this function:

◆ test_non_contiguous_params_handled()

def tests.gates.test_circuit.TestCircuitMisc.test_non_contiguous_params_handled (   self)
Non-contiguous parameter arrays should be handled correctly (no crash).

Definition at line 823 of file test_circuit.py.

Here is the call graph for this function:

◆ test_parameter_num_consistent()

def tests.gates.test_circuit.TestCircuitMisc.test_parameter_num_consistent (   self)
get_Parameter_Num matches sum of individual gate parameter counts.

Definition at line 773 of file test_circuit.py.


The documentation for this class was generated from the following file: