লোকাল কনফিগারেশন#

একবার যখন আপনি Qiskt ইনস্টল করে চালিয়ে ফেলেছেন, কিছু অপশনাল কনফিগারেশন পদক্ষেপ নিয়ে আপনি Qiksit এর মূলত ব্যবহার নিজের মতন use case সাজিয়ে নিতে পারেন।

ব্যবহারকরি কনফিগ ফাইল#

Qiskit - এর স্থানীয় যান্ত্রিক বিন্যাস (কনফিগারেশন) মূলত ইউজার কনফিগ নথিতে থাকে। ini এই ফরম্যাট ফাইলটি Qiskit - এর ডিফল্ট বিন্যাস পরিবর্তন করার জন্য ব্যবহৃত হয়।

উদাহরণস্বরূপঃ

[default]
circuit_drawer = mpl
circuit_mpl_style = default
circuit_mpl_style_path = ~:~/.qiskit
state_drawer = hinton
transpile_optimization_level = 3
parallel = False
num_processes = 15

By default this file lives in ~/.qiskit/settings.conf but the path used can be overridden with the QISKIT_SETTINGS environment variable. If QISKIT_SETTINGS is set its value will used as the path to the user config file.

বিকল্প সমূহঃ

  • circuit_drawer: এটি বর্তনী (সার্কিট) অঙ্কনের ডিফল্ট ব্যাকএন্ড পরিবর্তন করার জন্য ব্যবহার করা হয়ে থাকে। qiskit.circuit.QuantumCircuit.draw() এবং qiskit.visualization.circuit_drawer(). এটার মান হতে পারে latex, mpl, text, অথবা latex_source এবং যখন ouptut কীওয়ার্ড আর্গুমেন্ট ঠিক করে দেয়া নেই তখন ড্রয়ার ব্যাকএন্ড ব্যবহৃত হবে।

  • circuit_mpl_style: এটা বর্তনী (সার্কিট) অঙ্কনের mpl ফলাফলের ব্যাকএন্ডের ডিফল্ট স্টাইল শিট হিসাবে ব্যবহৃত হয়। qiskit.circuit.QuantumCircuit.draw() এবং qiskit.visualization.circuit_drawer() । এটা default অথবা bw হিসেবে সেট করা সম্ভব।

  • circuit_mpl_style_path: বর্তনী (সার্কিট) ড্রয়ার পাওয়ার জন্য পাথ সেট করতে এটা ব্যবহার করা যেতে পারে, qiskit.circuit.QuantumCircuit.draw() অথবা qiskit.visualization.circuit_drawer(), mpl আউটপুট মোড ব্যবহার করার সময় জেসন স্টাইল শিট দেখতে ব্যবহৃত হয়।

  • state_drawer: এটা অবস্থা দৃশ্যায়ন (স্টেট ভিজ্যুয়ালাইজেশন) এর অঙ্কন ফাংশনের ডিফল্ট ব্যাকএন্ড পরিবর্তন করার জন্য ব্যবহৃত হয়। qiskit.quantum_info.Statevector.draw() এবং qiskit.quantum_info.DensityMatrix.draw(). এটা repr, text', latex, latex_source, qsphere, hinton, অথবা ব্লক bloch হিসাবে সেট করা এবন যখন output কীওয়ার্ড আর্গুমেন্ট নির্দিষ্টভাবে draw() মেথডে সেট করা নেই তখন আউটপুট মেথড ব্যবহৃত হবে।

  • transpile_optimization_level: এটি ০-৩ এর মাঝে একটি পূর্ণসংখ্যা নেয় এবং ডিফল্ট অপটিমাইজেশন লেভেল পরিবর্তনের জন্য ব্যবহার করে transpile() এবং execute()

  • parallel: This option takes a boolean value (either True or False) and is used to configure whether Python multiprocessing is enabled for operations that support running in parallel (for example transpilation of multiple QuantumCircuit objects). The default setting in the user config file can be overridden by the QISKIT_PARALLEL environment variable.

  • num_processes: This option takes an integer value (> 0) that is used to specify the maximum number of parallel processes to launch for parallel operations if parallel execution is enabled. The default setting in the user config file can be overridden by the QISKIT_NUM_PROCS environment variable.

কর্মপরিবেশের চলরাশিসমূহ#

কর্মপরিবেশের কিছু চল রাশি পরিবর্তন করে Qiskit - এর ডিফল্ট আচরণ পরিবর্তন করা যায়।

  • QISKIT_PARALLEL: if this variable is set to TRUE it will enable the use of Python multiprocessing to parallelize certain operations (for example transpilation over multiple circuits) in Qiskit.

  • QISKIT_NUM_PROCS: যদি সমান্তরাল ক্রিয়াকলাপ (অপারেশন) এক্সিকিউশন সক্রিয় করা থাকে তবে সমান্তরাল প্রসেসের সর্বোচ্চ সংখ্যা নির্ধারণ করে দেয়। প্রত্যাশিত মান হিসাবে এটি একটি পূর্ণসংখ্যা নেয় যা > ০।

  • RAYON_NUM_THREADS: Specifies the number of threads to run multithreaded operations in Qiskit. By default this multithreaded code will launch a thread for each logical CPU, if you'd like to adjust the number of threads Qiskit will use you can set this to an integer value. For example, setting RAYON_NUM_THREADS=4 will only launch 4 threads for multithreaded functions.

  • QISKIT_FORCE_THREADS: Specify that multithreaded code should always execute in multiple threads. By default if you're running multithreaded code in a section of Qiskit that is already running in parallel processes Qiskit will not launch multiple threads and instead execute that function serially. This is done to avoid potentially overloading limited CPU resources. However, if you would like to force the use of multiple threads even when in a multiprocess context you can set QISKIT_FORCE_THREADS=TRUE to do this.