Sequential Quantum Gate Decomposer  v1.9.3
Powerful decomposition of general unitarias into one- and two-qubit gates gates
Functions
custom_gate_structure_test.cpp File Reference

A simple example file for a decomposition of general random unitaries into custom structure of U3 and CNOT gates. More...

#include <iostream>
#include <stdio.h>
#include <map>
#include "common.h"
#include "N_Qubit_Decomposition.h"
#include "Random_Unitary.h"
#include "logging.h"
Include dependency graph for custom_gate_structure_test.cpp:

Go to the source code of this file.

Functions

Gates_blockcreate_custom_gate_structure (int qbit_num)
 Function to create custom gate structure for the decomposition. More...
 
int main ()
 Decomposition of general random unitary matrix into a custom structure of U3 and CNOT gates. More...
 

Detailed Description

A simple example file for a decomposition of general random unitaries into custom structure of U3 and CNOT gates.

Definition in file custom_gate_structure_test.cpp.

Function Documentation

◆ create_custom_gate_structure()

Gates_block* create_custom_gate_structure ( int  qbit_num)

Function to create custom gate structure for the decomposition.

Parameters
qbit_numThe number of qubits for which the gate structure is constructed.
Returns
Returns with a gate structure to be used in the decomposition.

[gates block]

[gates block]

[disentangle qubit]

[disentangle qubit]

[custom structure]

[custom structure]

Definition at line 48 of file custom_gate_structure_test.cpp.

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

◆ main()

int main ( )

Decomposition of general random unitary matrix into a custom structure of U3 and CNOT gates.

Stringstream input to store the output messages.

Logging variable to set the verbosity level.

Set the verbosity level of the output messages.

[general random]

[general random]

[creating decomp class]

[creating decomp class]

[creating custom gate structure]

[creating custom gate structure]

[performing decomposition]

[performing decomposition]

Definition at line 112 of file custom_gate_structure_test.cpp.

Here is the call graph for this function: