magnet_square_z
¶
ZDirMagnetSquare - Z Direction Magnetization Square (qurry.qurries.magnet_square_z
)
arguments
¶
ZDirMagnetSquare - Arguments (qurry.qurries.magnet_square_z.arguments
)
- class qurry.qurries.magnet_square_z.arguments.ZDirMagnetSquareAnalyzeArgs[source]¶
The input of the analyze method.
- class qurry.qurries.magnet_square_z.arguments.ZDirMagnetSquareArguments(exp_name: str = 'exps', num_qubits: int = 0)[source]¶
Arguments for the experiment.
analysis
¶
ZDirMagnetSquare - Analysis (qurry.qurries.magnet_square_z.analysis
)
- class qurry.qurries.magnet_square_z.analysis.ZDirMSAnalysisContent(magnet_square: float | float64, num_qubits: int, shots: int, magnet_square_cells: dict[int, float64], taking_time: float | None = None)[source]¶
The content of the analysis.
- class qurry.qurries.magnet_square_z.analysis.ZDirMagnetSquareAnalysis(*, serial: int, log: dict[str, Any] | None = None, datatime: str | None = None, **other_kwargs)[source]¶
The container for the analysis of :cls:`ZDirMagnetSquareExperiment`.
- classmethod content_type() Type[ZDirMSAnalysisContent] [source]¶
The content instance type.
- classmethod input_type() Type[ZDirMSAnalysisInput] [source]¶
The input instance type.
utils
¶
ZDirMagnetSquare - Utility (qurry.qurries.magnet_square_z.utils
)
- qurry.qurries.magnet_square_z.utils.circuit_method(target_circuit: QuantumCircuit, target_key: str, exp_name: str) QuantumCircuit [source]¶
Build the circuit for the experiment.
- Parameters:
target_circuit (QuantumCircuit) – Target circuit.
target_key (Hashable) – Target key.
exp_name (str) – Experiment name.
- Returns:
The circuit for the experiment.
- Return type:
QuantumCircuit
experiment
¶
ZDirMagnetSquare - Experiment (qurry.qurries.magnet_square_z.experiment
)
- class qurry.qurries.magnet_square_z.experiment.ZDirMagnetSquareExperiment(arguments: _A | dict[str, Any], commonparams: Commonparams | dict[str, Any], outfields: dict[str, Any], beforewards: Before | None = None, afterwards: After | None = None, reports: AnalysesContainer | None = None)[source]¶
The instance of experiment.
- property analysis_instance: Type[ZDirMagnetSquareAnalysis]¶
The analysis instance for this experiment.
- analyze(pbar: tqdm | None = None) ZDirMagnetSquareAnalysis [source]¶
Calculate magnet square with more information combined.
- Parameters:
pbar (Optional[tqdm.tqdm], optional) – The progress bar. Defaults to None.
- Returns:
The result of the magnet square analysis.
- Return type:
- property arguments_instance: Type[ZDirMagnetSquareArguments]¶
The arguments instance for this experiment.
- classmethod method(targets: list[tuple[Hashable, QuantumCircuit]], arguments: ZDirMagnetSquareArguments, pbar: tqdm | None = None, multiprocess: bool = True) tuple[list[QuantumCircuit], dict[str, Any]] [source]¶
The method to construct circuit.
- Parameters:
targets (list[tuple[Hashable, QuantumCircuit]]) – The circuits of the experiment.
arguments (ZDirMagnetSquareArguments) – The arguments of the experiment.
pbar (Optional[tqdm.tqdm], optional) – The progress bar for showing the progress of the experiment. Defaults to None.
multiprocess (bool, optional) – Whether to use multiprocessing. Defaults to True.
- Returns:
The circuits of the experiment and the side products.
- Return type:
- classmethod params_control(targets: list[tuple[Hashable, QuantumCircuit]], exp_name: str = 'exps', **custom_kwargs: Any) tuple[ZDirMagnetSquareArguments, Commonparams, dict[str, Any]] [source]¶
Handling all arguments and initializing a single experiment.
- Parameters:
targets (list[tuple[Hashable, QuantumCircuit]]) – The circuits of the experiment.
exp_name (str, optional) – The name of the experiment. Naming this experiment to recognize it when the jobs are pending to IBMQ Service. This name is also used for creating a folder to store the exports. Defaults to ‘exps’.
custom_kwargs (Any) – The custom parameters.
- Returns:
The arguments of the experiment, the common parameters, and the custom parameters.
- Return type:
tuple[ZDirMagnetSquareArguments, Commonparams, dict[str, Any]]
- classmethod quantities(shots: int | None = None, single_counts: dict[str, int] | None = None, num_qubits: int | None = None, backend: Literal['Cython', 'Rust', 'Python'] | str = 'Rust', pbar: tqdm | None = None) MagnetSquare [source]¶
Calculate magnet square with more information combined.
- Parameters:
- Returns:
The result of the magnet square.
- Return type:
qurry
¶
ZDirMagnetSquare - Qurrium (qurry.qurries.magnet_square_z.qurry
)
- class qurry.qurries.magnet_square_z.qurry.ZDirMagnetSquare[source]¶
Z Direction Magnetization Square Qurry.
- property experiment_instance: Type[ZDirMagnetSquareExperiment]¶
The container class responding to this Qurrium class.
- measure(wave: QuantumCircuit | Hashable | None = None, shots: int = 1024, backend: Backend | None = None, exp_name: str = 'experiment', run_args: BaseRunArgs | dict[str, Any] | None = None, transpile_args: TranspileArgs | None = None, passmanager: str | PassManager | tuple[str, PassManager] | None = None, tags: tuple[str, ...] | None = None, qasm_version: Literal['qasm2', 'qasm3'] = 'qasm3', export: bool = False, save_location: Path | str | None = None, pbar: tqdm | None = None) str [source]¶
Execute the experiment.
- Parameters:
wave (Union[QuantumCircuit, Hashable]) – The key or the circuit to execute.
shots (int, optional) – Shots of the job. Defaults to 1024.
backend (Optional[Backend], optional) – The quantum backend. Defaults to None.
exp_name (str, optional) – The name of the experiment. Naming this experiment to recognize it when the jobs are pending to IBMQ Service. This name is also used for creating a folder to store the exports. Defaults to ‘exps’.
run_args (RunArgsType, optional) – Arguments for
Backend.run()
. Defaults to None.transpile_args (Optional[TranspileArgs], optional) – Arguments of
transpile()
fromqiskit.compiler.transpiler
. Defaults to None.passmanager (Optional[Union[str, PassManager, tuple[str, PassManager]], optional) – The passmanager. Defaults to None.
tags (Optional[tuple[str, ...]], optional) – The tags of the experiment. Defaults to None.
qasm_version (Literal["qasm2", "qasm3"], optional) – The version of OpenQASM. Defaults to “qasm3”.
export (bool, optional) – Whether to export the experiment. Defaults to False.
save_location (Optional[Union[Path, str]], optional) – The location to save the experiment. Defaults to None.
pbar (Optional[tqdm.tqdm], optional) – The progress bar for showing the progress of the experiment. Defaults to None.
- Returns:
The ID of the experiment
- Return type:
- measure_to_output(wave: QuantumCircuit | Hashable | None = None, shots: int = 1024, backend: Backend | None = None, exp_name: str = 'experiment', run_args: BaseRunArgs | dict[str, Any] | None = None, transpile_args: TranspileArgs | None = None, passmanager: str | PassManager | tuple[str, PassManager] | None = None, tags: tuple[str, ...] | None = None, qasm_version: Literal['qasm2', 'qasm3'] = 'qasm3', export: bool = False, save_location: Path | str | None = None, pbar: tqdm | None = None) ZDirMagnetSquareOutputArgs [source]¶
Trasnform
measure()
arguments form intooutput()
form.- Parameters:
wave (Union[QuantumCircuit, Hashable]) – The key or the circuit to execute.
shots (int, optional) – Shots of the job. Defaults to 1024.
backend (Optional[Backend], optional) – The quantum backend. Defaults to None.
exp_name (str, optional) – The name of the experiment. Naming this experiment to recognize it when the jobs are pending to IBMQ Service. This name is also used for creating a folder to store the exports. Defaults to ‘exps’.
run_args (RunArgsType, optional) – Arguments for
Backend.run()
. Defaults to None.transpile_args (Optional[TranspileArgs], optional) – Arguments of
transpile()
fromqiskit.compiler.transpiler
. Defaults to None.passmanager (Optional[Union[str, PassManager, tuple[str, PassManager]], optional) – The passmanager. Defaults to None.
tags (Optional[tuple[str, ...]], optional) – The tags of the experiment. Defaults to None.
qasm_version (Literal["qasm2", "qasm3"], optional) – The version of OpenQASM. Defaults to “qasm3”.
export (bool, optional) – Whether to export the experiment. Defaults to False.
save_location (Optional[Union[Path, str]], optional) – The location to save the experiment. Defaults to None.
pbar (Optional[tqdm.tqdm], optional) – The progress bar for showing the progress of the experiment. Defaults to None.
- Returns:
The output arguments.
- Return type:
- short_name = 'qurmagsq_magnet_square_zdir'¶
The short name of Qurrium.