The Quantum Exact Simulation Toolkit v4.3.0
Loading...
Searching...
No Matches
Destructors

Functions for destroying existing channel data structures. More...

Functions

void destroyKrausMap (KrausMap map)
 
void destroySuperOp (SuperOp op)
 

Detailed Description

Functions for destroying existing channel data structures.

Function Documentation

◆ destroyKrausMap()

void destroyKrausMap ( KrausMap map)

Destroys a KrausMap, freeing its Kraus operators and internal SuperOp.

Since map is passed by value, this function cannot nullify the caller's copy of the KrausMap fields. The caller must not use map after destruction.

Parameters
[in]mapthe KrausMap to destroy.
Exceptions
error
  • if map is uninitialised.
Author
Tyson Jones

Definition at line 210 of file channels.cpp.

210 {
211 validate_krausMapFields(map, __func__);
212
213 freeKrausMap(map);
214}

Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().

◆ destroySuperOp()

void destroySuperOp ( SuperOp op)

Destroys a SuperOp, freeing all its CPU and GPU memory.

Since op is passed by value, this function cannot nullify the caller's copy of the SuperOp fields. The caller must not use op after destruction.

Parameters
[in]opthe SuperOp to destroy.
Exceptions
error
  • if op is uninitialised.
Author
Tyson Jones

Definition at line 203 of file channels.cpp.

203 {
204 validate_superOpFields(op, __func__);
205
206 freeSuperOp(op);
207}

Referenced by TEST_CASE(), TEST_CASE(), TEST_CASE(), and TEST_CASE().