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.TestApplyToFloat32 Class Reference

Public Member Functions

def test_apply_to_f32_dtype_preserved (self, qbit_num)
 
def test_apply_to_f32_state_vector (self, qbit_num)
 
def test_apply_to_f32_unitary_close_to_f64 (self, qbit_num)
 
def test_apply_to_f32_wrong_dtype_raises (self)
 
def test_apply_to_f64_wrong_dtype_raises (self)
 

Detailed Description

Apply_to float32: complex64 precision correctness against float64 reference.

Definition at line 165 of file test_circuit.py.

Member Function Documentation

◆ test_apply_to_f32_dtype_preserved()

def tests.gates.test_circuit.TestApplyToFloat32.test_apply_to_f32_dtype_preserved (   self,
  qbit_num 
)
Output dtype should remain complex64 after float32 apply_to.

Definition at line 209 of file test_circuit.py.

Here is the call graph for this function:

◆ test_apply_to_f32_state_vector()

def tests.gates.test_circuit.TestApplyToFloat32.test_apply_to_f32_state_vector (   self,
  qbit_num 
)
float32 state vector apply matches float64 reference.

Definition at line 188 of file test_circuit.py.

Here is the call graph for this function:

◆ test_apply_to_f32_unitary_close_to_f64()

def tests.gates.test_circuit.TestApplyToFloat32.test_apply_to_f32_unitary_close_to_f64 (   self,
  qbit_num 
)
float32 apply_to result should be close to float64 result.

Definition at line 169 of file test_circuit.py.

Here is the call graph for this function:

◆ test_apply_to_f32_wrong_dtype_raises()

def tests.gates.test_circuit.TestApplyToFloat32.test_apply_to_f32_wrong_dtype_raises (   self)
Passing complex128 with is_f32=True should raise.

Definition at line 220 of file test_circuit.py.

Here is the call graph for this function:

◆ test_apply_to_f64_wrong_dtype_raises()

def tests.gates.test_circuit.TestApplyToFloat32.test_apply_to_f64_wrong_dtype_raises (   self)
Passing complex64 with is_f32=False (default) should raise.

Definition at line 229 of file test_circuit.py.

Here is the call graph for this function:

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