qpic_diagram_for_bloq#
View source on GitHub
|
Generate latex diagram for bloq by invoking qpic. Assumes qpic is already installed.
qualtran.drawing.qpic_diagram.qpic_diagram_for_bloq(
bloq: 'Bloq',
base_file_path: Union[None, pathlib.Path, str] = None,
output_type: str = 'pdf'
) -> str
Outputs one of the following files, based on output_type:
base_file_path + ‘.qpic’ - Obtained via get_qpic_data(bloq)
base_file_path + ‘.tex’ - Obtained via
qpic -f base_file_path.qpicbase_file_path + ‘.pdf’ - Uses
pdflatextool to convert tex to pdf. See https://tug.org/applications/pdftex/ for more details on how to installpdflatex.base_file_path + ‘.png’ - Uses
converttool to convert pdf to png. See https://imagemagick.org/ for more details on how to installconvert.
Args
bloqThe bloq to generate a qpic diagram for
base_file_pathPrefix of the path where output file is saved. The output file corresponds to f’{base_file_path}.{output_type}’
output_typeFormat of the diagram generated using qpic. Supported output types are one of [‘qpic’, ‘tex’, ‘pdf’, ‘png’]
View source on GitHub