Skip to main content

Module block

Module block 

Source
Expand description

C API for interacting with BasicBlock operations.

Functionsยง

ket_block_add_global_phase
Adds a global phase to the BasicBlock.
ket_block_append_block
Appends the contents of other block to block and consumes other.
ket_block_append_gate
Appends a new quantum gate (provided as a JSON payload) to a BasicBlock.
ket_block_control
Creates a new BasicBlock resulting from adding control qubits to all gates in the block.
ket_block_delete
Deallocates the memory associated with a BasicBlock.
ket_block_enable_approximated_decomposition
Enables approximate decomposition strategies for all gates in the given BasicBlock.
ket_block_inverse
Creates a new BasicBlock that is the adjoint (inverse) of the provided block.
ket_block_lock_control
Locks the control qubits of all gates in the given BasicBlock, preventing further additions.
ket_block_new
Allocates a new, empty BasicBlock and writes its pointer to block.
ket_block_proprieties_json
Serializes the properties of the BasicBlock into a JSON payload and writes it to the buffer.
ket_block_set_as_diagonal
Marks the BasicBlock as implementing a diagonal gate.
ket_block_set_as_permutation
Marks the BasicBlock as implementing a permutation gate.