qubiter.FouSEO_writer module

class qubiter.FouSEO_writer.FouSEO_writer(do_write, file_prefix, emb, do_perm=True, **kwargs)[source]

Bases: qubiter.SEO_writer.SEO_writer

This class is a subclass of SEO_writer so read that class’ docstrings first. This class writes English and Picture files for the exact compilation, discovered by Coppersmith, of the Discrete Fourier Transform. We follow the conventions of quant-ph 0407215, “QC Paulinesia” by R.R. Tucci.

Variables:do_perm (bool) – True if want circuit to include permutation that reverses qbit order
__init__(do_write, file_prefix, emb, do_perm=True, **kwargs)[source]

Constructor

Parameters:
  • file_prefix (str) –
  • do_write (bool) – True if want constructor to write automatically without being asked.
  • emb (CktEmbedder) –
  • do_perm (bool) – True if want circuit to include permutation that reverses qbit order
static fourier_trans_mat(num_rows, herm_conj=False)[source]

This function returns a numpy array with the quantum Fourier transform in it.

Parameters:
  • num_rows (int) – number of rows
  • herm_conj (bool) – If True, changes sign of all phases, which produces the hermitian conjugate of the matrix given when this is False
Returns:

Return type:

np.array

write()[source]

Writes circuit for quantum Fourier transform.

Returns:
Return type:None
write_hermitian()[source]

Write Hermitian conjugate of circuit written by write().

Returns:
Return type:None