Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of signature with attributes #1252

Closed
Eric-Arellano opened this issue Apr 29, 2024 · 0 comments · Fixed by #1291
Closed

Get rid of signature with attributes #1252

Eric-Arellano opened this issue Apr 29, 2024 · 0 comments · Fixed by #1291

Comments

@Eric-Arellano
Copy link
Collaborator

For attributes, we usually set attributeTypeHint and attributeDefaultValue. But in Qiskit 0.19 and Provider 0.7, we instead set signature:

❯ rg '<Attribute.*signature=' -l
docs/api/qiskit/0.19/qiskit.ignis.characterization.BaseCoherenceFitter.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.PauliFeatureMap.mdx
docs/api/qiskit/0.19/qiskit.chemistry.algorithms.QEomEE.mdx
docs/api/qiskit/0.19/qiskit.providers.JobStatus.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.AmplitudeEstimation.mdx
docs/api/qiskit/0.19/qiskit.ignis.characterization.ZZFitter.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.QuantumVolume.mdx
docs/api/qiskit/0.19/qiskit.chemistry.core.QubitMappingType.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.WeightedAdder.mdx
docs/api/qiskit/0.19/qiskit.circuit.QuantumCircuit.mdx
docs/api/qiskit/0.19/qiskit.optimization.problems.Variable.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.CRYGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.evolutions.QDrift.mdx
docs/api/qiskit/0.19/qiskit.pulse.Gaussian.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.RXGate.mdx
docs/api/qiskit/0.19/qiskit.ignis.characterization.T1Fitter.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.OR.mdx
docs/api/qiskit/0.19/qiskit.pulse.pulse_lib.GaussianSquare.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.NLocal.mdx
docs/api/qiskit/0.19/qiskit.ignis.characterization.AmpCalCXFitter.mdx
docs/api/qiskit/0.19/qiskit.pulse.Drag.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.CHGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.primitive_ops.PauliOp.mdx
docs/api/qiskit/0.19/qiskit.transpiler.FlowController.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.EOH.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.CRZGate.mdx
docs/api/qiskit/0.19/qiskit.ignis.characterization.AngleCalFitter.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.IQP.mdx
docs/api/qiskit/0.19/qiskit.circuit.ControlledGate.mdx
docs/api/qiskit/0.19/qiskit.providers.models.BackendStatus.mdx
docs/api/qiskit/0.19/qiskit.pulse.ShiftPhase.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.QPE.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.ZZFeatureMap.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.RZZGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.RealAmplitudes.mdx
docs/api/qiskit/0.19/qiskit.pulse.instructions.ShiftPhase.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.state_fns.DictStateFn.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.IterativeAmplitudeEstimation.mdx
docs/api/qiskit/0.19/qiskit.pulse.pulse_lib.Gaussian.mdx
docs/api/qiskit/0.19/qiskit.ignis.logging.IgnisLogger.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.TdgGate.mdx
docs/api/qiskit/0.19/qiskit.providers.aer.QasmSimulator.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.QSVM.mdx
docs/api/qiskit/0.19/qiskit.pulse.instructions.Delay.mdx
docs/api/qiskit/0.19/qiskit.ignis.characterization.RabiFitter.mdx
docs/api/qiskit/0.19/qiskit.chemistry.QMolecule.mdx
docs/api/qiskit/0.19/qiskit.pulse.Schedule.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.C4XGate.mdx
docs/api/qiskit/0.19/qiskit.ignis.characterization.BaseGateFitter.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.EfficientSU2.mdx
docs/api/qiskit/0.19/qiskit.providers.aer.UnitarySimulator.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.MCMTVChain.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.Permutation.mdx
docs/api/qiskit/0.19/qiskit.providers.basicaer.UnitarySimulatorPy.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.RYGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.list_ops.SummedOp.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.state_fns.CircuitStateFn.mdx
docs/api/qiskit/0.19/qiskit.providers.models.PulseBackendConfiguration.mdx
docs/api/qiskit/0.19/qiskit.finance.data_providers.DataType.mdx
docs/api/qiskit/0.19/qiskit.pulse.SamplePulse.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.TGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.GraphState.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.SdgGate.mdx
docs/api/qiskit/0.19/qiskit.optimization.algorithms.CplexOptimizer.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.RCCXGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.InnerProduct.mdx
docs/api/qiskit/0.19/qiskit.pulse.instructions.Instruction.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.SwapGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.QGAN.mdx
docs/api/qiskit/0.19/qiskit.result.Result.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.NumPyEigensolver.mdx
docs/api/qiskit/0.19/qiskit.optimization.problems.QuadraticConstraint.mdx
docs/api/qiskit/0.19/qiskit.chemistry.core.ChemistryOperator.mdx
docs/api/qiskit/0.19/qiskit.pulse.instructions.Acquire.mdx
docs/api/qiskit/0.19/qiskit.pulse.DriveChannel.mdx
docs/api/qiskit/0.19/qiskit.optimization.problems.LinearConstraint.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.QAOA.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.MSGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.HGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.C3XGate.mdx
docs/api/qiskit/0.19/qiskit.ignis.characterization.AmpCalFitter.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.FunctionalPauliRotations.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.BernsteinVazirani.mdx
docs/api/qiskit/0.19/qiskit.circuit.Gate.mdx
docs/api/qiskit/0.19/qiskit.chemistry.core.Hamiltonian.mdx
docs/api/qiskit/0.19/qiskit.pulse.pulse_lib.SamplePulse.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.RZGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.VQE.mdx
docs/api/qiskit/0.19/qiskit.ignis.characterization.AngleCalCXFitter.mdx
docs/api/qiskit/0.19/qiskit.chemistry.core.MolecularChemistryResult.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.CRXGate.mdx
docs/api/qiskit/0.19/qiskit.pulse.Acquire.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.evolutions.PauliTrotterEvolution.mdx
docs/api/qiskit/0.19/qiskit.aqua.components.oracles.Oracle.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.GMS.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.list_ops.ComposedOp.mdx
docs/api/qiskit/0.19/qiskit.pulse.MemorySlot.mdx
docs/api/qiskit/0.19/qiskit.validation.BaseSchema.mdx
docs/api/qiskit/0.19/qiskit.pulse.ControlChannel.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.VQC.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.PolynomialPauliRotations.mdx
docs/api/qiskit/0.19/qiskit.chemistry.algorithms.VQEAdapt.mdx
docs/api/qiskit/0.19/qiskit.pulse.instructions.Snapshot.mdx
docs/api/qiskit/0.19/qiskit.qasm.QasmTerminalStyle.mdx
docs/api/qiskit/0.19/qiskit.pulse.Instruction.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.U1Gate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.IGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.CCXGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.Diagonal.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.evolutions.Trotter.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.IntegerComparator.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.TwoLocal.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.CU3Gate.mdx
docs/api/qiskit/0.19/qiskit.ignis.characterization.DragFitter.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.NumPyMinimumEigensolver.mdx
docs/api/qiskit/0.19/qiskit.pulse.GaussianSquare.mdx
docs/api/qiskit/0.19/qiskit.pulse.pulse_lib.Constant.mdx
docs/api/qiskit/0.19/qiskit.ignis.verification.AccreditationFitter.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.FourierChecking.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.CZGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.AND.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.list_ops.TensoredOp.mdx
docs/api/qiskit/0.19/qiskit.providers.basicaer.StatevectorSimulatorPy.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.legacy.LegacyBaseOperator.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.CSwapGate.mdx
docs/api/qiskit/0.19/qiskit.pulse.Constant.mdx
docs/api/qiskit/0.19/qiskit.providers.aer.StatevectorSimulator.mdx
docs/api/qiskit/0.19/qiskit.pulse.AcquireChannel.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.RZXGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.ZFeatureMap.mdx
docs/api/qiskit/0.19/qiskit.chemistry.algorithms.QEomVQE.mdx
docs/api/qiskit/0.19/qiskit.pulse.Play.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.evolutions.TrotterizationBase.mdx
docs/api/qiskit/0.19/qiskit.pulse.RegisterSlot.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.IQPE.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.QFT.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.OperatorBase.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.XGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.evolutions.Suzuki.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.list_ops.ListOp.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.HiddenLinearFunction.mdx
docs/api/qiskit/0.19/qiskit.pulse.MeasureChannel.mdx
docs/api/qiskit/0.19/qiskit.finance.data_providers.StockMarket.mdx
docs/api/qiskit/0.19/qiskit.qasm.QasmHTMLStyle.mdx
docs/api/qiskit/0.19/qiskit.extensions.UnitaryGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.YGate.mdx
docs/api/qiskit/0.19/qiskit.qasm.OpenQASMLexer.mdx
docs/api/qiskit/0.19/qiskit.circuit.QuantumRegister.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.converters.PauliBasisChange.mdx
docs/api/qiskit/0.19/qiskit.extensions.HamiltonianGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.QuantumInstance.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.ExcitationPreserving.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.state_fns.OperatorStateFn.mdx
docs/api/qiskit/0.19/qiskit.pulse.Delay.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.CYGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.DeutschJozsa.mdx
docs/api/qiskit/0.19/qiskit.providers.basicaer.QasmSimulatorPy.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.state_fns.VectorStateFn.mdx
docs/api/qiskit/0.19/qiskit.pulse.SetFrequency.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.ZGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.state_fns.StateFn.mdx
docs/api/qiskit/0.19/qiskit.optimization.problems.LinearExpression.mdx
docs/api/qiskit/0.19/qiskit.circuit.ClassicalRegister.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.MaximumLikelihoodAmplitudeEstimation.mdx
docs/api/qiskit/0.19/qiskit.optimization.QuadraticProgram.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.Grover.mdx
docs/api/qiskit/0.19/qiskit.optimization.problems.QuadraticExpression.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.Shor.mdx
docs/api/qiskit/0.19/qiskit.validation.ModelTypeValidator.mdx
docs/api/qiskit/0.19/qiskit.pulse.instructions.SetFrequency.mdx
docs/api/qiskit/0.19/qiskit.pulse.Snapshot.mdx
docs/api/qiskit/0.19/qiskit.optimization.problems.Constraint.mdx
docs/api/qiskit/0.19/qiskit.optimization.algorithms.GroverOptimizer.mdx
docs/api/qiskit/0.19/qiskit.chemistry.core.MolecularGroundStateResult.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.Simon.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.SGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.primitive_ops.CircuitOp.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.XOR.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.RC3XGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.converters.CircuitSampler.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.evolutions.EvolvedOp.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.MCMT.mdx
docs/api/qiskit/0.19/qiskit.pulse.instructions.Play.mdx
docs/api/qiskit/0.19/qiskit.ignis.characterization.T2Fitter.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.RXXGate.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.primitive_ops.MatrixOp.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.MinimumEigensolverResult.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.PiecewiseLinearPauliRotations.mdx
docs/api/qiskit/0.19/qiskit.optimization.problems.QuadraticProgram.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.U3Gate.mdx
docs/api/qiskit/0.19/qiskit.ignis.characterization.T2StarFitter.mdx
docs/api/qiskit/0.19/qiskit.chemistry.core.MolecularExcitedStatesResult.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.DCXGate.mdx
docs/api/qiskit/0.19/qiskit.pulse.channels.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.HHL.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.U2Gate.mdx
docs/api/qiskit/0.19/qiskit.chemistry.core.TransformationType.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.MinimumEigensolver.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.iSwapGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.LinearPauliRotations.mdx
docs/api/qiskit/0.19/qiskit.providers.aer.PulseSimulator.mdx
docs/api/qiskit/0.19/qiskit.aqua.algorithms.QuantumAlgorithm.mdx
docs/api/qiskit/0.19/qiskit.pulse.pulse_lib.Drag.mdx
docs/api/qiskit/0.19/qiskit.pulse.InstructionScheduleMap.mdx
docs/api/qiskit/0.19/qiskit.aqua.operators.primitive_ops.PrimitiveOp.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.CXGate.mdx
docs/api/qiskit/0.19/qiskit.optimization.problems.QuadraticObjective.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.RYYGate.mdx
docs/api/qiskit/0.19/qiskit.circuit.library.CU1Gate.mdx
docs/api/qiskit-ibm-provider/0.7/qiskit_ibm_provider.IBMBackend.mdx
docs/api/qiskit-ibm-provider/0.7/qiskit_ibm_provider.Session.mdx
docs/api/qiskit-ibm-provider/0.7/qiskit_ibm_provider.IBMProvider.mdx
docs/api/qiskit-ibm-provider/0.7/qiskit_ibm_provider.job.IBMCircuitJob.mdx
docs/api/qiskit-ibm-provider/0.7/qiskit_ibm_provider.job.QueueInfo.mdx
docs/api/qiskit-ibm-provider/0.7/qiskit_ibm_provider.job.IBMCompositeJob.mdx
docs/api/qiskit-ibm-provider/0.7/qiskit_ibm_provider.transpiler.passes.scheduling.DynamicCircuitInstructionDurations.mdx

This means that we have to deal with two code paths, which is confusing. It would be simpler if attributes never used signature. Because there are only two legacy versions impacted, the best fix is probably to change the HTML itself rather than having code to handle this. We want our code to be as simple as possible.

@Eric-Arellano Eric-Arellano transferred this issue from Qiskit/qiskit Apr 29, 2024
@arnaucasau arnaucasau linked a pull request May 3, 2024 that will close this issue
github-merge-queue bot pushed a commit that referenced this issue May 3, 2024
This PR removes the signature prop from the Attribute component and
instead, sets `attributeTypeHint` and `attributeValue`. This change
simplifies the script that was using different props for attributes
embedded in the class page and the rest.

As a side effect, this PR also fixes an issue with some default values
not showing correctly. These values were treated as signatures and
wrongly converted into HTML by a unified plugin.

Closes #1217 #1252
frankharkins pushed a commit to frankharkins/documentation that referenced this issue Jul 22, 2024
This PR removes the signature prop from the Attribute component and
instead, sets `attributeTypeHint` and `attributeValue`. This change
simplifies the script that was using different props for attributes
embedded in the class page and the rest.

As a side effect, this PR also fixes an issue with some default values
not showing correctly. These values were treated as signatures and
wrongly converted into HTML by a unified plugin.

Closes Qiskit#1217 Qiskit#1252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants