beforewards
¶
Experiment - Beforewards (qurry.qurrium.experiment.beforewards
)
- class qurry.qurrium.experiment.beforewards.Before(target: list[tuple[Hashable, QuantumCircuit | str]], target_qasm: list[tuple[str, str]], circuit: list[QuantumCircuit], circuit_qasm: list[str], job_id: list[str], side_product: dict[str, Any])[source]¶
The data of experiment will be independently exported in the folder ‘advent’, which generated before the experiment.
- circuit: list[QuantumCircuit]¶
The transpiled circuits of experiment.
- export(export_transpiled_circuit: bool = False) tuple[dict[str, Any], dict[str, Any]] [source]¶
Export the experiment’s data before executing.
- Parameters:
export_circuit (bool, optional) – Whether to export the transpiled circuit as txt. Defaults to False. for It’s space-saving purpose and performance improvement. When set to True, the transpiled circuit will be draw as txt. Otherwise, the circuit will be not exported but circuit qasm remains.
- Returns:
The experiment’s arguments, and the experiment’s side product.
- Return type:
- classmethod read(file_index: dict[str, str], save_location: Path) Before [source]¶
Read the exported experiment file.
- Parameters:
- Returns:
The experiment’s arguments, the experiment’s common parameters, and the experiment’s side product.
- Return type:
- revive_circuit(replace_circuits: bool = False) list[QuantumCircuit] [source]¶
Revive the circuit from the qasm, return the revived circuits.
- Parameters:
replace_circuits (bool, optional) – Whether to replace the circuits. Defaults to False.
- Raises:
ValueError – If the .circuit is not empty.
- Returns:
The revived circuits.
- Return type:
list[QuantumCircuit]
- revive_target(replace_target: bool = False) dict[Hashable, QuantumCircuit] [source]¶
Revive the target circuits from the qasm, return the revived target.
- Parameters:
replace_target (bool, optional) – Whether to replace the target circuits. Defaults to False.
- Raises:
ValueError – If the .target is not empty.
- Returns:
The revived target circuits.
- Return type:
dict[Hashable, QuantumCircuit]
- qurry.qurrium.experiment.beforewards.create_beforewards(beforewards: Before | None) Before [source]¶
Create a Beforewards object.