Sequential Quantum Gate Decomposer  v1.9.6
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Macros | Functions
test_basic.cpp File Reference
#include "Gate.h"
#include "H.h"
#include "density_matrix.h"
#include "gate_operation.h"
#include "matrix.h"
#include "noise_channel.h"
#include "noise_operation.h"
#include "noisy_circuit.h"
#include <cassert>
#include <cmath>
#include <iostream>
Include dependency graph for test_basic.cpp:

Go to the source code of this file.

Macros

#define ASSERT_NEAR(a, b, tol)
 
#define ASSERT_TRUE(cond)
 

Functions

int main ()
 
int test_amplitude_damping ()
 
int test_clone_operations ()
 
int test_construction ()
 
int test_depolarizing_fixed ()
 
int test_depolarizing_parametric ()
 
int test_gate_operation ()
 
int test_ground_state ()
 
int test_legacy_noise_channel ()
 
int test_maximally_mixed ()
 
int test_mixed_gates_and_noise ()
 
int test_noisy_circuit_bell ()
 
int test_noisy_circuit_parametric_noise ()
 
int test_noisy_circuit_with_noise ()
 
int test_operation_info ()
 
int test_partial_trace ()
 
int test_phase_damping ()
 
int test_single_qubit_local ()
 
int test_state_vector_construction ()
 
int test_two_qubit_controlled ()
 
int test_unitary_evolution ()
 

Macro Definition Documentation

◆ ASSERT_NEAR

#define ASSERT_NEAR (   a,
  b,
  tol 
)
Value:
if (std::abs((a) - (b)) > (tol)) { \
std::cerr << "FAILED: Expected " << (a) << " ≈ " << (b) \
<< ", difference: " << std::abs((a) - (b)) << std::endl; \
return 1; \
}

Definition at line 22 of file test_basic.cpp.

◆ ASSERT_TRUE

#define ASSERT_TRUE (   cond)
Value:
if (!(cond)) { \
std::cerr << "FAILED: Condition false: " #cond << std::endl; \
return 1; \
}

Definition at line 29 of file test_basic.cpp.

Function Documentation

◆ main()

int main ( )

Definition at line 673 of file test_basic.cpp.

Here is the call graph for this function:

◆ test_amplitude_damping()

int test_amplitude_damping ( )

Definition at line 363 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_clone_operations()

int test_clone_operations ( )

Definition at line 620 of file test_basic.cpp.

Here is the caller graph for this function:

◆ test_construction()

int test_construction ( )

Definition at line 39 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_depolarizing_fixed()

int test_depolarizing_fixed ( )

Definition at line 300 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_depolarizing_parametric()

int test_depolarizing_parametric ( )

Definition at line 333 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_gate_operation()

int test_gate_operation ( )

Definition at line 271 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_ground_state()

int test_ground_state ( )

Definition at line 56 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_legacy_noise_channel()

int test_legacy_noise_channel ( )

Definition at line 652 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_maximally_mixed()

int test_maximally_mixed ( )

Definition at line 126 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_mixed_gates_and_noise()

int test_mixed_gates_and_noise ( )

Definition at line 524 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_noisy_circuit_bell()

int test_noisy_circuit_bell ( )

Definition at line 440 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_noisy_circuit_parametric_noise()

int test_noisy_circuit_parametric_noise ( )

Definition at line 497 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_noisy_circuit_with_noise()

int test_noisy_circuit_with_noise ( )

Definition at line 471 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_operation_info()

int test_operation_info ( )

Definition at line 552 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_partial_trace()

int test_partial_trace ( )

Definition at line 587 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_phase_damping()

int test_phase_damping ( )

Definition at line 399 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_single_qubit_local()

int test_single_qubit_local ( )

Definition at line 192 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_state_vector_construction()

int test_state_vector_construction ( )

Definition at line 94 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_two_qubit_controlled()

int test_two_qubit_controlled ( )

Definition at line 229 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ test_unitary_evolution()

int test_unitary_evolution ( )

Definition at line 154 of file test_basic.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: