quri_parts.openqasm.circuit package

OpenQASMTranspiler()
convert_to_qasm(circuit, text_io)

Converts a circuit to OpenQASM and writes it to IO stream.

Parameters:
  • circuit (ImmutableQuantumCircuit) – Circuit to be converted

  • text_io (io.TextIOBase) – Stream where output will be written

Return type:

None

convert_to_qasm_str(circuit)
Parameters:

circuit (ImmutableQuantumCircuit)

Return type:

str

convert_gate_to_qasm_line(gate)

Converts a gate to OpenQASM format.

Parameters:

gate (QuantumGate) – gate to be converted

Returns:

OpenQASM string

Return type:

str