Kyulacs
Documentation for Kyulacs.
Kyulacs.Circuit.QuantumCircuitOptimizerKyulacs.Gate.AdaptiveKyulacs.Gate.AmplitudeDampingNoiseKyulacs.Gate.BitFlipNoiseKyulacs.Gate.CNOTKyulacs.Gate.CPKyulacs.Gate.CPTPKyulacs.Gate.CZKyulacs.Gate.DenseMatrixKyulacs.Gate.DephasingNoiseKyulacs.Gate.DepolarizingNoiseKyulacs.Gate.DiagonalMatrixKyulacs.Gate.FREDKINKyulacs.Gate.HKyulacs.Gate.IdentityKyulacs.Gate.IndependentXZNoiseKyulacs.Gate.InstrumentKyulacs.Gate.MeasurementKyulacs.Gate.NoisyEvolutionKyulacs.Gate.NoisyEvolution_fastKyulacs.Gate.P0Kyulacs.Gate.P1Kyulacs.Gate.ParametricPauliRotationKyulacs.Gate.ParametricRXKyulacs.Gate.ParametricRYKyulacs.Gate.ParametricRZKyulacs.Gate.PauliKyulacs.Gate.PauliRotationKyulacs.Gate.ProbabilisticKyulacs.Gate.ProbabilisticInstrumentKyulacs.Gate.RXKyulacs.Gate.RYKyulacs.Gate.RZKyulacs.Gate.RandomUnitaryKyulacs.Gate.ReversibleBooleanKyulacs.Gate.RotInvXKyulacs.Gate.RotInvYKyulacs.Gate.RotInvZKyulacs.Gate.RotXKyulacs.Gate.RotYKyulacs.Gate.RotZKyulacs.Gate.SKyulacs.Gate.SWAPKyulacs.Gate.SdagKyulacs.Gate.SparseMatrixKyulacs.Gate.StateReflectionKyulacs.Gate.TKyulacs.Gate.TOFFOLIKyulacs.Gate.TdagKyulacs.Gate.TwoQubitDepolarizingNoiseKyulacs.Gate.U1Kyulacs.Gate.U2Kyulacs.Gate.U3Kyulacs.Gate.XKyulacs.Gate.YKyulacs.Gate.ZKyulacs.Qulacs.CausalConeSimulatorKyulacs.Qulacs.DensityMatrixKyulacs.Qulacs.GeneralQuantumOperatorKyulacs.Qulacs.GradCalculatorKyulacs.Qulacs.NoiseSimulatorKyulacs.Qulacs.ObservableKyulacs.Qulacs.ParametricQuantumCircuitKyulacs.Qulacs.PauliOperatorKyulacs.Qulacs.QuantumCircuitKyulacs.Qulacs.QuantumCircuitSimulatorKyulacs.Qulacs.QuantumGateBaseKyulacs.Qulacs.QuantumGateMatrixKyulacs.Qulacs.QuantumGate_SingleParameterKyulacs.Qulacs.QuantumStateKyulacs.Qulacs.QuantumStateBaseKyulacs.Qulacs.StateVectorKyulacs.Gate.addKyulacs.Gate.mergeKyulacs.Gate.sqrtXKyulacs.Gate.sqrtXdagKyulacs.Gate.sqrtYKyulacs.Gate.sqrtYdagKyulacs.Gate.to_matrix_gateKyulacs.ObservableFunctions.create_observable_from_openfermion_fileKyulacs.ObservableFunctions.create_observable_from_openfermion_textKyulacs.ObservableFunctions.create_split_observableKyulacs.QuantumOperator.create_quantum_operator_from_openfermion_fileKyulacs.QuantumOperator.create_quantum_operator_from_openfermion_textKyulacs.QuantumOperator.create_split_quantum_operatorKyulacs.State.drop_qubitKyulacs.State.inner_productKyulacs.State.partial_traceKyulacs.State.permutate_qubitKyulacs.State.tensor_product
Kyulacs.Qulacs.CausalConeSimulator — TypeCausalConeSimulator
Kyulacs.Qulacs.DensityMatrix — TypeDensityMatrix
Kyulacs.Qulacs.GeneralQuantumOperator — TypeGeneralQuantumOperator
Kyulacs.Qulacs.GradCalculator — TypeGradCalculator
Kyulacs.Qulacs.NoiseSimulator — TypeNoiseSimulator
Kyulacs.Qulacs.Observable — TypeObservable
Kyulacs.Qulacs.ParametricQuantumCircuit — TypeParametricQuantumCircuit
Kyulacs.Qulacs.PauliOperator — TypePauliOperator
Kyulacs.Qulacs.QuantumCircuit — TypeQuantumCircuit
Kyulacs.Qulacs.QuantumCircuitSimulator — TypeQuantumCircuitSimulator
Kyulacs.Qulacs.QuantumGateBase — TypeQuantumGateBase
Kyulacs.Qulacs.QuantumGateMatrix — TypeQuantumGateMatrix
Kyulacs.Qulacs.QuantumGate_SingleParameter — TypeQuantumGate_SingleParameter
Kyulacs.Qulacs.QuantumState — TypeQuantumState
Kyulacs.Qulacs.QuantumStateBase — TypeQuantumStateBase
Kyulacs.Qulacs.StateVector — TypeStateVector(arg0: int) -> qulacs_core.QuantumState
StateVector
Kyulacs.Gate.Adaptive — TypeAdaptive(*args, **kwargs)
Overloaded function.
1. Adaptive(gate: qulacs_core.QuantumGateBase, condition: Callable[[List[int]], bool]) -> qulacs_core.QuantumGateBase
Create adaptive gate
2. Adaptive(gate: qulacs_core.QuantumGateBase, condition: Callable[[List[int], int], bool], id: int) -> qulacs_core.QuantumGateBase
Kyulacs.Gate.AmplitudeDampingNoise — TypeAmplitudeDampingNoise(index: int, prob: float) -> qulacs_core.QuantumGate_CPTP
Create amplitude damping noise
Kyulacs.Gate.BitFlipNoise — TypeBitFlipNoise(index: int, prob: float) -> qulacs_core.QuantumGate_Probabilistic
Create bit-flip noise
Kyulacs.Gate.CNOT — TypeCNOT(control: int, target: int) -> qulacs_core.ClsOneControlOneTargetGate
Create CNOT gate
Kyulacs.Gate.CP — TypeCP(kraus_list: List[qulacs_core.QuantumGateBase], state_normalize: bool, probability_normalize: bool, assign_zero_if_not_matched: bool) -> qulacs_core.QuantumGateBase
Create completely-positive map
Kyulacs.Gate.CPTP — TypeCPTP(kraus_list: List[qulacs_core.QuantumGateBase]) -> qulacs_core.QuantumGateBase
Create completely-positive trace preserving map
Kyulacs.Gate.CZ — TypeCZ(control: int, target: int) -> qulacs_core.ClsOneControlOneTargetGate
Create CZ gate
Kyulacs.Gate.DenseMatrix — TypeDenseMatrix(*args, **kwargs)
Overloaded function.
1. DenseMatrix(index: int, matrix: numpy.ndarray[numpy.complex128[m, n]]) -> qulacs_core.QuantumGateMatrix
Create dense matrix gate
2. DenseMatrix(index_list: List[int], matrix: numpy.ndarray[numpy.complex128[m, n]]) -> qulacs_core.QuantumGateMatrix
Kyulacs.Gate.DephasingNoise — TypeDephasingNoise(index: int, prob: float) -> qulacs_core.QuantumGate_Probabilistic
Create dephasing noise
Kyulacs.Gate.DepolarizingNoise — TypeDepolarizingNoise(index: int, prob: float) -> qulacs_core.QuantumGate_Probabilistic
Create depolarizing noise
Kyulacs.Gate.DiagonalMatrix — TypeDiagonalMatrix(index_list: List[int], diagonal_element: numpy.ndarray[numpy.complex128[m, 1]]) -> qulacs_core.QuantumGateDiagonalMatrix
Create diagonal matrix gate
Kyulacs.Gate.FREDKIN — TypeFREDKIN(control: int, target1: int, target2: int) -> qulacs_core.QuantumGateMatrix
Create FREDKIN gate
Kyulacs.Gate.H — TypeH(index: int) -> qulacs_core.ClsOneQubitGate
Create Hadamard gate
Kyulacs.Gate.Identity — TypeIdentity(index: int) -> qulacs_core.ClsOneQubitGate
Create identity gate
Kyulacs.Gate.IndependentXZNoise — TypeIndependentXZNoise(index: int, prob: float) -> qulacs_core.QuantumGate_Probabilistic
Create independent XZ noise
Kyulacs.Gate.Instrument — TypeInstrument(kraus_list: List[qulacs_core.QuantumGateBase], register: int) -> qulacs_core.QuantumGateBase
Create instruments
Kyulacs.Gate.Measurement — TypeMeasurement(index: int, register: int) -> qulacs_core.QuantumGate_CPTP
Create measurement gate
Kyulacs.Gate.NoisyEvolution — TypeNoisyEvolution(hamiltonian: qulacs_core.Observable, c_ops: List[qulacs_core.GeneralQuantumOperator], time: float, dt: float) -> qulacs_core.ClsNoisyEvolution
Create noisy evolution
Kyulacs.Gate.NoisyEvolution_fast — TypeNoisyEvolution_fast(hamiltonian: qulacs_core.Observable, c_ops: List[qulacs_core.GeneralQuantumOperator], time: float) -> qulacs_core.ClsNoisyEvolution_fast
Create noisy evolution fast version
Kyulacs.Gate.P0 — TypeP0(index: int) -> qulacs_core.ClsOneQubitGate
Create projection gate to |0> subspace
Kyulacs.Gate.P1 — TypeP1(index: int) -> qulacs_core.ClsOneQubitGate
Create projection gate to |1> subspace
Kyulacs.Gate.ParametricPauliRotation — TypeParametricPauliRotation(index_list: List[int], pauli_ids: List[int], angle: float) -> qulacs_core.QuantumGate_SingleParameter
Create parametric multi-qubit Pauli rotation gate
Kyulacs.Gate.ParametricRX — TypeParametricRX(index: int, angle: float) -> qulacs_core.QuantumGate_SingleParameter
Create parametric Pauli-X rotation gate
Kyulacs.Gate.ParametricRY — TypeParametricRY(index: int, angle: float) -> qulacs_core.QuantumGate_SingleParameter
Create parametric Pauli-Y rotation gate
Kyulacs.Gate.ParametricRZ — TypeParametricRZ(index: int, angle: float) -> qulacs_core.QuantumGate_SingleParameter
Create parametric Pauli-Z rotation gate
Kyulacs.Gate.Pauli — TypePauli(index_list: List[int], pauli_ids: List[int]) -> qulacs_core.ClsPauliGate
Create multi-qubit Pauli gate
Kyulacs.Gate.PauliRotation — TypePauliRotation(index_list: List[int], pauli_ids: List[int], angle: float) -> qulacs_core.ClsPauliRotationGate
Create multi-qubit Pauli rotation
Kyulacs.Gate.Probabilistic — TypeProbabilistic(prob_list: List[float], gate_list: List[qulacs_core.QuantumGateBase]) -> qulacs_core.QuantumGateBase
Create probabilistic gate
Kyulacs.Gate.ProbabilisticInstrument — TypeProbabilisticInstrument(prob_list: List[float], gate_list: List[qulacs_core.QuantumGateBase], register: int) -> qulacs_core.QuantumGateBase
Create probabilistic instrument gate
Kyulacs.Gate.RX — TypeRX(index: int, angle: float) -> qulacs_core.ClsOneQubitRotationGate
Create Pauli-X rotation gate
Kyulacs.Gate.RY — TypeRY(index: int, angle: float) -> qulacs_core.ClsOneQubitRotationGate
Create Pauli-Y rotation gate
Kyulacs.Gate.RZ — TypeRZ(index: int, angle: float) -> qulacs_core.ClsOneQubitRotationGate
Create Pauli-Z rotation gate
Kyulacs.Gate.RandomUnitary — TypeRandomUnitary(*args, **kwargs)
Overloaded function.
1. RandomUnitary(index_list: List[int]) -> qulacs_core.QuantumGateMatrix
Create random unitary gate
2. RandomUnitary(index_list: List[int], seed: int) -> qulacs_core.QuantumGateMatrix
Kyulacs.Gate.ReversibleBoolean — TypeReversibleBoolean(index_list: List[int], func: Callable[[int, int], int]) -> qulacs_core.ClsReversibleBooleanGate
Create reversible boolean gate
Kyulacs.Gate.RotInvX — TypeRotInvX(index: int, angle: float) -> qulacs_core.ClsOneQubitRotationGate
Create Pauli-X rotation gate
Kyulacs.Gate.RotInvY — TypeRotInvY(index: int, angle: float) -> qulacs_core.ClsOneQubitRotationGate
Create Pauli-Y rotation gate
Kyulacs.Gate.RotInvZ — TypeRotInvZ(index: int, angle: float) -> qulacs_core.ClsOneQubitRotationGate
Create Pauli-Z rotation gate
Kyulacs.Gate.RotX — TypeRotX(index: int, angle: float) -> qulacs_core.ClsOneQubitRotationGate
Create Pauli-X rotation gate
Kyulacs.Gate.RotY — TypeRotY(index: int, angle: float) -> qulacs_core.ClsOneQubitRotationGate
Create Pauli-Y rotation gate
Kyulacs.Gate.RotZ — TypeRotZ(index: int, angle: float) -> qulacs_core.ClsOneQubitRotationGate
Create Pauli-Z rotation gate
Kyulacs.Gate.S — TypeS(index: int) -> qulacs_core.ClsOneQubitGate
Create pi/4-phase gate
Kyulacs.Gate.SWAP — TypeSWAP(target1: int, target2: int) -> qulacs_core.ClsTwoQubitGate
Create SWAP gate
Kyulacs.Gate.Sdag — TypeSdag(index: int) -> qulacs_core.ClsOneQubitGate
Create adjoint of pi/4-phase gate
Kyulacs.Gate.SparseMatrix — TypeSparseMatrix(index_list: List[int], matrix: scipy.sparse.csc_matrix[numpy.complex128]) -> qulacs_core.QuantumGateSparseMatrix
Create sparse matrix gate
Kyulacs.Gate.StateReflection — TypeStateReflection(state: qulacs_core.QuantumStateBase) -> qulacs_core.ClsStateReflectionGate
Create state reflection gate
Kyulacs.Gate.T — TypeT(index: int) -> qulacs_core.ClsOneQubitGate
Create pi/8-phase gate
Kyulacs.Gate.TOFFOLI — TypeTOFFOLI(control1: int, control2: int, target: int) -> qulacs_core.QuantumGateMatrix
Create TOFFOLI gate
Kyulacs.Gate.Tdag — TypeTdag(index: int) -> qulacs_core.ClsOneQubitGate
Create adjoint of pi/8-phase gate
Kyulacs.Gate.TwoQubitDepolarizingNoise — TypeTwoQubitDepolarizingNoise(index1: int, index2: int, prob: float) -> qulacs_core.QuantumGate_Probabilistic
Create two-qubit depolarizing noise
Kyulacs.Gate.U1 — TypeU1(index: int, lambda: float) -> qulacs_core.QuantumGateMatrix
Create QASM U1 gate
Kyulacs.Gate.U2 — TypeU2(index: int, phi: float, lambda: float) -> qulacs_core.QuantumGateMatrix
Create QASM U2 gate
Kyulacs.Gate.U3 — TypeU3(index: int, theta: float, phi: float, lambda: float) -> qulacs_core.QuantumGateMatrix
Create QASM U3 gate
Kyulacs.Gate.X — TypeX(index: int) -> qulacs_core.ClsOneQubitGate
Create Pauli-X gate
Kyulacs.Gate.Y — TypeY(index: int) -> qulacs_core.ClsOneQubitGate
Create Pauli-Y gate
Kyulacs.Gate.Z — TypeZ(index: int) -> qulacs_core.ClsOneQubitGate
Create Pauli-Z gate
Kyulacs.Gate.add — Methodadd(*args, **kwargs)
Overloaded function.
1. add(gate1: qulacs_core.QuantumGateBase, gate2: qulacs_core.QuantumGateBase) -> qulacs_core.QuantumGateMatrix
Add quantum gate matrices
2. add(gate_list: List[qulacs_core.QuantumGateBase]) -> qulacs_core.QuantumGateMatrix
Add quantum gate matrices
Kyulacs.Gate.merge — Methodmerge(*args, **kwargs)
Overloaded function.
1. merge(gate1: qulacs_core.QuantumGateBase, gate2: qulacs_core.QuantumGateBase) -> qulacs_core.QuantumGateMatrix
Merge two quantum gate or gate list
2. merge(gate_list: List[qulacs_core.QuantumGateBase]) -> qulacs_core.QuantumGateMatrix
Kyulacs.Gate.sqrtX — MethodsqrtX(index: int) -> qulacs_core.ClsOneQubitGate
Create pi/4 Pauli-X rotation gate
Kyulacs.Gate.sqrtXdag — MethodsqrtXdag(index: int) -> qulacs_core.ClsOneQubitGate
Create adjoint of pi/4 Pauli-X rotation gate
Kyulacs.Gate.sqrtY — MethodsqrtY(index: int) -> qulacs_core.ClsOneQubitGate
Create pi/4 Pauli-Y rotation gate
Kyulacs.Gate.sqrtYdag — MethodsqrtYdag(index: int) -> qulacs_core.ClsOneQubitGate
Create adjoint of pi/4 Pauli-Y rotation gate
Kyulacs.Gate.to_matrix_gate — Methodto_matrix_gate(gate: qulacs_core.QuantumGateBase) -> qulacs_core.QuantumGateMatrix
Convert named gate to matrix gate
Kyulacs.State.drop_qubit — Methoddrop_qubit(state: qulacs_core.QuantumState, target: List[int], projection: List[int]) -> qulacs_core.QuantumState
Drop qubits from state
Kyulacs.State.inner_product — Methodinner_product(state_bra: qulacs_core.QuantumState, state_ket: qulacs_core.QuantumState) -> complex
Get inner product
Kyulacs.State.partial_trace — Methodpartial_trace(*args, **kwargs)
Overloaded function.
1. partial_trace(state: qulacs_core.QuantumState, target_traceout: List[int]) -> qulacs_core.DensityMatrix
Take partial trace
2. partial_trace(state: qulacs_core.DensityMatrix, target_traceout: List[int]) -> qulacs_core.DensityMatrix
Kyulacs.State.permutate_qubit — Methodpermutate_qubit(*args, **kwargs)
Overloaded function.
1. permutate_qubit(state: qulacs_core.QuantumState, qubit_order: List[int]) -> qulacs_core.QuantumState
Permutate qubits from state
2. permutate_qubit(state: qulacs_core.DensityMatrix, qubit_order: List[int]) -> qulacs_core.DensityMatrix
Kyulacs.State.tensor_product — Methodtensor_product(*args, **kwargs)
Overloaded function.
1. tensor_product(state_left: qulacs_core.QuantumState, state_right: qulacs_core.QuantumState) -> qulacs_core.QuantumState
Get tensor product of states
2. tensor_product(state_left: qulacs_core.DensityMatrix, state_right: qulacs_core.DensityMatrix) -> qulacs_core.DensityMatrix
Kyulacs.Circuit.QuantumCircuitOptimizer — TypeQuantumCircuitOptimizer
Kyulacs.QuantumOperator.create_quantum_operator_from_openfermion_file — Methodcreate_quantum_operator_from_openfermion_file(arg0: str) -> qulacs_core.GeneralQuantumOperator
Kyulacs.QuantumOperator.create_quantum_operator_from_openfermion_text — Methodcreate_quantum_operator_from_openfermion_text(arg0: str) -> qulacs_core.GeneralQuantumOperator
Kyulacs.QuantumOperator.create_split_quantum_operator — Methodcreate_split_quantum_operator(arg0: str) -> Tuple[qulacs_core.GeneralQuantumOperator, qulacs_core.GeneralQuantumOperator]
Kyulacs.ObservableFunctions.create_observable_from_openfermion_file — Methodcreate_observable_from_openfermion_file(file_path: str) -> qulacs_core.Observable
Create GeneralQuantumOperator from openfermion file
Kyulacs.ObservableFunctions.create_observable_from_openfermion_text — Methodcreate_observable_from_openfermion_text(text: str) -> qulacs_core.Observable
Create GeneralQuantumOperator from openfermion text
Kyulacs.ObservableFunctions.create_split_observable — Methodcreate_split_observable(arg0: str) -> Tuple[qulacs_core.Observable, qulacs_core.Observable]