Saravanan666/pypi-org huggingface dataset:
Package: qiskit-finance
Qiskit FinanceQiskit Financeis an open-source framework that contains uncertainty components for stock/securities problems,
applications, such as portfolio optimization, and data providers to source real or random data to
finance experiments.InstallationWe encourage installing Qiskit Finance via the pip tool (a python package manager).pipinstallqiskit-financepipwill handle all dependencies automatically and you will always install the latest
(and well-tested) version.If you want to work on the very latest work-in-progress versions, either to try features ahead of
their official release or if you want to contribute to Finance, then you can install from source.
To do this follow the instructions in thedocumentation.Creating Your First Finance Programming Experiment in QiskitNow that Qiskit Finance is installed, it's time to begin working with the finance module.
Let's try an experiment using Amplitude Estimation algorithm to
evaluate a fixed income asset with uncertain interest rates.importnumpyasnpfromqiskit.primitivesimportSamplerfromqiskit_algorithmsimportAmplitudeEstimationfromqiskit_finance.circuit.libraryimportNormalDistributionfromqiskit_finance.applicationsimportFixedIncomePricing# Create a suitable multivariate distributionnum_qubits=[2,2]bounds=[(0,0.12),(0,0.24)]mvnd=NormalDistribution(num_qubits,mu=[0.12,0.24],sigma=0.01*np.eye(2),bounds=bounds)# Create fixed income componentfixed_income=FixedIncomePricing(num_qubits,np.eye(2),np.zeros(2),cash_flow=[1.0,2.0],rescaling_factor=0.125,bounds=bounds,uncertainty_model=mvnd,)# the FixedIncomeExpectedValue provides us with the necessary rescalings# create the A operator for amplitude estimationproblem=fixed_income.to_estimation_problem()# Set number of evaluation qubits (samples)num_eval_qubits=5# Construct and run amplitude estimationsampler=Sampler()algo=AmplitudeEstimation(num_eval_qubits=num_eval_qubits,sampler=sampler)result=algo.estimate(problem)print(f"Estimated value:\t{fixed_income.interpret(result):.4f}")print(f"Probability:\t{result.max_probability:.4f}")When running the above the estimated value result should be 2.46 and probability 0.8487.Further examplesLearning path notebooks may be found in thefinance tutorialssection
of the documentation and are a great place to start.Contribution GuidelinesIf you'd like to contribute to Qiskit, please take a look at ourcontribution guidelines.
This project adheres to Qiskit'scode of conduct.
By participating, you are expected to uphold this code.We useGitHub issuesfor tracking requests and bugs. Pleasejoin the Qiskit Slack communityand for discussion and simple questions.
For questions that are more suited for a forum, we use theQiskittag inStack Overflow.Authors and CitationFinance was inspired, authored and brought about by the collective work of a team of researchers.
Finance continues to grow with the help and work ofmany people, who contribute
to the project at different levels.
If you use Qiskit, please cite as per the providedBibTeX file.LicenseThis project uses theApache License 2.0.
Package: qiskit-honeywell-provider
Qiskit Honeywell ProviderQiskitis an open-source framework for working with noisy quantum computers at the level of pulses, circuits, and algorithms.This project contains a provider that allows access to Honeywell quantum
devices.InstallationYou can install the provider using pip:pip3installqiskit-honeywell-providerpipwill handle installing all the python dependencies automatically and you
will always install the latest version.Setting up the Honeywell ProviderOnce the package is installed, you can access the provider from Qiskit via the following import:fromqiskit.providers.honeywellimportHoneywellYou will need credentials for the Honeywell Quantum Service. Credentials are
tied to an e-mail address that can be stored on disk with:Honeywell.save_account('username@company.com')After the initial saving of your account information, you will be prompted to enter
your password which will be used to acquire a token that will enable continuous
interaction until it expires.  Your password willnotbe saved to disk and will
be required infrequently to update the credentials stored on disk or when a new
machine must be authenticated.The credentials will then be loaded automatically on calls that return Backends,
or can be manually loaded with:Honeywell.load_account()This will load the most recently saved credentials from disk so that they can be provided
for each interaction with Honeywell's devices.Storing a new account willnotinvalidate your other stored credentials.  You may have an arbitrary
number of credentials saved.  To delete credentials you can use:Honeywell.delete_credentials()Which will delete the current accounts credentials from the credential store.  Please keep in mind
this only deletes the current accounts credentials, and not all credentials stored.With credentials loaded you can access the backends from the provider:backends=Honeywell.backends()backend=Honeywell.get_backend(device)You can then use that backend like you would use any other qiskit backend. For
example, running a bell state circuit:fromqiskitimport*qc=QuantumCircuit(2,2)qc.h(0)qc.cx(0,1)qc.measure([0,1],[0,1])result=execute(qc,backend).result()print(result.get_counts(qc))Using a proxyTo configure a proxy include it in the save account configuration:Honeywell.save_account('username@company.com',proxies={'urls':{'http':'http://user:password@myproxy:8080','https':'http://user:password@myproxy:8080'}})To remove the proxy you can save with an empty dictionary:Honeywell.save_account('username@company.com',proxies={})The 'urls' field must be a dictionary that maps a protocol type or url to a specific proxy.  Additional information/details can be foundhere.LicenseApache License 2.0.
Package: qiskit-ibm-provider
Qiskit IBM Quantum ProviderQiskitis an open-source SDK for working with quantum computers at the level of circuits, algorithms, and application modules.This project contains a provider that allows accessing theIBM Quantumsystems and simulators.Migrating from qiskit-ibmq-providerIf you are familiar with theqiskit-ibmq-providerrepository, check out themigration guide.InstallationYou can install the provider using pip:pipinstallqiskit-ibm-providerProvider SetupCreate an IBM Quantum account or log in to your existing account by visiting theIBM Quantum login page.Copy (and/or optionally regenerate) your API token from yourIBM Quantum account page.Take your token from step 2, here calledMY_API_TOKEN, and save it by callingIBMProvider.save_account():fromqiskit_ibm_providerimportIBMProviderIBMProvider.save_account(token='MY_API_TOKEN')The command above stores your credentials locally in a configuration file calledqiskit-ibm.json. By default, this file is located in$HOME/.qiskit, where$HOMEis your home directory.
Once saved you can then instantiate the provider like below and access the backends:fromqiskit_ibm_providerimportIBMProviderprovider=IBMProvider()# display current supported backendsprint(provider.backends())# get IBM's simulator backendsimulator_backend=provider.get_backend('ibmq_qasm_simulator')Load Account from Environment VariablesAlternatively, the IBM Provider can discover credentials from environment variables:exportQISKIT_IBM_TOKEN='MY_API_TOKEN'Then instantiate the provider without any arguments and access the backends:fromqiskit_ibm_providerimportIBMProviderprovider=IBMProvider()Enable Account for Current SessionAs another alternative, you can also enable an account just for the current session by instantiating the provider with the token.fromqiskit_ibm_providerimportIBMProviderprovider=IBMProvider(token='MY_API_TOKEN')Next StepsNow you're set up and ready to check out some of the tutorials.IBM Quantum LearningQiskitContribution GuidelinesIf you'd like to contribute to qiskit-ibm-provider, please take a look at ourcontribution guidelines. This project adheres to Qiskit'scode of conduct.
By participating, you are expect to uphold to this code.We useGitHub issuesfor tracking requests and bugs. Please use ourslackfor discussion and simple questions. To join our Slack community, use the
invite linkhere.Authors and CitationThe Qiskit IBM Quantum Provider is the work ofmany peoplewho contribute to the
project at different levels. If you use Qiskit, please cite as per the includedBibTeX file.LicenseApache License 2.0.
Package: qiskit-iqm
Qiskit on IQMQiskitadapter forIQM’squantum computers.What is it good for?With Qiskit on IQM, you can for example:Transpile arbitrary quantum circuits for IQM quantum architecturesSimulate execution with an IQM-specific noise modelExecute quantum circuits on an IQM quantum computerInstallationThe recommended way is to install the distribution packageqiskit-iqmdirectly from the
Python Package Index (PyPI):$pipinstallqiskit-iqmDocumentationThe documentation of the latest Qiskit on IQM release is availablehere.Jump to ourUser guidefor a quick introduction on how to use Qiskit on IQM.CopyrightQiskit on IQM is free software, released under the Apache License, version 2.0.Copyright 2022-2024 Qiskit on IQM developers.
Package: qiskit-nature-pyscf
Qiskit Nature PySCFQiskit Nature PySCFis a third-party integration plugin of Qiskit Nature + PySCF.InstallationWe encourage installing Qiskit Nature PySCF via the pip tool (a python package manager).pipinstallqiskit-nature-pyscfpipwill handle all dependencies automatically and you will always install the latest
(and well-tested) version. It will also install Qiskit Nature if needed.If you want to work on the very latest work-in-progress versions, either to try features ahead of
their official release or if you want to contribute to Qiskit Nature PySCF, then you can install from source.UsageThis plugin couples the APIs of PySCF and Qiskit Nature, enabling a user of PySCF to leverage
Quantum-based algorithms implemented in Qiskit to be used in-place of their classical counterparts.Active Space CalculationsOne very common approach is to use a Quantum algorithm to find the ground state in an active space
calculation. To this extent, this plugin provides theQiskitSolverclass, which you can inject
directly into yourCASCIorCASSCFsimulation objects of PySCF.Below we show a simple example of how to do this.frompyscfimportgto,scf,mcscfimportnumpyasnpfromqiskit.primitivesimportEstimatorfromqiskit_algorithmsimportVQEfromqiskit_algorithms.optimizersimportSLSQPfromqiskit_nature.second_q.algorithmsimportGroundStateEigensolverfromqiskit_nature.second_q.circuit.libraryimportHartreeFock,UCCSDfromqiskit_nature.second_q.mappersimportParityMapperfromqiskit_nature_pyscfimportQiskitSolvermol=gto.M(atom="Li 0 0 0; H 0 0 1.6",basis="sto-3g")h_f=scf.RHF(mol).run()norb=2nalpha,nbeta=1,1nelec=nalpha+nbetacas=mcscf.CASCI(h_f,norb,nelec)mapper=ParityMapper(num_particles=(nalpha,nbeta))ansatz=UCCSD(norb,(nalpha,nbeta),mapper,initial_state=HartreeFock(norb,(nalpha,nbeta),mapper,),)vqe=VQE(Estimator(),ansatz,SLSQP())vqe.initial_point=np.zeros(ansatz.num_parameters)algorithm=GroundStateEigensolver(mapper,vqe)cas.fcisolver=QiskitSolver(algorithm)cas.run()More detailed information for this plugin can be found in itsDocumentation. For further
information and explanations we recommend to check out the documentation ofPySCFandQiskit Nature.CitationIf you use this plugin, please cite the following references:PySCF, as perthese instructions.Qiskit, as per the providedBibTeX file.Qiskit Nature, as perhttps://doi.org/10.5281/zenodo.7828767
Package: qiskit-pqcee-provider
qiskit-pqcee-providerThe Qiskit provider for pQCee blockchain quantum simulatorInstallpip install qiskit-pqcee-providerUsageimportqiskitfromqiskit_pqcee_providerimportPqceeProviderprovider=PqceeProvider()backend=provider.get_backend('pqcee_simulator')qc=qiskit.QuantumCircuit(2)qc.h(0)qc.cx(0,1)qc.measure_all()job=backend.run(qc,shots=10)result=job.result()print(result.get_counts())
Package: qiskit-qcgpu-provider
# Qiskit QCGPU ProviderThis module contains [Qiskit](https://www.qiskit.org/)simulators using the OpenCL based [QCGPU](https://qcgpu.github.io) library.This provider adds two quantum circuit simulators, which are:* Statevector simulator - returns the statevector of a quantum circuit applied to the |0> state* Qasm simulator - simulates a qasm quantum circuit that has been compiled to run on the simulator.These simulation backends take advantage of the GPU or other OpenCL devices.## InstallationFirst of all, you will have to have some OpenCL installation installed already.You can install this module from PyPI using pip:```bash$ pip install qiskit-qcgpu-provider```## UsageThe usage of this backend with Qiskit is shown in the [usage example](https://github.com/Qiskit/qiskit-qcgpu-provider/tree/master/examples)For more information on Qiskit and quantum simulations, look at the Qiskit tutorials and the [Qiskit instructions page](https://github.com/Qiskit/qiskit-terra)## BenchmarkingTo benchmark this simulator against the `BasicAer` `qasm_simulator`,you can run```bash$ python3 benchmark.py --samples 15  --qubits 5 --single True```## LicenseThis project uses the [Apache License Version 2.0 software license.](https://www.apache.org/licenses/LICENSE-2.0)
Package: qiskit-qir
qiskit-qirQiskit to QIR translator.ExamplefromqiskitimportQuantumCircuitfromqiskit_qirimportto_qir_modulecircuit=QuantumCircuit(3,3,name="my-circuit")circuit.h(0)circuit.cx(0,1)circuit.cx(1,2)circuit.measure([0,1,2],[0,1,2])module,entry_points=to_qir_module(circuit)bitcode=module.bitcodeir=str(module)InstallationInstallqiskit-qirwithpip:pipinstallqiskit-qirNote: this will automatically install PyQIR if needed.DevelopmentInstall from sourceTo install the package from source, clone the repo onto your machine, browse to the root directory and runpipinstall-e.TestsFirst, install the development dependencies usingpipinstall-rrequirements_dev.txtTo run the tests in your local environment, runmaketestTo run the tests in virtual environments on supported Python versions, runmaketest-allDocsTo build the docs using Sphinx, runmakedocs
Package: qiskit-qir-alice-bob-fork
qiskit-qirQiskit to QIR translator.This is a temporary fork until the upstream qiskit-qir supports user-defined
instructions.ExamplefromqiskitimportQuantumCircuitfromqiskit_qirimportto_qir_modulecircuit=QuantumCircuit(3,3,name="my-circuit")circuit.h(0)circuit.cx(0,1)circuit.cx(1,2)circuit.measure([0,1,2],[0,1,2])module,entry_points=to_qir_module(circuit)bitcode=module.bitcodeir=str(module)InstallationInstallqiskit-qirwithpip:pipinstallqiskit-qirNote: this will automatically install PyQIR if needed.DevelopmentInstall from sourceTo install the package from source, clone the repo onto your machine, browse to the root directory and runpipinstall-e.TestsFirst, install the development dependencies usingpipinstall-rrequirements_dev.txtTo run the tests in your local environment, runmaketestTo run the tests in virtual environments on supported Python versions, runmaketest-allDocsTo build the docs using Sphinx, runmakedocs
Package: qiskit-qrack-provider
qiskit-qrack-providerThis repository contains a Qrack provider for Qiskit. You mustinstall PyQrackto use it.The underlying Qrack simulator is a high-performance, GPU-accelarated, noiseless simulator, by design. This repository provides the QrackQasmSimulator.This provider is based on and adapted from work by the IBM Qiskit Team and QCGPU's creator, Adam Kelly. Attribution is noted in content files, where appropriate. Original contributions and adaptations were made by Daniel Strano of the VM6502Q/Qrack Team.To use, in Qiskit:fromqiskit.providers.qrackimportQrackbackend=Qrack.get_backend('qasm_simulator')For example, for use withunitaryfund/mitiq, creating a (noiseless)executorcan be as simple as follows:fromqiskit.providers.qrackimportQrackdefexecutor(circuit,shots=1000):"""Executes the input circuit and returns the noisy expectation value <A>, where A=|0><0|."""# Use the Qrack QasmSimulator backend, (but it's specifically noiseless)ideal_backend=Qrack.get_backend('qasm_simulator')# Append measurementscircuit_to_run=circuit.copy()circuit_to_run.measure_all()# Run and get countsprint(f"Executing circuit with{len(circuit)}gates using{shots}shots.")job=ideal_backend.run(circuit_to_run,shots=shots)counts=job.result().get_counts()# Compute expectation value of the observable A=|0><0|returncounts["0"]/shotsGenerally, you will need to adapt the aboveexecutorsnippet to your particular purpose.(Happy Qracking! You rock!)
Package: qiskit-qryd-provider
Qiskit QRyd ProviderThis Python library contains a provider for theQiskitquantum computing framework. The provider allows for accessing the GPU-based emulator and the future Rydberg quantum computer of theQRydDemoconsortium.Interactive tutorials can be found on QRydDemo'sJupyter server.InstallationThe provider can be installed viapipfromPyPI:pipinstallqiskit-qryd-providerBasic UsageTo use the provider, a QRydDemo API token is required. The token can be obtained via ouronline registration form. You can use the token to initialize the provider:fromqiskit_qryd_providerimportQRydProviderprovider=QRydProvider("MY_TOKEN")Afterwards, you can choose a backend. Different backends are available that are capable of running ideal simulations of quantum circuits. An inclusion of noise models is planned for the future. You can either choose a backend emulating 30 qubits arranged in a 5x6 square lattice with nearest-neighbor connectivitybackend=provider.get_backend("qryd_emulator$square")or a backend emulating 30 qubits arranged in a triangle lattice with nearest-neighbor connectivitybackend=provider.get_backend("qryd_emulator$triangle")If you use these backends, the compilation of quantum circuits happens on our servers. The circuits are compiled to comply with the native gate set and connectivity of the Rydberg platform, using a decomposer developed byHQS Quantum Simulations.After selecting a backend, you can run a circuit on the backend:fromqiskitimportQuantumCircuit,executeqc=QuantumCircuit(2,2)qc.h(0)qc.cx(0,1)qc.measure([0,1],[0,1])job=execute(qc,backend,shots=200)print(job.result().get_counts())Expert OptionsThe provider adds the phase-shifted controlled-Z gate (PCZGate) and the phase-shifted controlled-phase gate (PCPGate) to Qiskit. These gates equal the controlled-Z/phase gates up to single-qubit phase gates. The gates can be realized by the Rydberg platform in multiple ways [1,2,3]. The value of the phase shift of the PCZGate can be modified before using the backend via:fromqiskit_qryd_providerimportPCZGatePCZGate.set_theta(1.234)LicenseThe Qiskit QRyd Provider is licensed under theApache License 2.0.
Package: qiskit-quantum-knn
Qiskit Quantum kNNQiskit Quantum kNNis a pure quantum knn classifier for a gated quantum
computer, which is build withQiskit.Qiskit Quantum kNN is made as a final project to fulfill a master's degree
at the Radboud University Nijmegen, in collaboration with ING Quantum
Technology. It is build by usingAfham et al. (2020)as it's
primary guide on how to construct the quantum circuit used for distance
measurements.InstallationThe best way of installingqiskit-quantum-knnis by usingpip:$pipinstallqiskit-quantum-knnSinceqiskit-quantum-knnruns mainly by usingqiskit, it is advised to check
out theirinstallation guideon how to install Qiskit.LicenseApache License 2.0
Package: qiskit-qubit-reuse
Qubit Reuse By Reset PluginThis repository contains an experimental transpiler pass calledqubit_reusewhich is executed at the end of theinitstage of transpilation. This pass is based on: Matthew DeCross et al. "Qubit-reuse compilation with mid-circuit measurement and reset"arXiv:2210.0.08039v1BackgroundCertain circuits can reduce the number of qubits required to produce results by resetting and re-using existent measured qubits. The order in which certain qubits are chosen is based on theircausal conesand the order in which they are measured.Causal ConesLet's say we have qubit a x in aDAGCircuit. We can traverse theDAGCircuitfrom the output node of x by checking all its predecessor nodes. When checking every operation node found, if at any point x interacts with other qubits, via a multi-qubit gate, the qubits in that operation are added to a set. From that point we continue evaluating recursively all the predecessor nodes in that multi-qubit interaction and adding all qubits found into the set, until no more predecessor nodes are left.When the traversal ends, the set will containall the qubits whose interactions affect qubit x. That is what we call the causal cone of x.Order of MeasurementQubits are re-arranged based on the length of their causal cones in ascending order, i.e. the first to be re-arranged are those with smaller causal cones.Before re-arranging a qubit, we need to check if there are any qubit that have been measured and is available to re-use. If so, we reset it and apply all operations onto its wire. Otherwise, a new qubit is added and the operations are passed on to that wire.InstallationThis package is not available through pypi, but can be installed by cloning this repository:gitclonehttps://github.com/qiskit-community/qiskit-qubit-reuseAnd then installing locally:pipinstall./qiskit-qubit-reuseIf you have the proper authentication keys, you can install it remotely by using:pipinstallgit+https://github.com/qiskit-community/qiskit-qubit-reuseUsageOnce installed, Qiskit is able to detect thequbit_reuseplugin via an entry point. All that needs to be done is to specify the init method in yourtranspilecall by usinginit_method="qubit_reuse". Use the following example:fromqiskit.circuit.randomimportrandom_circuitfromqiskitimporttranspilefromqiskit.providers.fake_providerimportFakeGuadalupeV2qc=random_circuit(16,4,measure=True)transpiled_qc=transpile(qc,backend=FakeGuadalupeV2(),init_method="qubit_reuse")This entry point provides the option with the least amount of qubits. If you want to specifically use the normal or dual circuit, you can specifcy that by using thequbit_reuse_normalor thequbit_reuse_dualendpoints.Warning: This plugin should only be used with circuits that contain measurements.
Package: qiskit-qulacs
Qiskit-Qulacs allows user to execute Qiskit programs using Qulacs backend.Qiskit-Qulacs is actively being developed, and we welcome your input and suggestions on the API and use-cases. If you have any ideas or feedback, please feel free to open a GitHub issue or contact us. We are interested in hearing about your experiences using the library.AboutBeginner's GuideInstallationQuickstart GuideTutorialsHow-TosHow to Give FeedbackContribution GuidelinesReferences and AcknowledgementsLicenseFor Developers/ContributorsContribution GuideTechnical DocsHow to Give FeedbackWe encourage your feedback! You can share your thoughts with us by:Opening an issuein the repositoryContribution GuidelinesFor information on how to contribute to this project, please take a look at ourcontribution guidelines.References and Acknowledgements[1] Qiskithttps://qiskit.org/[2] Qiskit-terrahttps://github.com/Qiskit/qiskit-terra[3] Qulacshttps://github.com/qulacs/qulacsLicenseApache License 2.0