qutip_qip.qiskit
Simulation of qiskit circuits on Gate and Pulse level in qutip_qip.
Classes
|
The base class for |
|
|
|
|
|
Stores information about an ongoing job. |
- class qutip_qip.qiskit.Job(backend: Backend, job_id: str, circuit: list[QuantumCircuit])[source]
Bases:
JobV1Stores information about an ongoing job.
- Parameters:
- backend
QiskitCircuitSimulator The backend used to simulate a circuit in the job.
- job_idstr
Unique ID identifying a job.
- result
qiskit.result.Result The result of a simulation run.
- backend
- class qutip_qip.qiskit.QiskitCircuitSimulator(num_qubits: int = 10, basis_gates: list[str] = ['PHASEGATE', 'X', 'Y', 'Z', 'H', 'S', 'T', 'RX', 'RY', 'RZ', 'SWAP', 'QASMU', 'CX', 'CY', 'CZ', 'CRX', 'CRY', 'CRZ', 'CPHASE'], max_shots: int = 1000000.0, max_circuits: int = 1, name: str = 'circuit_simulator', description: str = 'A qutip-qip based operator-level circuit simulator.', version: str = '0.1')[source]
Bases:
QiskitSimulatorBaseqiskitbackend dealing with operator-level circuit simulation usingqutip_qip’sCircuitSimulator.- Parameters:
- num_qubitsint, Optional
Number of qubits supported by the backend circuit simulator. Defaults to 10 qubits.
- basis_gateslist[str], Optional
QuTiP Basis Gates supported by the backend circuit simulator. Defaults to [PHASEGATE, X, Y, Z, RX, RY, RZ, Hadamard, S, T, SWAP, QASMU, CX, CY, CZ, CRX, CRY, CRZ, CPHASE]
- max_shotsint, Optional
Maximum number of sampling shots supported by the circuit simulator. Defaults to 1e6
- max_circuitsint, Optional
Maximum number of circuits which can be passed to the backend circuit simulator. in a single job. Defaults to 1.
- namestr, Optional
Name of the backend circuit simulator.
- descriptionstr, Optional
Description of the backend circuit simulator.
- versionfloat, Optional
Backend circuit simulator version
Notes
Inherits all attributes and methods from QiskitSimulatorBase.
- property meas_map: list[list[int]]
Simulator allows measuring any qubit independently
- class qutip_qip.qiskit.QiskitPulseSimulator(processor: Processor, num_qubits: int = 10, basis_gates: list[str] = ['PHASEGATE', 'X', 'Y', 'Z', 'H', 'S', 'T', 'RX', 'RY', 'RZ', 'SWAP', 'QASMU', 'CX', 'CY', 'CZ', 'CRX', 'CRY', 'CRZ', 'CPHASE'], max_shots: int = 1000000.0, max_circuits: int = 1, name: str = 'pulse_simulator', description: str = 'A qutip-qip based pulse-level simulator based on the open system solver.', version: str = '0.1')[source]
Bases:
QiskitSimulatorBaseqiskitbackend dealing with pulse-level simulation.- Parameters:
- processor
Processor The processor model to be used for simulation. An instance of the required
Processorobject is to be provided after initialising it with the required parameters.- num_qubitsint, Optional
num_qubits for the Pulse Simulator Backend. Defaults to 10 qubits.
- basis_gateslist[str], Optional
The basis gates names in QuTip. Defaults to (PHASEGATE, X, Y, Z, RX, RY, RZ, Hadamard, S, T, SWAP, QASMU, CX, CY, CZ, CRX, CRY, CRZ, CPHASE)
- max_shotsint, Optional
Maximum number of shots the Backend support while sampling.
- max_circuitsint, Optional
The maximum number of circuits that can be run in a single job.
- namestr, Optional
Name of the Pulse Simulator Backend
- descriptionstr, Optional
Description of the Pulse Simulator Backend
- versionstr, Optional
Version of Pulse Simulator Backend
- processor
- Attributes:
- processor
Processor The processor model to be used for simulation.
- processor
- class qutip_qip.qiskit.QiskitSimulatorBase(name: str, description: str, version: str, num_qubits: int, basis_gates: list[str], max_shots: int, max_circuits: int)[source]
Bases:
BackendV2The base class for
qutip_qipbasedqiskitbackends. This class must always be inherited, never instantiated as the implementation of abstract method _run_job is left to the child class.- Parameters:
- namestr
Backend name.
- descriptionstr
Backend description.
- versionfloat
Backend version
- num_qubitsint
Number of qubits supported by the backend.
- basis_gateslist[str]
QuTiP Basis Gates supported by the backend.
- max_shotsint
Maximum number of sampling shots supported by the backend. Defaults to 1e6
- max_circuitsint
Maximum number of circuits which can be passed to the backend in a single job. Defaults to 1.
Notes
Inherits all attributes from BackendV2.
- property max_circuits: int | None
The maximum number of circuits that can be run in a single job.
If there is no limit this will return None.
- property max_shots: int
The maximum number of shots that can be used by the sampler.
- run(run_input: QuantumCircuit | list[QuantumCircuit], **run_options) Job[source]
Simulates a circuit on the required backend.
- Parameters:
- run_inputlist[
qiskit.circuit.QuantumCircuit] List of
qiskitcircuits to be simulated.- run_optionsdict[str, Any], Optional
Additional run options for the backend. Valid options are shots - Number of times to sample the results.
- run_inputlist[
- Returns:
JobJob object that stores results and execution data.
- property target: Target
A
qiskit.transpiler.Targetobject for the backend.- Return type:
Target